/* ==========================================================================
   起業診断ページ（/shindan/）
   ========================================================================== */

/* 質問が短い画面でもフッターを画面下にそろえる */
body { display: flex; flex-direction: column; min-height: 100svh; }
.shindan { flex: 1; }

.shindan .container { max-width: calc(720px + var(--gutter) * 2); }

.screen { padding-block: 20px 64px; }
.screen[hidden] { display: none; }
.screen--intro { background: var(--sky); }

@media (min-width: 768px) {
  .screen { padding-block: 40px 96px; }
}

/* ---------- はじめ ---------- */
.intro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 8px;
}
.intro__spark--1 { right: calc(var(--gutter) + 6px); top: 0; }
.intro__spark--2 { right: calc(var(--gutter) + 52px); top: 44px; }

.intro__badge {
  align-self: flex-start;
  padding: 6px 16px;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  transform: rotate(-3deg);
  font-size: var(--fs-small);
  font-weight: 900;
}
.intro__title {
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.9rem + 3vw, 4rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.intro__lead { font-weight: 700; max-width: 34em; }

.intro__card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  margin-top: 8px;
}
.intro__card-head { font-family: var(--font-hand); color: var(--ink-2); font-size: var(--fs-lead); }
.intro__list { display: flex; flex-direction: column; gap: 10px; }
.intro__list li { display: flex; align-items: center; gap: 12px; font-weight: 900; line-height: 1.5; }
.intro__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: var(--line-thin);
  border-radius: 999px;
  background: var(--cta);
  font-size: var(--fs-small);
}
.intro__note { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.7; }
.intro__note--proto {
  margin-top: -8px;
}

@media (min-width: 768px) {
  .intro__card { padding: 30px 32px; }
}

/* ---------- 質問 ---------- */
.quiz__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.quiz__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px 0 2px;
  background: none;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}
.quiz__back:hover { color: var(--ink-2); }
.quiz__count { font-family: var(--font-pop); font-size: var(--fs-lead); }

.progress {
  height: 16px;
  background: var(--white);
  border: var(--line-thin);
  border-radius: 999px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--cta);
  transition: width 0.3s ease;
}
.progress__bar.has-value { border-right: var(--line-thin); }

.quiz__q {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block: 28px 20px;
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.05rem + 1.2vw, 1.75rem);
  line-height: 1.5;
}
.quiz__q:focus { outline: none; }
.quiz__qnum {
  align-self: flex-start;
  padding: 2px 12px;
  background: var(--pink);
  border: var(--line-thin);
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.options { display: grid; gap: 12px; }
@media (min-width: 768px) {
  .options--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.option {
  word-break: auto-phrase;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 12px 18px;
  background: var(--white);
  border: var(--line);
  border-radius: 20px;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.12s ease;
}
@media (hover: hover) {
  .option:hover { background: var(--lav-soft); }
}
.option:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.option[aria-pressed="true"] { background: var(--cta); }
.option__mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: var(--line-thin);
  border-radius: 999px;
  background: var(--white);
}
.option[aria-pressed="true"] .option__mark { background: var(--ink); }
.option[aria-pressed="true"] .option__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--cta);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.options[aria-busy="true"] .option { pointer-events: none; }

.quiz__body.is-entering { animation: quiz-in 0.28s ease both; }
@keyframes quiz-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 結果 ---------- */
.result { display: flex; flex-direction: column; gap: 32px; }
.result__eyebrow { font-family: var(--font-hand); font-size: 1.125rem; text-align: center; color: var(--ink-2); }
.result__eyebrow + .type-card { margin-top: -18px; }

