/*
  検索向けのサイト紹介と、読み込み中の表示の見た目。`index.html` の head から、JS より先に読む。

  ここに置く理由: 紹介の静的 HTML（`src/content/siteIntroHtml.ts`）は `#root` に入っていて、React が描くまで見える。
  dev サーバでは `src/index.css` が JS から後で入るので、CSS がここに無いと飾りの無い文章が一瞬見える。
  CSP は `style-src 'self'` で、インラインの style 属性と <style> は使えない。だから同じオリジンの CSS ファイルにする。
  画面側の `SiteIntro.tsx`（`MinSizeGate` の下）も同じクラスを使うので、`src/index.css` には同じ定義を持たない（二重定義にしない）。

  ⚠️ Tailwind を通らない素の CSS。値は Tailwind の slate 系と px 建ての寸法（`tailwind.pxScale.js`）に合わせてある。
  ⚠️ preflight（`src/index.css`）に頼らない。dev では preflight がまだ無い時間に見えるので、余白・見出しの大きさは自分で決める。
  ⚠️ 紹介を `display: none`・`visibility: hidden`・極小の文字・画面の外への追い出しで隠さない。検索エンジンに
  隠しテキストと見なされうる。最初の画面は読み込み中の表示だけにして、紹介は 100vh の下に普通に置き、スクロールで読める。
  読み込み中のマーク（`.boot-splash__mark`）だけは動く。2026-10-21 オーナー訂正: 動いてよいのは、React が描いたら
  静的 HTML ごと置き換わって消える、この読み込みの間だけ。盤に常駐して iPad を熱くする演出（動き続けるアニメーション
  の禁止）には当たらない。動かすのは transform と opacity だけ。
  ⚠️ 読み込みが速ければ見えないよう、300ms 待ってからフェードインする（Why not: すぐ出す。速い回線では一瞬だけ
  チラついて見える）。端末の「視差効果を減らす」では回さず、フェードインだけの静止表示にする。
*/

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  /* `src/index.css` の `html, body, #root` と同じ地の色・文字色・書体。React に切り替わる瞬間にちらつかないようにする */
  font-family: 'M PLUS 2', sans-serif;
  color: #e2e8f0;
  background: #020810;
}

/* 読み込み中の表示。最初の1画面ぶんを占め、紹介はその下から始まる */
.boot-splash {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 20px;
  background: #020810;
}
.boot-splash__logo {
  display: block;
  width: min(297px, 70vw);
  height: auto;
}
/*
  読み込み中のマーク。アプリの共通のスピナー（`src/components/ui/Spinner.tsx` の `size="lg" tone="onDark"`）と
  同じ意匠を素の CSS で写したもの: 輪＋中央のバー＋内円の3層（正面から見たボール）。
  ⚠️ 逆向きの注意: `Spinner.tsx` を変えたら、ここも直す。リロードした `/review/<id>` では React が描いたあとに
  `src/pages/ReviewPage.tsx` の `ReviewLoading` がこの表示（ロゴ・マーク・文言の並びと寸法）を写して続くので、並びや寸法を変えたらそちらも直す。
  ⚠️ Spinner の見た目を変えるときは、ここも直す（寸法 h-7 w-7・各層の色・枠・影・回転の 1s linear）。
  色は Tailwind の slate / cyan の値を rgb() で書いてある（slate-200/20 などの括弧内は元の指定）。
  最初の 300ms は透明で、そのあとフェードインする。
*/
.boot-splash__mark {
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 28px;
  height: 28px;
  opacity: 0;
  animation: boot-splash-fade 200ms ease-out 300ms forwards;
}
.boot-splash__mark > * {
  position: absolute;
  box-sizing: border-box;
}
/* 輪: border-slate-200/20 border-t-cyan-200/95 border-r-cyan-100/70 bg-slate-950/45 shadow 0 0 16px cyan-400/18 */
.boot-splash__mark-ring {
  inset: 0;
  border: 2px solid rgba(226, 232, 240, 0.2);
  border-top-color: rgba(165, 243, 252, 0.95);
  border-right-color: rgba(207, 250, 254, 0.7);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.45);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.18);
}
/* 中央のバー: bg-slate-100/40、左右 2px 内側・高さ 2px */
.boot-splash__mark-bar {
  left: 2px;
  right: 2px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(241, 245, 249, 0.4);
}
/* 内円: 10px・border slate-100/70・bg slate-950/90 */
.boot-splash__mark-hub {
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(241, 245, 249, 0.7);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.9);
}
@media (prefers-reduced-motion: no-preference) {
  .boot-splash__mark {
    animation:
      boot-splash-fade 200ms ease-out 300ms forwards,
      boot-splash-spin 1s linear infinite;
  }
}
@keyframes boot-splash-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes boot-splash-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.boot-splash__text {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.site-intro-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 672px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px 20px;
}
.site-intro {
  text-align: left;
  font-size: 14px;
  line-height: 1.625;
  color: #cbd5e1;
}
.site-intro :where(h1, h2, h3, p, dl, dt, dd) {
  margin: 0;
  padding: 0;
}
.site-intro__title {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.375;
  color: #f1f5f9;
  text-wrap: balance;
  /* 題は空白（「ツール」と「PokecaBoard」の間）でだけ折る。語の途中（「ツー／ル」）で折れていた（2026-10-21） */
  word-break: keep-all;
}
.site-intro__section {
  margin-top: 24px;
}
.site-intro__heading {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #f1f5f9;
}
.site-intro__text {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.625;
  color: #cbd5e1;
}
.site-intro__faq {
  margin-top: 12px;
}
.site-intro__question {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #67e8f9;
}
.site-intro__question:first-child {
  margin-top: 0;
}
.site-intro__note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.625;
  color: #94a3b8;
}

