/* =============================================================================
   サクッと助成金 — スマホの診断
   トークンは develop/LP/css/styles.css から持ってきている。ブランドが
   決まったら 1-1 の原色を差し替えれば全体が追従する。
   ============================================================================= */
:root {
  --ink: #14171f;
  --ink-soft: #565e70;
  --ink-deep: #0a0d14;
  --accent: #2f5fe0;
  --accent-deep: #1e3fa5;
  --accent-bright: #5b86f5;
  --paper: #f6f7fa;
  --paper-deep: #eceef4;
  --white: #ffffff;
  --red: #b3261e;

  --line: rgba(20, 23, 31, 0.12);
  --tint: rgba(47, 95, 224, 0.09);
  --shadow: 0 1px 2px rgba(20, 23, 31, 0.05), 0 8px 24px rgba(20, 23, 31, 0.06);

  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --radius: 12px;
  --radius-sm: 6px;
  --bar-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* iOS で選択肢を素早く連打したときに拡大されないようにする */
  touch-action: manipulation;
}

h1 { margin: 0; line-height: 1.45; font-weight: 700; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  padding: 0.5rem 1rem; background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); color: var(--accent-deep); text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 1rem; }

/* α版の帯。試作であることを最初に伝える */
.alpha {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 20px; padding-top: calc(9px + env(safe-area-inset-top));
  background: var(--ink); color: var(--white);
  font-size: 0.72rem; line-height: 1.65;
}
.alpha b {
  flex-shrink: 0; padding: 1px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); font-size: 0.72rem;
}
.alpha + .bar { top: 0; }

/* ヘッダ。実機のステータスバーは描かない（重なって二重に見えるため） */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  height: var(--bar-h); padding: 0 20px;
  padding-top: env(safe-area-inset-top);
  background: var(--white); border-bottom: 1px solid var(--line);
}
.bar__back {
  width: 32px; height: 32px; margin-left: -8px; padding: 0;
  border: 0; background: none; color: var(--ink-soft);
  font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.bar__title { font-weight: 700; font-size: 1.06rem; }
.bar__step { margin-left: auto; font-size: 0.78rem; color: var(--ink-soft); }

.progress { display: flex; gap: 6px; padding: 14px 20px 0; }
/* display を持たせた要素は hidden 属性が効かなくなる。明示的に消す */
.progress[hidden] { display: none; }
.progress span { flex: 1; height: 3px; border-radius: 999px; background: var(--paper-deep); }
.progress span.on { background: var(--accent); }

.screen { padding: 24px 20px 32px; max-width: 560px; margin: 0 auto; }
.screen[hidden] { display: none; }

.lede { font-size: 1.9rem; line-height: 1.35; letter-spacing: 0.01em; margin-bottom: 14px; }
.q { font-size: 1.4rem; margin-bottom: 6px; }
.note { color: var(--ink-soft); font-size: 0.94rem; }
.note--small { font-size: 0.78rem; line-height: 1.75; }
.note--center { text-align: center; }
.q + .note { margin-bottom: 22px; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 0.94rem;
}
.steps__n {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--tint); color: var(--accent-deep);
  font-size: 0.86rem; font-weight: 700;
}

/* 選択肢。指で押す前提なので高さを詰めない */
.choices { display: flex; flex-direction: column; gap: 10px; }

/* 都道府県は47個ある。縦一列だと探せないので格子に並べる */
.choices--grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.choices--grid .choice {
  min-height: 52px; padding: 12px 8px; text-align: center; font-size: 0.94rem;
}
@media (max-width: 380px) { .choices--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice {
  width: 100%; min-height: 60px; padding: 14px 18px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 500; cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.choice small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--ink-soft); margin-top: 3px; }
.choice[aria-pressed="true"], .choice.on { border-color: var(--accent); background: var(--tint); }

/* 結果画面の絞り込み。**質問ではなく、出てから絞るもの。**
   従業員数は実測で効きが薄く（jGrants 357件中295件が「制約なし」）、
   3つの質問に置くには弱い。出てきた一覧を減らす道具として置く */
.refine {
  margin-top: 20px; padding: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.refine__label { font-size: 0.86rem; font-weight: 700; margin-bottom: 10px; }
.choices--row { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.choices--row .choice {
  width: auto; min-height: 40px; padding: 8px 14px;
  font-size: 0.86rem; font-weight: 400;
}
.refine .note { margin-top: 10px; }

.foot { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }

.btn {
  width: 100%; min-height: 56px; padding: 0 20px;
  border: 0; border-radius: var(--radius);
  font: inherit; font-size: 1.06rem; font-weight: 700; cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:disabled { background: var(--paper-deep); color: var(--ink-soft); cursor: default; }
.btn--ghost {
  min-height: 44px; font-size: 0.86rem; font-weight: 500;
  background: var(--white); color: var(--accent-deep); border: 1px solid var(--line);
}

.caution {
  margin: 0 0 18px; padding: 11px 13px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.78rem; line-height: 1.7; color: var(--ink-soft);
}
.caution strong { color: var(--ink); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 12px;
}
.card--center { text-align: center; }
.card__title { font-size: 1rem; line-height: 1.5; font-weight: 700; margin-bottom: 8px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 10px; }
.card__reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; line-height: 1.65; }
.card__reasons li { display: flex; gap: 7px; }
.card__reasons .ok { color: var(--accent-deep); font-weight: 700; }
.card__reasons .ask { color: var(--ink-soft); }
.card__link { display: inline-block; margin-top: 12px; font-size: 0.86rem; color: var(--accent-deep); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.tag {
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700;
  background: var(--tint); color: var(--accent-deep); border: 1px solid rgba(47, 95, 224, 0.28);
}
.tag--action { background: var(--white); font-weight: 400; border-color: var(--accent-bright); }
.tag--stale { background: var(--white); color: var(--red); border-color: rgba(179, 38, 30, 0.4); }

/* =============================================================================
   入口の2本立て。
   スマホは縦に積んで「探す」を先に出す。申請書づくりは様式ファイルを扱うので、
   画面が広いときだけ入口のボタンを出し、狭いときは「パソコンで」とだけ伝える。
   ============================================================================= */
.paths { display: flex; flex-direction: column; gap: 26px; margin-top: 26px; }
.path { display: flex; flex-direction: column; }
.path + .path { border-top: 1px solid var(--line); padding-top: 26px; }
.path__title { font-size: 1.16rem; line-height: 1.5; font-weight: 700; margin: 0 0 6px; }
.path__foot { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.path__foot .note--center { margin: 0; }

/* リンクをボタンとして使うので、高さと中央寄せを自前で作る */
.path__go {
  display: none; align-items: center; justify-content: center;
  text-decoration: none; min-height: 48px;
}
.path__pc-only { display: block; }

.steps--plain li { box-shadow: none; background: var(--paper-deep); border-color: transparent; }

@media (min-width: 760px) {
  .screen--start { max-width: 880px; }
  .paths { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
  .path {
    padding: 22px; background: var(--white);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .path + .path { border-top: 1px solid var(--line); padding-top: 22px; }
  .path .steps li { box-shadow: none; }
  .path__foot { margin-top: auto; padding-top: 22px; }
  .path__go { display: flex; }
  .path__pc-only { display: none; }
}

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