.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 20px 24px;
  background: var(--type-color, var(--lav));
  border: 3px solid var(--ink);
  border-radius: 32px;
  box-shadow: var(--shadow-pop);
  text-align: center;
}
.type-card .sparkle--a { left: 14px; top: -16px; }
.type-card .sparkle--b { right: 18px; top: 20px; }
.type-card .sparkle--c { right: 44px; bottom: -14px; }
.type-card__en { font-family: var(--font-pop); font-size: var(--fs-small); letter-spacing: 0.14em; }
.type-card__name {
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.75rem);
  line-height: 1.35;
}
.type-card__catch { font-family: var(--font-hand); font-size: 1.25rem; line-height: 1.6; }
.type-card__desc {
  margin-top: 6px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  font-weight: 700;
  text-align: left;
}
.type-card__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.type-card__tags li {
  padding: 2px 12px;
  background: var(--white);
  border: var(--line-thin);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 900;
}

.result-sec__title {
  margin-bottom: 16px;
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.5rem);
  line-height: 1.5;
}

.ideas { display: grid; gap: 18px; }
.idea {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: var(--white);
  border: var(--line);
  border-radius: 24px;
}
.idea--top { border-width: 3px; box-shadow: var(--shadow-pop); padding-top: 28px; margin-top: 10px; }
.idea__badge { position: absolute; left: 14px; top: -15px; transform: rotate(-4deg); }
.idea__head { display: flex; align-items: flex-start; gap: 10px; }
.idea__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--cta);
  border: var(--line-thin);
  border-radius: 999px;
  font-family: var(--font-pop);
  font-size: 0.875rem;
}
.idea__title { font-size: 1.0625rem; font-weight: 900; line-height: 1.5; padding-top: 3px; }
.idea__desc { font-size: 0.875rem; line-height: 1.8; }
.idea__meta { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.idea__meta li {
  padding: 2px 10px;
  background: var(--lav-soft);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.8;
}
.idea__meta li.is-over { background: var(--pink-pale); color: var(--pink-text); }
.idea__permits {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px dashed var(--ink-3);
  font-size: var(--fs-small);
  line-height: 1.7;
}
.idea__permits-head { font-weight: 900; }
.idea__permits li { position: relative; padding-left: 1em; }
.idea__permits li::before { content: "・"; position: absolute; left: 0; }

.first-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  background: var(--cta);
  border: var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-pop);
}
.first-step__label { font-family: var(--font-hand); font-size: var(--fs-lead); }
.first-step__text {
  word-break: auto-phrase;
  text-wrap: balance;
  font-family: var(--font-pop);
  font-weight: 400;
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.4rem);
  line-height: 1.65;
}
.first-step__from { font-size: var(--fs-small); color: var(--ink-2); word-break: auto-phrase; }

.notes {
  padding: 16px 18px;
  background: var(--white);
  border: 2px dashed var(--ink-3);
  border-radius: 20px;
}
.notes__head { font-weight: 900; margin-bottom: 6px; }
.notes li { position: relative; padding-left: 1em; font-size: 0.875rem; line-height: 1.8; }
.notes li + li { margin-top: 4px; }
.notes li::before { content: "・"; position: absolute; left: 0; }

.result-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 28px;
}
.result-cta__title { font-family: var(--font-hand); font-size: 1.375rem; line-height: 1.5; word-break: auto-phrase; text-wrap: balance; }
.result-cta__text { font-size: 0.875rem; color: var(--on-ink-2); }
.result-cta .btn--cta { border-color: var(--on-ink); box-shadow: 0 6px 0 #000000; }
.result-cta .btn--cta:active { box-shadow: 0 1px 0 #000000; }
.result-cta__hint { font-size: 0.75rem; color: var(--on-ink-2); text-align: center; word-break: auto-phrase; text-wrap: balance; }

.share { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.share__head { font-weight: 900; }
.share__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn--chip {
  min-height: 44px;
  padding: 0 18px;
  border: var(--line-thin);
  font-size: 0.875rem;
}

.result-actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 768px) {
  .result-actions { flex-direction: row; }
  .result-actions > * { flex: 1; }
}

/* シェアされた結果を見ている人向け */
.shared-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.shared-cta__title { font-family: var(--font-pop); font-weight: 400; font-size: 1.375rem; line-height: 1.5; }

/* ---------- 通知 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.noscript { padding: 20px; margin-block: 40px; }