/*
  トップの紹介の「ガイド」の節（リンクの一覧）と、ガイドページ3枚（`/guide/`・`/guide/replay/`・`/faq/`。
  `src/content/guidePagesHtml.ts` が書き出す静的な HTML）で使う部品。トップの紹介と同じ地・文字色・書体のまま、
  手順の番号・箇条書き・リンク・アプリへのボタンだけを足す。色は盤の cyan 系（文字は -300、枠は -400、背景は -950）に合わせる。
  ⚠️ トップの紹介（`SiteIntro.tsx`）も同じクラスを使う。クラス名を変えるときは `siteIntroHtml.ts` と両方を直す。
*/
.site-intro__links {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.site-intro__links-item {
  margin-top: 12px;
}
.site-intro__links-item:first-child {
  margin-top: 0;
}
.site-intro__link {
  font-size: 14px;
  font-weight: 700;
  color: #67e8f9;
  text-underline-offset: 3px;
}
.site-intro__link:focus-visible,
.site-intro__button:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.site-intro__link-text {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.625;
  color: #94a3b8;
}
.site-intro__list {
  margin: 8px 0 0;
  padding-left: 20px;
}
.site-intro__list-item {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.625;
  color: #cbd5e1;
}
.site-intro__steps {
  margin: 12px 0 0;
  padding-left: 24px;
}
.site-intro__step {
  margin-top: 16px;
  padding-left: 4px;
}
.site-intro__step:first-child {
  margin-top: 0;
}
.site-intro__step::marker {
  font-weight: 700;
  color: #67e8f9;
}
.site-intro__step-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}
.site-intro__cta {
  margin: 20px 0 0;
}
.site-intro__button {
  display: inline-block;
  box-sizing: border-box;
  padding: 10px 20px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 12px;
  background: rgba(8, 51, 68, 0.6);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #67e8f9;
  text-decoration: none;
}
.guide-page__header {
  margin-bottom: 24px;
}
.guide-page__logo {
  display: block;
  width: min(180px, 50vw);
  height: auto;
}

/*
  存在しないパスで返す `public/404.html` の見た目。React は載らない静的な1枚なので、同じ地の色・書体のまま
  短い案内とトップへのリンクだけを置く。リンクの色は盤の cyan 系（文字は -300）に合わせる。
*/
.not-found {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 20px;
  text-align: center;
}
.not-found__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: #f1f5f9;
}
.not-found__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.625;
  color: #cbd5e1;
}
.not-found__link {
  font-size: 14px;
  font-weight: 700;
  color: #67e8f9;
}
