@charset "utf-8";

/* ---------------------------------
   ページ全体の初期設定
--------------------------------- */

/* すべての要素のサイズ計算方法を統一（枠線や余白もサイズに含める） */
* {
  box-sizing: border-box;
}

/* ページ全体の基本デザイン */
body {
  margin: 0; /* ブラウザ標準の余白をなくす */
  font-family: "M PLUS 1p", sans-serif; /* 日本語でも読みやすいWebフォント */
  background-color: #f5f5f5; /* 薄いグレー背景 */
  color: #333; /* 文字は濃いグレー */
  padding-top: 80px;
}

/* ---------------------------------
   ヘッダー（ページ上部に固定）
--------------------------------- */
.site-header {
  position: fixed; /* スクロールしても位置が変わらない */
  top: 0; left: 0; right: 0;
  z-index: 1000; /* 前面に表示 */
  display: flex; /* 横並びにする */
  justify-content: space-between; /* 左右に分ける */
  align-items: center; /* 縦方向の中央揃え */
  padding: 10px 30px;
  background: rgba(255,255,255,0.10); /* 半透明の白背景 */
  backdrop-filter: saturate(1.1) blur(4px); /* 背景を少し鮮やか＆ぼかす */
}

.brand {
  display: inline-flex; /* 画像と文字を横並び */
  align-items: center;
  gap: 10px; /* 画像と文字の間隔 */
  text-decoration: none; /* 下線なし */
}

.brand-mark {
  height: 44px; /* ロゴの高さ */
  width: auto; /* 縦横比を保つ */
}

.brand-text {
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1; /* 行間詰め */
  color: #333;
  white-space: nowrap; /* 改行させない */
}



.site-nav ul {
  list-style: none; /* 行頭の●を消す */
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* ---------------------------------
   メインの背景エリア（ヒーロー部分）
--------------------------------- */
.hero {
  position: relative; /* 子要素（恐竜など）の配置の基準にする */
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 80px); /* 画面の高さからヘッダー分を引く */
  padding-top: 6px;
  padding-bottom: 84px; /* フッター分＋安全余白 */
  background-image: url("../images/hero-bg.jpg"); /* 背景画像 */
  background-size: cover; /* 画像を全体に広げる */
  background-position: center; /* 画像の表示位置を中央に */
  overflow: hidden; /* はみ出し部分を隠す */
}

/* 恐竜イラスト（左右） */
.hero-dino {
  position: absolute;
  z-index: 3;
  width: auto;
  height: auto;
}

.hero-dino.left {
  left: -10vw; /* 少し画面外に出す */
  top: 48%; /* 縦の真ん中に置く */
  transform: translateY(-50%); /* 画像の中心を基準に */
  height: 70vh; /* 画面高さの70% */
}

.hero-dino.right {
  right: -8vw;
  top: 25%;
  height: 50vh;
}

/* 真ん中のコンテンツ（動物画像・タイトル・ボタン） */
.hero-center {
  text-align: center;
  z-index: 2; /* 恐竜より前に表示 */
  max-width: 640px;
  margin: 10px auto;
  padding: 0 8vw; /* 両端に余白（恐竜と重ならないように） */
}

.photo-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}

.animal-photo {
  height: 170px;
  width: auto;
  object-fit: contain; /* 画像を切らずに縮小 */
}

.hero-title {
  font-size: 3em;
  color: #333;
  display: inline-block;
  padding: 0 20px;
  border-radius: 12px;
  margin: -5px 0;
  line-height:1.05;
  font-family: "M PLUS Rounded 1c", "M PLUS 1p", "Noto Sans JP", sans-serif;
  font-weight: 800; /* ← グーグルフォントで読み込んだ太さに合わせる */
  letter-spacing: 0.02em; /* 詰めすぎ防止の微調整 */
}

.hero-title span {
  display: block;
}

.hero-description {
  max-width: 500px;
  margin: 10px auto 14px;
  padding: 0 10px;
  color: #444;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
  text-align: left;
  text-shadow: 0 1px 8px rgba(255,255,255,.9);
}

.hero-prototype {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: #666;
  font-size: 12px;
  line-height: 1.4;
}

.hero-prototype strong {
  color: #555;
  font-size: 13px;
}

@media (min-width: 769px) {
  .hero-center {
    transform: translateY(-14px);
  }
}



.hero-button {
  font-size: 1.5em;
  text-decoration: none;
  color: #ffffff;
  background-color: #ff9900;
  padding: 11px 30px;
  border-radius: 30px;
  cursor: pointer;
}

.hero-button:hover {
  background-color: #ff7700;
}

.hero-info-link {
  display: inline-block;
  max-width: min(92vw, 460px);
  margin-top: 12px;
  padding: 9px 16px;
  border: 1px solid rgba(66, 165, 245, 0.45);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  color: #2b5d7d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}

.hero-info-link:hover {
  background: #fff;
  color: #174664;
}

/* ---------------------------------
   フッター（ページ下部に固定）
--------------------------------- */
.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 50px;
  z-index: 1000;
  background: rgba(255,255,255,0.35);
  backdrop-filter: saturate(1.1) blur(8px);/* 背景に彩度を1.1倍（110%）、８pxのぼかし効果 */
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-mark {
  height: 22px;
  width: auto;
}

.footer-brand {
  font-weight: 700;
  color: #333;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desktop-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-nav a {
  color: #333;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.header-subtitle,
.mobile-footer-links {
  display: none;
}

@media (min-width: 769px) {
  body:not([class]) .site-footer {
    height: auto;
    min-height: 70px;
    padding: 6px 24px;
  }

  body:not([class]) .footer-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand links"
      "copy copy";
    align-items: center;
    justify-content: center;
    gap: 4px 18px;
    max-width: 1180px;
  }

  body:not([class]) .footer-left {
    grid-area: brand;
    justify-content: center;
    white-space: nowrap;
  }

  body:not([class]) .footer-nav {
    display: contents;
  }

  body:not([class]) .desktop-footer-links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
  }

  body:not([class]) .desktop-footer-links a {
    white-space: nowrap;
  }

  body:not([class]) .footer-nav small {
    grid-area: copy;
    display: block;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
  }
}


















/* =========================
   input-name.php 専用スタイル
   （このページだけに効くよう.page-inputで範囲設定）
========================= */

/* ページ全体で余計なスクロールを禁止 */
/* html にクラスは付けられないため body で代替。高さは 100vh で確保 */
.page-input {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 全要素のサイズ計算を「枠や余白込み」にする設定 */
.page-input * {
  box-sizing: border-box;
}

/* ページ全体の基本設定 */
.page-input {
  margin: 0;
  font-family: "M PLUS 1p", sans-serif;
  color: #333;
  background-color: #f5f5f5;
  padding-top: 80px; /* 固定ヘッダーぶんの余白 */
}

/* ==== 中央ステージ ==== */
.page-input .stage {
  position: relative;
  min-height: calc(100vh - 80px);
  height: auto;
  padding: 10px 0 76px;
  overflow-x: hidden;
  overflow-y: visible;
  background-image: url("../images/hero-bg.jpg"); /* 背景画像（indexと同じ）※CSSからの相対に変更 */
  background-size: cover;
  background-position: center;
  /* background-position: 50% 45%; */
}

.page-input .stage-title {
  margin: 0 auto 8px;
  padding: .2em .6em;
  text-align: center;
  font-size: clamp(22px, 3.2vw, 34px);
  color: #333;
  text-shadow: 0 2px 8px rgba(255,255,255,.7);
}

/* 恐竜の飾り */
.page-input .side-dino {
  position: absolute;
  z-index: 2;
  width: auto;
  pointer-events: none;
  max-height: 95vh;
}

.page-input .side-dino.left {
  left: -14vw;
  top: 10vh;
  height: 64vh;
}

.page-input .side-dino.right {
  right: -18vw;
  top: 25vh;
  height: 48vh;
}

/* ==== UIエリア ==== */
.page-input .ui {
  position: relative;
  z-index: 3;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2vw;
  text-align: center;
}

/* 入力内容を表示するボックス */
.page-input #nameOutput {
  display: flex; /* 中の文字を縦横に配置するため */
  align-items: center; /* 縦方向の中央寄せ */
  justify-content: flex-start; /* 左寄せ（中央寄せにしたければ center） */
  font-size: 34px;
  letter-spacing: 0;
  margin: 6px auto 8px;
  padding: 0 14px; /* 上下は0にして高さ固定 */
  border: 1px solid #ccc;
  width: 90%;
  max-width: 520px;
  height: 50px; /* 高さを固定（入力しても変わらない） */
  background: #fff;
  border-radius: 10px;
  overflow: hidden; /* 長すぎる文字がはみ出ないように */
}

.page-input #nameOutput:focus {
  border-color: #f4a94f;
  box-shadow: 0 0 0 4px rgba(244, 169, 79, .24);
  outline: none;
}

.page-input #nameOutput:focus::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1.2em;
  margin-left: 4px;
  border-radius: 999px;
  background: #f4a94f;
  animation: name-caret-blink 1s steps(2, start) infinite;
}

@keyframes name-caret-blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

/* ボタン行 */
.page-input .form-row {
  margin: 10px auto 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: min(100%, 380px);
}

.page-input .next-button,
.page-input #deleteButton,
.page-input .small-helper {
  font-size: 16px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.page-input .next-button {
  flex: 0 0 min(100%, 340px);
  order: 1;
  background: #f4a94f;
  color: #4a2d08;
}

.page-input .next-button:hover {
  background: #ef982f;
}

.page-input #deleteButton {
  flex: 0 1 calc(50% - 5px);
  order: 2;
  background: #fff7e6;
  color: #6b4b1f;
  border: 2px solid rgba(229, 172, 88, .55);
}

.page-input .small-helper {
  flex: 0 1 calc(50% - 5px);
  order: 3;
  background: #f2fbf9;
  color: #245c68;
  border: 2px solid rgba(128, 199, 213, .55);
}

.page-input #deleteButton:hover {
  background: #ffefcf;
}

.page-input .small-helper:hover {
  background: #e3f7f3;
}

.page-input .name-skip-area {
  display: flex;
  justify-content: center;
  width: min(100%, 410px);
  margin: -6px auto 8px;
}

.page-input .skip-name-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 400px);
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid rgba(128, 199, 213, .78);
  border-radius: 999px;
  background: #f7fdfc;
  color: #245c68;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(36, 92, 104, .12);
}

.page-input .skip-name-button:hover {
  background: #e9f8fb;
}

.page-input .parent-name-note {
  width: min(100%, 560px);
  margin: 12px auto 0;
  padding: 8px 14px;
  border: 2px solid rgba(255, 193, 111, .72);
  border-radius: 16px;
  background: rgba(255, 252, 244, .94);
  box-shadow: 0 5px 16px rgba(85, 61, 28, .1);
  color: #4b3a24;
  text-align: left;
}

.page-input .parent-name-note h2 {
  margin: 0 0 2px;
  color: #6b4b1f;
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

.page-input .parent-name-note p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* ひらがなパレットの囲い */
.page-input .grid-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin: 10px auto 0;
}

/* 左の縦列 */
.page-input .mark-col {
  display: grid;
  grid-template-rows: repeat(5, 50px);
  grid-auto-columns: 50px;
  gap: 5px;
}

.page-input .mark-col button {
  width: 50px;
  height: 50px;
  font-size: 20px;
}

.page-input .mark-col .small {
  font-size: 16px;
}

/* 五十音グリッド */
.page-input .grid {
  display: grid;
  grid-template-rows: repeat(5, 50px);
  grid-template-columns: repeat(11, 50px);
  justify-content: center;
  gap: 5px;
}

.page-input .grid button {
  width: 50px;
  height: 50px;
  font-size: 18px;
}

.page-input .grid button:disabled {
  visibility: hidden; /*要素は非表示。場所は確保 */
}




















/* =========================
   question pages 共通
   ※ 各ページとも <body class="page-quiz"> を付与
========================= */

/* ------------------------------------------------------------
   ベース（input-name.php から流用：共通の見た目・固定配置）
------------------------------------------------------------ */

/* すべての要素のサイズ計算に padding と border を含める（ズレ防止） */
.page-quiz * {
  box-sizing: border-box;
}

/* ページを1枚に固定（縦横スクロールを止める）
   - htmlは範囲設定（スコープ）できないため、body（= .page-quiz）で代替
*/
.page-quiz {
  height: 100vh;
  overflow: hidden;
}

/* ページ全体の基本セット */
.page-quiz {
  margin: 0;
  font-family: "M PLUS 1p", sans-serif; /* 読みやすい日本語フォント系 */
  color: #333;
  background-color: #f5f5f5;
  padding-top: 80px; /* 固定ヘッダー分の上余白（重なり防止） */
}

/* ヘッダー（固定） */
.page-quiz .site-header {
  position: fixed; /* 画面上部に固定 */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* 前面へ */
  display: flex; /* 横並び */
  justify-content: space-between; /* 左右に配置 */
  align-items: center; /* 縦中央 */
  padding: 10px 30px;
  background: rgba(255,255,255,0.10); /* 半透明の白 */
  backdrop-filter: saturate(1.1) blur(4px);/* 少し鮮やかに＆ぼかし（対応ブラウザ） */
}

/* ロゴ＋サイト名リンク */
.page-quiz .brand {
  display: inline-flex; /* インラインで横並び */
  align-items: center; /* 縦中央 */
  gap: 10px; /* すき間 */
  text-decoration: none; /* 下線なし */
}
.page-quiz .brand-mark {
  height: 44px; /* ロゴ高さ */
  width: auto; /* 比率維持 */
  display: block; /* 画像の隙間対策 */
}
.page-quiz .brand-text {
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1; /* 行間詰め */
  color: #333;
  white-space: nowrap; /* 改行しない */
}



/* ヘッダーナビ（見た目だけ。リンク先はダミーでもOK） */
.page-quiz .site-nav ul {
  list-style: none; /* 行頭の点を消す */
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.page-quiz .site-nav a {
  text-decoration: none; /* 下線なし */
  color: #333;
  font-weight: bold; /* 少し太字 */
}

/* 中央ステージ（固定の背景エリア。input-name.php と同じ） */
.page-quiz .stage {
  position: relative; /* 子要素の基準にする */
  height: calc(100vh - 80px); /* 画面高 − ヘッダー高（固定） */
  padding: 16px 0 calc(64px + 20px); /* 下にフッター64px＋安全20px（潜り込み防止） */
  overflow: hidden; /* はみ出しを隠す */
  background-image: url("../images/hero-bg.jpg"); /* index と同じ背景画像で世界観統一（CSSからの相対パス） */
  background-size: cover; /* 画面を埋め尽くす */
  background-position: center;
  /* background-position: 50% 40%; */
  background-attachment: fixed; /* スクロール錯視を抑える（雰囲気合わせ） */
}

/* ステージの見出し（問題文をここに出す） */
.page-quiz .stage-title {
  margin: 20px auto 14px;
  padding: .2em .6em; /* 文字の周りの余白 */
  text-align: center;
  font-size: clamp(22px, 3.2vw, 34px); /* 画面幅で可変 */
  color: #333;
}

.page-quiz .player-name {
  display: inline-block;
  color: #555;
  font-size: .78em;
  font-weight: 700;
  line-height: 1.3;
}

.page-quiz .question-text {
  color: #333;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .16em .42em;
  max-width: min(92vw, 17em);
  margin-top: 4px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.42em;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
  text-align: center;
}

.page-quiz .question-phrase {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.page-quiz .question-text--stacked {
  display: inline-block;
}

.page-quiz .question-text--stacked .question-phrase {
  display: block;
}

/* 左右の恐竜（飾り・位置は input-name.php と同じで統一） */
.page-quiz .side-dino {
  position: absolute; /* 自由配置 */
  z-index: 3; /* UIよりうしろ寄り */
  width: auto; /* 比率維持 */
  pointer-events: none; /* クリックを素通り（UI操作の邪魔をしない） */
  max-height: 95vh; /* 画面より大きくしすぎない */
}
.page-quiz .side-dino.left {
  left: -14vw; /* さらに左へオフセット */
  top: 10vh; /* 少し下げる */
  height: 64vh; /* 大きさ */
  transform-origin: left center; /* 変形の支点 */
}
.page-quiz .side-dino.right {
  right: -18vw; /* 右へオフセット */
  top: 20vh; /* 少し下げる */
  height: 48vh; /* 大きさ */
  transform-origin: right top; /* 変形の支点 */
}

/* UI コンテナ（中央の中身をまとめる。動物写真と正解・不正解部分と次の問題へ部分） */
.page-quiz .ui {
  position: relative; /* ステージ内の通常配置 */
  z-index: 2; /* 恐竜より前に出す */
  max-width: 960px; /* 横幅の上限（写真5枚用に少し広め） */
  margin: 25px auto 0; /* 中央寄せ */
  padding: 0 2vw; /* 端の恐竜と干渉しづらく */
  text-align: center; /* 中央揃え */
}

/* ------------------------------------------------------------
   ★ ここから「中央UIの差し替え部分（input-name.php → 問題パート）」
   - input-name.php の “名前入力UI” を “問題UI” に入れ替え
------------------------------------------------------------ */

/* 写真を横に5枚並べる（小さい画面でも折返さない想定） */
.page-quiz .photo-row {
  display: flex;
  justify-content: center;
  gap: 6px; /* 写真どうしの間隔 */
  margin: 16px 0 10px;
  flex-wrap: nowrap; /* 折り返さない（画面が狭い場合は画像を小さく） */
}
.page-quiz .animal-card {
  width: 160px; /* 各カードの横幅（目安） */
}
.page-quiz .animal-photo {
  width: 100%; /* カード幅いっぱい */
  height: 150px; /* 固定高さ（揃える） */
  object-fit: contain; /* 切り抜かずに収める */
  display: block; /* 画像の下の隙間対策 */
  border-radius: 10px;
}

/* 動物名のボタン（ひらがな） */
.page-quiz .answer-button {
  margin-top: 6px; /* 写真との間隔 */
  width: 100%; /* カード幅いっぱい */
  padding: 10px 12px;
  font-size: 16px;
  border: none; /* 枠なし */
  border-radius: 24px; /* 丸め */
  color: #fff;
  background: #ff9900; /* オレンジ */
  box-shadow: 0 4px 16px rgba(0,0,0,.18); /* ほんのり影 */
  cursor: pointer;
}
.page-quiz .answer-button:hover {
  background: #ff7700; /* ちょい濃いオレンジ */
}

/* 判定メッセージ（ここに せいかい／ちがうよ を出す） */
.page-quiz .judge {
  margin: 10px auto 6px;
  font-size: 20px; /* 少し大きめ */
  min-height: 28px; /* 1行ぶん確保（出し入れでガタつかないように） */
}

/* 「つぎの もんだいへ」ボタン（最初は非表示） */
.page-quiz .next-wrap {
  margin-top: 8px; /* 上の判定との間隔 */
}
.page-quiz .next-button {
  display: none; /* 最初は隠す → 回答後に出す */
  padding: 12px 20px;
  font-size: 18px; /* 文字サイズ */
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  border: none; /* 枠なし */
  border-radius: 28px; /* 丸め */
  color: #fff;
  background: #4caf50; /* 緑 */
  box-shadow: 0 4px 16px rgba(0,0,0,.18); /* 影 */
  cursor: pointer;
  text-decoration: none; /* aタグの下線を消す（ボタン見た目） */
}
.page-quiz .next-button:hover {
  background: #43a047; /* ちょい濃い緑 */
}

/* ------------------------------------------------------------
   フッター（固定）… ここも input-name.php と同じで世界観を統一
------------------------------------------------------------ */
.page-quiz .site-footer {
  position: fixed; /* 画面下部に固定 */
  left: 0;
  right: 0;
  bottom: 0;
  height: 50px; /* 高さ固定 */
  z-index: 1000; /* 前面 */
  background: rgba(255,255,255,0.10); /* 半透明の白 */
  backdrop-filter: saturate(1.1) blur(8px); /* ガラス風 */
  padding: 0 24px; /* 上下0・左右24 */
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  overflow: hidden; /* はみ出し防止 */
}
.page-quiz .footer-inner {
  max-width: 1100px; /* 最大幅 */
  margin: 0 auto; /* 中央寄せ */
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  justify-content: space-between; /* 左右に配置 */
  width: 100%; /* 幅いっぱい */
  height: 100%; /* フッター高に揃える */
}
.page-quiz .footer-left {
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  gap: 10px; /* 間隔 */
}
.page-quiz .footer-mark {
  height: 22px; /* ロゴ高さ */
  width: auto; /* 比率維持 */
  display: block; /* 画像の隙間対策 */
}
.page-quiz .footer-brand {
  font-weight: 700;
  color: #333;
}
.page-quiz .footer-nav {
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  gap: 10px; /* 間隔 */
  color: #333;
}
.page-quiz .footer-nav a {
  color: #333;
  text-decoration: none; /* 下線なし */
}
.page-quiz .footer-nav a:hover {
  text-decoration: underline; /* ホバーで下線 */
}





















/* =========================
   score.php 専用スタイル
   （このページだけに効くよう .page-score でスコープ）
   - ティラノ演出：15秒ワンショット
   - ピーク時は scale(5.0)
========================= */

/* ---- ベース ---- */
.page-score * { box-sizing: border-box; }
.page-score {
  margin: 0;
  height: 100%;
  overflow: hidden;
  padding-top: 80px;
  font-family: "M PLUS 1p", sans-serif;
  color: #333;
  background-color: #f5f5f5;
}

/* ---- ヘッダー ---- */
.page-score .site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 30px; height: 80px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: saturate(1.1) blur(4px);
}
.page-score .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.page-score .brand-mark { height: 44px; width: auto; display: block; }
.page-score .brand-text { font-weight: 800; font-size: clamp(16px, 1.8vw, 21px); line-height: 1; color: #333; white-space: nowrap; }
.page-score .site-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.page-score .site-nav a { text-decoration: none; color: #333; font-weight: bold; }

/* ---- ステージ ---- */
.page-score .stage {
  position: relative;
  height: calc(100vh - 80px);
  padding: 16px 0 calc(64px + 20px);
  overflow: visible;
  background-image: url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.page-score .stage-title {
  margin: 20px auto 14px;
  padding: .2em .6em;
  text-align: center;
  font-size: clamp(22px, 3.2vw, 34px);
  color: #333;
}
.page-score .player-name { font-size: 1.2em; }
.page-score .result-text { font-size: 1.4em; line-height: 1.4; }

/* ---- 左右の恐竜 ---- */
.page-score .side-dino {
  position: absolute; z-index: 2; width: auto; pointer-events: none; max-height: 95vh;
}
.page-score .side-dino.left  { left: -14vw; top: 10vh; height: 64vh; transform-origin: left center; }
.page-score .side-dino.right { right: -18vw; top: 20vh; height: 48vh; transform-origin: right top; }

/* ---- 中央ティラノ ---- */
.page-score .ui {
  position: relative; z-index: 3;
  max-width: 960px; margin: 25px auto 0; padding: 0 2vw;
  text-align: center;
}
.page-score .sway-wrap {
  width: 100%; display: flex; justify-content: center; align-items: center;
  position: relative; z-index: 10; overflow: visible;
}
.page-score .sway-dino {
  display: block; margin: 0 auto;
  height: 120px; width: auto;
  background: transparent;
  transform-origin: 50% 80%;
  will-change: transform, filter;
  filter: drop-shadow(0 0 0 rgba(255,215,0,0));
  animation: tyrano-one-shot-giant 15s ease-in-out 0s 1 both;
}
.page-score.is-perfect .sway-dino {
  animation: tyrano-one-shot-perfect 15s ease-in-out 0s 1 both;
}

/* ---- ティラノ通常演出 ---- */
@keyframes tyrano-one-shot-giant {
  0%   { transform: rotate(0deg) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
  12%  { transform: rotate(-10deg) scale(2.0) translateY(-10px);
         filter: drop-shadow(0 0 6px rgba(255,215,0,0.8)) drop-shadow(0 0 12px rgba(255,255,0,0.7)) drop-shadow(0 0 18px rgba(255,255,255,0.5)); }
  28%  { transform: rotate(8deg) scale(3.2) translateY(0);
         filter: drop-shadow(0 0 10px rgba(255,215,0,0.9)) drop-shadow(0 0 18px rgba(255,255,0,0.85)) drop-shadow(0 0 26px rgba(255,255,255,0.6)); }
  50%  { transform: rotate(0deg) scale(5.0) translateY(-24px);
         filter: drop-shadow(0 0 16px rgba(255,215,0,1)) drop-shadow(0 0 28px rgba(255,255,0,0.95)) drop-shadow(0 0 40px rgba(255,255,255,0.8)); }
  70%  { transform: rotate(-6deg) scale(2.8) translateY(-10px);
         filter: drop-shadow(0 0 8px rgba(255,215,0,0.7)) drop-shadow(0 0 14px rgba(255,255,0,0.6)); }
  85%  { transform: rotate(6deg) scale(1.6) translateY(-4px);
         filter: drop-shadow(0 0 5px rgba(255,215,0,0.4)) drop-shadow(0 0 8px rgba(255,255,0,0.3)); }
  100% { transform: rotate(0deg) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
}

/* ---- ティラノ満点演出 ---- */
@keyframes tyrano-one-shot-perfect {
  0%   { transform: rotate(0deg) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
  10%  { transform: rotate(-12deg) scale(2.2) translateY(-16px);
         filter: drop-shadow(0 0 10px rgba(255,215,0,0.9)) drop-shadow(0 0 18px rgba(255,235,59,0.9)) drop-shadow(0 0 26px rgba(255,255,255,0.8)); }
  25%  { transform: rotate(8deg) scale(3.6) translateY(0);
         filter: drop-shadow(0 0 14px rgba(255,215,0,1)) drop-shadow(0 0 24px rgba(255,235,59,0.95)) drop-shadow(0 0 36px rgba(255,255,255,0.85)); }
  50%  { transform: rotate(360deg) scale(5.0) translateY(-40px);
         filter: drop-shadow(0 0 20px rgba(255,215,0,1)) drop-shadow(0 0 36px rgba(255,235,59,1)) drop-shadow(0 0 52px rgba(255,255,255,0.95)); }
  70%  { transform: rotate(-8deg) scale(3.0) translateY(-14px);
         filter: drop-shadow(0 0 12px rgba(255,215,0,0.9)) drop-shadow(0 0 22px rgba(255,235,59,0.85)); }
  85%  { transform: rotate(6deg) scale(1.8) translateY(-6px);
         filter: drop-shadow(0 0 8px rgba(255,215,0,0.6)) drop-shadow(0 0 14px rgba(255,235,59,0.5)); }
  100% { transform: rotate(0deg) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
}

/* ---- ボタン ---- */
.page-score .actions { margin-top: 10px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.page-score .btn {
  display: inline-block; padding: 12px 20px; font-size: 18px;
  border: none; border-radius: 28px; color: #fff;
  background: #ff9900; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  text-decoration: none; cursor: pointer;
}
.page-score .btn:hover { background: #ff7700; }
.page-score .btn.secondary { background: #607d8b; }
.page-score .btn.secondary:hover { background: #546e7a; }

.page-score .answer-review {
  width: min(90%, 520px);
  margin: 18px auto 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  text-align: left;
}

.page-score .answer-review h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  color: #333;
}

.page-score .answer-review ul {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.7;
  font-weight: 700;
}

/* ---- フッター ---- */
.page-score .site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 50px; z-index: 1000;
  background: rgba(255,255,255,0.10);
  backdrop-filter: saturate(1.1) blur(4px);
  padding: 0 24px; display: flex; align-items: center; overflow: hidden;
}
.page-score .footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 100%;
}
.page-score .footer-left { display: flex; align-items: center; gap: 10px; }
.page-score .footer-mark { height: 22px; width: auto; display: block; }
.page-score .footer-brand { font-weight: 700; color: #333; }
.page-score .footer-nav { display: flex; align-items: center; gap: 10px; }
.page-score .footer-nav a { color: #333; text-decoration: none; }
.page-score .footer-nav a:hover { text-decoration: underline; }

/* ---- アクセシビリティ ---- */
@media (prefers-reduced-motion: reduce) {
  .page-score .sway-dino,
  .page-score .support-dino {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}














/* =========================
   score.php 専用スタイル（段階制アニメ）
   - perfect / high / mid / low で秒数・拡大率・発光を調整
   - ヘッダー(z=1000)を越えるため stage=1500 / ui=2000 を付与
========================= */

/* ---- ベース（デフォルト=low） ---- */
.page-score {
  margin: 0; height: 100%; overflow: hidden; padding-top: 80px;
  font-family: "M PLUS 1p", sans-serif; color: #333; background-color: #f5f5f5;

  --anim-dur: 5s;         /* 再生時間 */
  --scale-peak: 1.8;      /* 最大拡大率 */
  --scale-mid:  1.4;      /* 中間拡大率 */
  --jump-peak: -8px;      /* 最大ジャンプ量（上方向＝マイナス） */
  --jump-mid:  -4px;      /* 中間ジャンプ量 */
  --glow-a1: .45;         /* 発光（ゴールド） */
  --glow-a2: .35;         /* 発光（イエロー） */
  --glow-a3: .25;         /* 発光（白） */
  --spin: 0deg;           /* perfectのみ360deg */
}

/* ---- 段階別（PHPで body に tier-◯ を付与） ---- */
.page-score.tier-mid {
  --anim-dur: 8s;
  --scale-peak: 2.6; --scale-mid: 1.8;
  --jump-peak: -14px; --jump-mid: -8px;
  --glow-a1: .65; --glow-a2: .55; --glow-a3: .40;
}
.page-score.tier-high {
  --anim-dur: 12s;
  --scale-peak: 3.8; --scale-mid: 2.6;
  --jump-peak: -22px; --jump-mid: -12px;
  --glow-a1: .85; --glow-a2: .75; --glow-a3: .60;
}
.page-score.tier-perfect {
  --anim-dur: 15s;
  --scale-peak: 5.0; --scale-mid: 3.6;
  --jump-peak: -40px; --jump-mid: -18px;
  --glow-a1: 1; --glow-a2: 1; --glow-a3: .95;
  --spin: 360deg; /* 1回転 */
}

/* ---- ヘッダー（参考：z=1000） ---- */
.page-score .site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 30px; height: 80px;
  background: rgba(255,255,255,0.10); backdrop-filter: saturate(1.1) blur(4px);
}
.page-score .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.page-score .brand-mark { height: 44px; width: auto; display: block; }
.page-score .brand-text { font-weight: 800; font-size: clamp(16px, 1.8vw, 21px); line-height: 1; color: #333; white-space: nowrap; }
.page-score .site-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.page-score .site-nav a { text-decoration: none; color: #333; font-weight: bold; }

/* ---- ステージ（ヘッダーより前面へ） ---- */
.page-score .stage {
  position: relative; z-index: 1500;            /* ★重要 */
  height: calc(100vh - 80px);
  padding: 16px 0 calc(64px + 20px);
  overflow: visible;                              /* 拡大で切れない */
  background-image: url("../images/hero-bg.jpg");
  background-size: cover; background-position: center; background-attachment: fixed;
}
.page-score .stage-title {
  margin: 20px auto 14px; padding: .2em .6em; text-align: center;
  font-size: clamp(22px, 3.2vw, 34px); color: #333;
}
.page-score .player-name { font-size: 1.2em; }
.page-score .result-text { font-size: 1.4em; line-height: 1.4; }

/* ---- 左右の飾り恐竜 ---- */
.page-score .side-dino {
  position: absolute; z-index: 2; width: auto; pointer-events: none; max-height: 95vh;
}
.page-score .side-dino.left  { left: -14vw; top: 10vh; height: 64vh; transform-origin: left center; }
.page-score .side-dino.right { right: -18vw; top: 20vh; height: 48vh; transform-origin: right top; }

/* ---- 中央UI＆ティラノ（さらに前面へ） ---- */
.page-score .ui {
  position: relative; z-index: 2000;             /* ★重要 */
  max-width: 960px; margin: 25px auto 0; padding: 0 2vw; text-align: center;
}
.page-score .sway-wrap {
  width: 100%; display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(12px, 3vw, 34px);
  position: relative; overflow: visible;
}
.page-score .sway-dino {
  display: block; margin: 0; height: 134px; width: auto; background: transparent;
  transform-origin: 50% 80%;
  will-change: transform, filter;
  filter: drop-shadow(0 0 0 rgba(255,215,0,0));
  animation: tyrano-generic var(--anim-dur) ease-in-out 0s 1 both; /* ワンショット */
}
.page-score .support-dino {
  display: block;
  height: 125px;
  width: auto;
  margin: 0;
  transform-origin: 48% 86%;
  will-change: transform, filter;
  filter: drop-shadow(0 8px 14px rgba(65, 45, 22, .16));
}
.page-score .support-dino.trikera-motion-perfect {
  animation: center-trikera-perfect var(--anim-dur) ease-in-out .1s 1 both;
}
.page-score .support-dino.trikera-motion-cheer {
  animation: center-trikera-cheer var(--anim-dur) ease-in-out .15s 1 both;
}
.page-score .support-dino.trikera-motion-support {
  animation: center-trikera-support var(--anim-dur) ease-in-out .2s 1 both;
}
.page-score .support-dino.trikera-motion-gentle {
  animation: center-trikera-gentle var(--anim-dur) ease-in-out .2s 1 both;
}
/* perfect だけは回転入りの別アニメへ切替 */
.page-score.tier-perfect .sway-dino { animation-name: tyrano-perfect; }

/* ---- アニメーション（filterで発光・透明維持） ---- */
@keyframes tyrano-generic {
  0%   { transform: rotate(0) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
  15%  { transform: rotate(-8deg) scale(var(--scale-mid)) translateY(var(--jump-mid));
         filter: drop-shadow(0 0 6px  rgba(255,215,0,calc(var(--glow-a1)*0.9)))
                 drop-shadow(0 0 12px rgba(255,255,0,calc(var(--glow-a2)*0.9)))
                 drop-shadow(0 0 18px rgba(255,255,255,calc(var(--glow-a3)*0.8))); }
  35%  { transform: rotate(8deg)  scale(calc((var(--scale-mid) + var(--scale-peak)) / 2)) translateY(calc((var(--jump-mid) + var(--jump-peak)) / 2));
         filter: drop-shadow(0 0 10px rgba(255,215,0,var(--glow-a1)))
                 drop-shadow(0 0 18px rgba(255,255,0,var(--glow-a2)))
                 drop-shadow(0 0 26px rgba(255,255,255,var(--glow-a3))); }
  50%  { transform: rotate(0) scale(var(--scale-peak)) translateY(var(--jump-peak));
         filter: drop-shadow(0 0 12px rgba(255,215,0,var(--glow-a1)))
                 drop-shadow(0 0 24px rgba(255,255,0,var(--glow-a2)))
                 drop-shadow(0 0 36px rgba(255,255,255,var(--glow-a3))); }
  70%  { transform: rotate(-6deg) scale(calc((1 + var(--scale-mid)) / 2)) translateY(calc(var(--jump-mid) / 2));
         filter: drop-shadow(0 0 8px  rgba(255,215,0,calc(var(--glow-a1)*0.7)))
                 drop-shadow(0 0 14px rgba(255,255,0,calc(var(--glow-a2)*0.6))); }
  85%  { transform: rotate(6deg) scale(1.2) translateY(calc(var(--jump-mid) / 4));
         filter: drop-shadow(0 0 5px rgba(255,215,0,calc(var(--glow-a1)*0.4)))
                 drop-shadow(0 0 8px rgba(255,255,0,calc(var(--glow-a2)*0.3))); }
  100% { transform: rotate(0) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
}

/* perfect 専用（50%で1回転） */
@keyframes tyrano-perfect {
  0%   { transform: rotate(0) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
  15%  { transform: rotate(-12deg) scale(var(--scale-mid)) translateY(var(--jump-mid));
         filter: drop-shadow(0 0 10px rgba(255,215,0,calc(var(--glow-a1)*0.95)))
                 drop-shadow(0 0 18px rgba(255,235,59,var(--glow-a2)))
                 drop-shadow(0 0 26px rgba(255,255,255,calc(var(--glow-a3)*0.9))); }
  30%  { transform: rotate(8deg) scale(calc((var(--scale-mid) + var(--scale-peak)) / 2)) translateY(calc((var(--jump-mid) + var(--jump-peak)) / 2));
         filter: drop-shadow(0 0 14px rgba(255,215,0,var(--glow-a1)))
                 drop-shadow(0 0 24px rgba(255,235,59,var(--glow-a2)))
                 drop-shadow(0 0 36px rgba(255,255,255,var(--glow-a3))); }
  50%  { transform: rotate(var(--spin)) scale(var(--scale-peak)) translateY(var(--jump-peak));
         filter: drop-shadow(0 0 16px rgba(255,215,0,var(--glow-a1)))
                 drop-shadow(0 0 30px rgba(255,235,59,var(--glow-a2)))
                 drop-shadow(0 0 44px rgba(255,255,255,var(--glow-a3))); }
  70%  { transform: rotate(-8deg) scale(calc((1 + var(--scale-mid)) / 2)) translateY(calc(var(--jump-mid) / 2));
         filter: drop-shadow(0 0 12px rgba(255,215,0,calc(var(--glow-a1)*0.8)))
                 drop-shadow(0 0 22px rgba(255,235,59,calc(var(--glow-a2)*0.75))); }
  85%  { transform: rotate(6deg) scale(1.25) translateY(calc(var(--jump-mid) / 4));
         filter: drop-shadow(0 0 8px rgba(255,215,0,calc(var(--glow-a1)*0.6)))
                 drop-shadow(0 0 14px rgba(255,235,59,calc(var(--glow-a2)*0.5))); }
  100% { transform: rotate(0) scale(1) translateY(0); filter: drop-shadow(0 0 0 rgba(255,215,0,0)); }
}

@keyframes center-trikera-perfect {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
    filter: drop-shadow(0 8px 14px rgba(65, 45, 22, .16));
  }
  10% { transform: translateY(8px) rotate(8deg) scale(.92); }
  22% {
    transform: translateY(-64px) rotate(-28deg) scale(2.55);
    filter: drop-shadow(0 14px 18px rgba(65, 45, 22, .18))
            drop-shadow(0 0 18px rgba(255, 218, 86, .55));
  }
  36% { transform: translateY(-8px) rotate(24deg) scale(.98); }
  50% {
    transform: translateY(-74px) rotate(360deg) scale(3.35);
    filter: drop-shadow(0 14px 18px rgba(65, 45, 22, .18))
            drop-shadow(0 0 22px rgba(255, 238, 128, .58));
  }
  66% { transform: translateY(2px) rotate(382deg) scale(.94); }
  80% { transform: translateY(-34px) rotate(346deg) scale(1.8); }
  92% { transform: translateY(-4px) rotate(360deg) scale(1.04); }
}

@media (max-width: 768px) {
  .page-score .support-dino.trikera-motion-perfect {
    animation-name: center-trikera-perfect-mobile;
  }
}

@keyframes center-trikera-perfect-mobile {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
    filter: drop-shadow(0 8px 14px rgba(65, 45, 22, .16));
  }
  10% { transform: translateY(7px) rotate(8deg) scale(.92); }
  22% {
    transform: translateY(-38px) rotate(-28deg) scale(1.65);
    filter: drop-shadow(0 14px 18px rgba(65, 45, 22, .18))
            drop-shadow(0 0 18px rgba(255, 218, 86, .48));
  }
  36% { transform: translateY(-7px) rotate(24deg) scale(.98); }
  50% {
    transform: translateY(-42px) rotate(360deg) scale(2.15);
    filter: drop-shadow(0 14px 18px rgba(65, 45, 22, .18))
            drop-shadow(0 0 18px rgba(255, 238, 128, .48));
  }
  66% { transform: translateY(2px) rotate(382deg) scale(.94); }
  80% { transform: translateY(-20px) rotate(346deg) scale(1.35); }
  92% { transform: translateY(-4px) rotate(360deg) scale(1.04); }
}

@keyframes center-trikera-cheer {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  14% { transform: translateY(6px) rotate(6deg) scale(.96); }
  30% { transform: translateY(-30px) rotate(-18deg) scale(1.22); }
  48% { transform: translateY(-5px) rotate(16deg) scale(1.02); }
  64% { transform: translateY(-22px) rotate(-10deg) scale(1.15); }
  80% { transform: translateY(1px) rotate(8deg) scale(1); }
  92% { transform: translateY(-8px) rotate(-4deg) scale(1.06); }
}

@keyframes center-trikera-support {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  18% { transform: translateY(8px) rotate(7deg) scale(.98); }
  36% { transform: translateY(-16px) rotate(-9deg) scale(1.1); }
  54% { transform: translateY(4px) rotate(7deg) scale(.99); }
  72% { transform: translateY(-10px) rotate(-5deg) scale(1.06); }
  88% { transform: translateY(1px) rotate(3deg) scale(1.02); }
}

@keyframes center-trikera-gentle {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  18% { transform: translateY(7px) rotate(5deg) scale(.98); }
  38% { transform: translateY(-12px) rotate(-6deg) scale(1.07); }
  58% { transform: translateY(4px) rotate(4deg) scale(1); }
  78% { transform: translateY(-8px) rotate(-3deg) scale(1.04); }
  92% { transform: translateY(1px) rotate(2deg) scale(1.01); }
}

/* ---- ボタン/フッター/アクセシビリティ ---- */
.page-score .actions { margin-top: 10px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.page-score .btn {
  display: inline-block; padding: 12px 20px; font-size: 18px;
  border: none; border-radius: 28px; color: #fff;
  background: #ff9900; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  text-decoration: none; cursor: pointer;
}
.page-score .btn:hover { background: #ff7700; }
.page-score .btn.secondary { background: #607d8b; }
.page-score .btn.secondary:hover { background: #546e7a; }

.page-score .site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; height: 50px; z-index: 1000;
  background: rgba(255,255,255,0.10); backdrop-filter: saturate(1.1) blur(4px);
  padding: 0 24px; display: flex; align-items: center; overflow: hidden;
}
.page-score .footer-inner {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 100%;
}
.page-score .footer-left { display: flex; align-items: center; gap: 10px; }
.page-score .footer-mark { height: 22px; width: auto; display: block; }
.page-score .footer-brand { font-weight: 700; color: #333; }
.page-score .footer-nav { display: flex; align-items: center; gap: 10px; color: #333; }
.page-score .footer-nav a { color: #333; text-decoration: none; }
.page-score .footer-nav a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .page-score .sway-dino { animation: none !important; transform: none !important; filter: none !important; }
}















/* ---------------------------------
   ボタン
--------------------------------- */
.page-score .actions {
  margin-top: 10px;
  display: flex; /* 横並び */
  justify-content: center; /* 中央寄せ */
  gap: 10px; /* 間隔 */
  flex-wrap: wrap; /* せまい画面で折り返し */
}
.page-score .btn {
  display: inline-block; /* インラインブロック */
  padding: 12px 20px;
  font-size: 18px; /* 文字サイズ */
  border: none; /* 枠なし */
  border-radius: 28px;
  color: #fff; /* 白文字 */
  background: #ff9900; /* オレンジ */
  box-shadow: 0 4px 16px rgba(0,0,0,.18); /* 影 */
  text-decoration: none; /* 下線なし */
  cursor: pointer; /* 手カーソル */
}
.page-score .btn:hover {
  background: #ff7700; /* 少し濃く */
}
.page-score .btn.secondary {
  background: #607d8b; /* 青グレー */
}
.page-score .btn.secondary:hover {
  background: #546e7a; /* 少し濃く */
}

/* ---------------------------------
   フッター（固定）
--------------------------------- */
.page-score .site-footer {
  position: fixed; /* 下に固定 */
  left: 0; /* 左端 */
  right: 0; /* 右端 */
  bottom: 0; /* 下端 */
  height: 50px; /* 高さ */
  z-index: 1000; /* 前面 */
  background: rgba(255,255,255,0.10); /* うっすら白 */
  backdrop-filter: saturate(1.1) blur(4px); /* ガラスっぽさ */
  padding: 0 24px; /* 上下0・左右24 */
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  overflow: hidden; /* はみ出し防止 */
}
.page-score .footer-inner {
  max-width: 1100px; /* 最大幅 */
  margin: 0 auto; /* 中央寄せ */
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  justify-content: space-between; /* 左右配置 */
  width: 100%; /* 幅いっぱい */
  height: 100%; /* 高さ合わせ */
}
.page-score .footer-left {
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  gap: 10px; /* 間隔 */
}
.page-score .footer-mark {
  height: 22px; /* ロゴ高さ */
  width: auto; /* 比率維持 */
  display: block; /* 隙間対策 */
}
.page-score .footer-brand {
  font-weight: 700;
  color: #333;
}
.page-score .footer-nav {
  display: flex; /* 横並び */
  align-items: center; /* 縦中央 */
  gap: 10px; /* 間隔 */
  color: #333;
}
.page-score .footer-nav a {
  color: #333; /* リンク色 */
  text-decoration: none; /* 下線なし */
}
.page-score .footer-nav a:hover {
  text-decoration: underline; /* ホバーで下線 */
}
















/* =========================
   固定ページ（howto / parents / series / contact / contact_thanks）共通
========================= */
.page-static {
  height: 100vh;
  overflow: hidden;
  padding-top: 80px;
}

/* =========================
   ステージ（背景エリア）
   ※ 背景は center に統一
========================= */
.page-static .stage {
  position: relative;
  height: calc(100vh - 80px);
  padding: 16px 0 70px;
  overflow: hidden;
  background-image: url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
}

/* =========================
   静的ページの恐竜（情報ページでは非表示）
========================= */
.page-static .side-dino {
  display: none;
  position: absolute;
  z-index: 1;
  width: auto;
  pointer-events: none;
  max-height: 74vh;
}

.page-static .side-dino.left,
.page-static .side-dino.right {
  top: 50%;
  transform: translateY(-50%);
}

.page-static .side-dino.left {
  left: clamp(-440px, -26vw, -300px);
  height: 62vh;
}

.page-static .side-dino.right {
  right: clamp(-400px, -24vw, -280px);
  height: 52vh;
}

/* =========================
   中央エリア（説明パネルを包む）
========================= */
.page-static .ui {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2vw;
  text-align: left;
}

/* =========================
   説明パネル
========================= */
.page-static .panel {
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.page-static .panel h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 36px;
  font-weight: 800;
}

/* =========================
   手順ボックス（3等分）
========================= */
.page-static .steps {
  display: flex;
  gap: 12px;
}

.page-static .step {
  flex: 1 1 0;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  font-size: 16px;
}

/* =========================
   補助テキスト
========================= */
.page-static .meta {
  margin: 12px 0 0;
  padding-left: 18px;
}

.page-static .note {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 13px;
}













/* =========================================================
   固定ページ用のまとめ（ページ別）
   ※ 既存スタイルに影響しないよう、page-◯◯ で範囲を限定
========================================================= */

/* ===== HOWTO（ゲームの遊び方） ===== */
.page-howto .howto-steps {
  margin: 0;
  padding-left: 1.4em; /* 番号分のインデント */
  list-style: decimal; /* 1,2,3…の番号 */
}

.page-howto .howto-item {
  background: #fff; /* 白背景の箱 */
  border-radius: 14px;
  padding: 10px;
  margin: 0 0 8px 0; /* 各項目の間隔 */
}

.page-howto .howto-item p {
  margin: 0;
  text-align: left; /* 本文は左寄せ */
}

.page-howto .howto-item p + p {
  margin-top: 4px; /* タイトル行との間隔 */
}

.page-howto .howto-meta {
  margin: 10px 0 0;
  padding-left: 18px; /* ● の見栄え調整 */
}


/* ===== PARENTS（保護者の方へ） ===== */
.page-parents .parents-list {
  margin: 0;
  padding-left: 18px; /* 箇条書きのインデント */
  line-height: 1.6; /* 行間ゆったり */
  text-align: left;
}

.page-parents .parents-list li {
  margin: 0 0 6px 0;
}

.page-parents .parents-list .term {
  font-weight: 700; /* 見出しを太字 */
  display: block; /* 行頭で改行表示 */
}


/* ===== SERIES（シリーズ紹介） ===== */
.page-series .series-grid {
  display: grid; /* グリッドレイアウト */
  grid-template-columns: repeat(2, 320px); /* 320px×2列 */
  justify-content: center; /* 全体を中央寄せ */
  column-gap: 6px; /* 列間の余白 */
  row-gap: 6px; /* 行間の余白 */
}

.page-series .series-card {
  padding: 8px;
}

.page-series .series-summary-link {
  margin: 0 0 12px;
  text-align: center;
}

.page-series .series-summary-link a {
  color: #1f5f91;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-series .series-title {
  font-weight: 700; /* 太字 */
  font-size: 20px; /* 少し大きめ */
  margin-bottom: 4px; /* 下余白 */
  text-align: center; /* 中央揃え */
}

.page-series .thumb {
  height: 135px; /* サムネの高さを統一 */
  display: flex; /* 画像の中央寄せ土台 */
  align-items: center; /* 縦中央 */
  justify-content: center; /* 横中央 */
  background: #fff; /* 白の土台 */
  border-radius: 10px;
}

.page-series .thumb img {
  max-width: 100%; /* はみ出し防止（横） */
  max-height: 100%; /* はみ出し防止（縦） */
  width: auto; /* 縦横比を維持 */
  height: auto; /* 縦横比を維持 */
  display: block; /* 画像下の隙間対策 */
}

.page-series .series-status {
  margin-top: 4px; /* 画像との間隔 */
  color: #666; /* サブ情報の色 */
  text-align: center; /* 中央揃え */
  font-size: 16px; /* 少し大きめ */
}

.page-series .series-set-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.page-series .series-set-links a {
  display: block;
  padding: 7px 5px;
  border: 2px solid #42a5f5;
  border-radius: 6px;
  background: #fff;
  color: #1f5f91;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.page-series .series-set-links a:hover {
  background: #eaf6ff;
}

.page-series .series-name-change {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.page-series .series-current-name {
  color: #555;
  font-size: 0.86em;
  font-weight: 700;
  text-align: center;
}

.page-series .series-name-change a {
  display: block;
  padding: 6px 8px;
  border: 1px solid #ffb74d;
  border-radius: 6px;
  background: #fff8e8;
  color: #8a5a00;
  font-size: 0.82em;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.page-series .series-name-change a:hover {
  background: #fff0c2;
}


/* ===== HIRAGANA SUMMARY（どうぶつひらがなクイズまとめ） ===== */
.page-hiragana-summary {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: 80px;
  padding-bottom: 90px;
  background: url("../images/hero-bg.jpg") center bottom / cover fixed no-repeat;
  color: #333;
}

.page-hiragana-summary .summary-page {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
  padding: 32px 0 70px;
}

.page-hiragana-summary .summary-hero,
.page-hiragana-summary .summary-section {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.page-hiragana-summary .summary-hero {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 42px clamp(24px, 18vw, 210px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-hiragana-summary .summary-hero-text {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
}

.page-hiragana-summary h1 {
  margin: 0 0 18px;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.page-hiragana-summary h1 span {
  display: inline-block;
  white-space: nowrap;
}

.page-hiragana-summary h1 span + span {
  margin-left: .35em;
}

.page-hiragana-summary .summary-hero p,
.page-hiragana-summary .summary-section p,
.page-hiragana-summary .summary-section li {
  font-size: 16px;
  line-height: 1.9;
}

.page-hiragana-summary .summary-dino {
  position: absolute;
  bottom: -8px;
  z-index: 1;
  width: clamp(90px, 15vw, 150px);
  height: auto;
  opacity: 0.42;
  pointer-events: none;
}

.page-hiragana-summary .summary-dino.left {
  left: 14px;
}

.page-hiragana-summary .summary-dino.right {
  right: 14px;
}

.page-hiragana-summary .summary-section {
  margin-top: 18px;
  padding: 26px clamp(18px, 4vw, 42px);
}

.page-hiragana-summary h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.35;
  text-align: center;
}

.page-hiragana-summary .summary-list {
  margin: 0;
  padding-left: 22px;
}

.page-hiragana-summary .summary-list li + li {
  margin-top: 6px;
}

.page-hiragana-summary .summary-age-cards,
.page-hiragana-summary .summary-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-hiragana-summary .summary-age-cards .summary-info-card:first-child {
  grid-column: 1 / -1;
}

.page-hiragana-summary .summary-info-card {
  padding: 16px 18px;
  border: 1px solid rgba(66, 165, 245, 0.28);
  border-radius: 8px;
  background: #fff;
}

.page-hiragana-summary .summary-info-card h3 {
  margin: 0 0 8px;
  color: #1f5f91;
  font-size: 18px;
  line-height: 1.35;
}

.page-hiragana-summary .summary-info-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}

.page-hiragana-summary .summary-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.page-hiragana-summary .quiz-series-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.page-hiragana-summary .quiz-series-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 16px;
  border: 2px solid #42a5f5;
  border-radius: 8px;
  background: #fff;
}

.page-hiragana-summary .quiz-series-label {
  color: #1f5f91;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.page-hiragana-summary .quiz-series-count {
  width: fit-content;
  margin: 8px auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eaf6ff;
  color: #1f5f91;
  font-weight: 700;
}

.page-hiragana-summary .quiz-series-card p {
  flex: 1;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
}

.page-hiragana-summary .quiz-series-button {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  background: #ff9900;
  color: #fff;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.page-hiragana-summary .quiz-series-button:hover {
  background: #ff7700;
}

.page-hiragana-summary .summary-faq h3 {
  margin: 16px 0 4px;
  color: #1f5f91;
  font-size: 18px;
}

.page-hiragana-summary .summary-faq h3:first-child {
  margin-top: 0;
}

.page-hiragana-summary .summary-faq p {
  margin: 0;
}

@media (max-width: 900px) {
  .page-hiragana-summary .quiz-series-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hiragana-summary .summary-dino {
    width: 120px;
    opacity: 0.5;
  }
}

@media (max-width: 600px) {
  .page-hiragana-summary .summary-page {
    width: min(100% - 20px, 1040px);
    padding-top: 18px;
  }

  .page-hiragana-summary .summary-hero {
    min-height: 0;
    padding: 28px 18px;
  }

  .page-hiragana-summary h1 {
    font-size: 30px;
    white-space: normal;
  }

  .page-hiragana-summary h1 span {
    display: block;
  }

  .page-hiragana-summary h1 span + span {
    margin-left: 0;
  }

  .page-hiragana-summary h2 {
    font-size: 23px;
  }

  .page-hiragana-summary .summary-hero p,
  .page-hiragana-summary .summary-section p,
  .page-hiragana-summary .summary-section li {
    font-size: 15px;
    line-height: 1.8;
  }

  .page-hiragana-summary .summary-list-grid,
  .page-hiragana-summary .summary-age-cards,
  .page-hiragana-summary .summary-feature-grid,
  .page-hiragana-summary .quiz-series-cards {
    grid-template-columns: 1fr;
  }

  .page-hiragana-summary .summary-age-cards .summary-info-card:first-child {
    grid-column: auto;
  }

  .page-hiragana-summary .quiz-series-card {
    min-height: 0;
  }

  .page-hiragana-summary .summary-dino {
    display: none;
  }
}


/* ===== CONTACT（お問い合わせ） ===== */
.page-contact .contact-form {
  text-align: left; /* ラベル→入力欄の並びに合わせる */
}

@media (max-width: 1366px) {
  .page-static .side-dino {
    display: none;
  }
}

.page-contact .contact-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,248,220,.95);
  color: #6b4b00;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}

.page-contact .form-grid {
  display: grid; /* 2列のグリッド */
  grid-template-columns: max-content 480px; /* 左：ラベル幅 / 右：入力域 */
  column-gap: 2px; /* ラベルと入力欄を“ほぼくっつける” */
  row-gap: 10px; /* 行間 */
  align-items: center; /* 縦位置を揃える */
  width: max-content; /* 中身の幅にフィット */
  margin: 0 auto; /* グリッド全体を中央配置 */
}

.page-contact .form-grid label {
  font-weight: 700; /* ラベル強調 */
  margin: 0; /* 余白はグリッドに任せる */
  white-space: nowrap; /* 「メッセージ：」の折返し防止 */
}

.page-contact .form-grid label[for="message"] {
  align-self: start; /* テキストエリアが縦長なので上揃え */
}

.page-contact .form-grid input[type="text"],
.page-contact .form-grid input[type="email"],
.page-contact .form-grid textarea {
  width: 400px; /* 指定どおりの幅 */
  padding: 8px; /* 入力しやすい余白 */
  border: 1px solid #ccc; /* 薄い枠線 */
  border-radius: 8px;
  height: 36px; /* input 高さ統一 */
}

.page-contact .form-grid textarea {
  height: auto; /* 自動高さ */
  min-height: 10em; /* rows="10" 相当 */
}

.page-contact .form-actions {
  display: flex; /* ボタン中央寄せ土台 */
  justify-content: center; /* ど真ん中に配置 */
  margin-top: 12px; /* 本体との間隔 */
}

.page-contact .btn-submit {
  min-width: 240px; /* 大きめで押しやすい */
  padding: 12px 24px; /* クリック領域を確保 */
  font-size: 18px; /* 視認性アップ */
  border: none; /* 枠線なし */
  border-radius: 28px; /* ころんとした丸み */
  background: #ff9900; /* 目立つオレンジ */
  color: #fff; /* 白文字 */
  cursor: pointer; /* 指カーソル */
}

.page-contact .btn-submit:hover {
  background: #ff7700; /* 濃い色でホバー感 */
}

.page-contact .btn-submit:disabled {
  background: #9e9e9e;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== ABOUT / PRIVACY TEXT PAGES ===== */
.page-about,
.page-privacy {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
}

.page-about .stage,
.page-privacy .stage {
  height: auto;
  min-height: calc(100vh - 80px);
  overflow: visible;
  padding-bottom: 86px;
}

.page-about .ui,
.page-privacy .ui {
  max-width: 860px;
}

.page-about .about-panel,
.page-privacy .privacy-panel {
  max-width: 800px;
  margin: 0 auto;
  color: #3f3a36;
}

body.page-about .about-panel section,
body.page-privacy .privacy-panel section,
body.page-howto .panel section,
body.page-parents .panel section {
  margin: 0 0 18px;
}

body.page-about .about-panel h2,
body.page-privacy .privacy-panel h2,
body.page-howto .panel h2,
body.page-parents .panel h2 {
  margin: 0 0 8px;
  font-size: 16.5px;
  line-height: 1.45;
  color: #333;
}

body.page-about .about-panel p,
body.page-privacy .privacy-panel p,
body.page-about .about-panel li,
body.page-privacy .privacy-panel li,
body.page-howto .panel p,
body.page-howto .panel li,
body.page-parents .panel p,
body.page-parents .panel li {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: #3f3a36;
}

.page-about .about-panel p + p {
  margin-top: 8px;
}

.page-privacy .privacy-panel a {
  color: #2468a8;
  font-weight: 700;
}

body.page-privacy .privacy-panel .policy-date {
  margin-top: 18px;
  color: #777;
  font-size: 13.2px;
  font-weight: 600;
  line-height: 1.7;
  text-align: right;
}






/* どのページでもヘッダー高さを統一して縦中央にする最終上書き */
.site-header,
.page-quiz .site-header,
.page-score .site-header {
  height: 80px;  /* 固定高さ */
  padding: 0 30px;
  align-items: center;  /* 念のため縦中央 */
}

/* =========================
   スマホ表示の最小調整
   PC版の雰囲気は保ちつつ、見切れと横はみ出しを防ぐ
========================= */
@media (max-width: 768px) {
  body,
  .page-input,
  .page-quiz,
  .page-score,
  .page-static {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 0;
  }

  .site-header,
  .page-quiz .site-header,
  .page-score .site-header {
    position: static;
    height: auto;
    min-height: 72px;
    padding: 10px 14px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
  }

  .brand-mark,
  .page-quiz .brand-mark,
  .page-score .brand-mark {
    height: 38px;
  }

  .brand-text,
  .page-quiz .brand-text,
  .page-score .brand-text {
    font-size: 16px;
  }

  .site-nav ul,
  .page-quiz .site-nav ul,
  .page-score .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    font-size: 14px;
  }

  .site-footer,
  .page-quiz .site-footer,
  .page-score .site-footer {
    position: static;
    height: auto;
    min-height: 50px;
    padding: 8px 14px;
  }

  .footer-inner,
  .page-quiz .footer-inner,
  .page-score .footer-inner {
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    text-align: center;
  }

  .footer-brand {
    font-size: 14px;
  }

  .footer-nav,
  .page-quiz .footer-nav,
  .page-score .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
  }

  .page-input .stage,
  .page-quiz .stage,
  .page-score .stage,
  .page-static .stage {
    height: auto;
    min-height: calc(100svh - 122px);
    padding: 12px 12px 28px;
    overflow: hidden;
    background-attachment: scroll;
  }

  .page-input .stage-title,
  .page-quiz .stage-title,
  .page-score .stage-title,
  .page-static .panel h1 {
    margin-top: 8px;
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.25;
  }

  .page-quiz .question-text,
  .page-score .result-text {
    font-size: 1.15em;
  }

  .page-input .side-dino.left,
  .page-quiz .side-dino.left,
  .page-score .side-dino.left,
  .page-static .side-dino.left {
    left: -28vw;
    top: 120px;
    height: 44vh;
  }

  .page-input .side-dino.right,
  .page-quiz .side-dino.right,
  .page-score .side-dino.right,
  .page-static .side-dino.right {
    right: -30vw;
    top: 170px;
    height: 34vh;
  }

  .page-input .ui,
  .page-quiz .ui,
  .page-score .ui,
  .page-static .ui {
    max-width: 100%;
    margin-top: 12px;
    padding: 0;
  }

  .page-quiz .photo-row {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin: 12px auto 10px;
    max-width: 520px;
  }

  .page-quiz .animal-card {
    flex: 1 1 calc(50% - 10px);
    width: auto;
    max-width: 155px;
    min-width: 128px;
  }

  .page-quiz .animal-photo {
    height: 118px;
  }

  .page-quiz .answer-button {
    padding: 9px 10px;
    font-size: 15px;
  }

  .page-quiz .next-button {
    max-width: 100%;
    white-space: normal;
  }

  .page-input #nameOutput {
    width: 100%;
    max-width: 520px;
    height: 52px;
    font-size: 30px;
  }

  .page-input .form-row {
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .page-input .grid-wrap {
    --kana-size: 38px;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .page-input .mark-col {
    grid-template-rows: repeat(5, var(--kana-size));
    grid-auto-columns: var(--kana-size);
    gap: 4px;
    flex: 0 0 auto;
  }

  .page-input .mark-col button,
  .page-input .grid button {
    width: var(--kana-size);
    height: var(--kana-size);
    font-size: clamp(17px, 4.8vw, 20px);
    padding: 0;
  }

  .page-input .mark-col .small {
    font-size: clamp(17px, 4.8vw, 20px);
  }

  .page-input .grid {
    grid-template-rows: repeat(5, var(--kana-size));
    grid-template-columns: repeat(11, var(--kana-size));
    gap: 4px;
    flex: 0 0 auto;
  }

  .page-contact .form-grid {
    width: 100%;
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .page-contact .form-grid label {
    white-space: normal;
  }

  .page-contact .form-grid input[type="text"],
  .page-contact .form-grid input[type="email"],
  .page-contact .form-grid textarea {
    width: 100%;
    max-width: 100%;
  }

  .page-contact .panel {
    padding: 18px 16px;
  }

  .page-contact .contact-notice {
    font-size: 14px;
    text-align: left;
  }

  .page-privacy .stage {
    padding: 14px 12px 24px;
  }

  .page-about .about-panel,
  .page-privacy .privacy-panel {
    padding: 18px 16px;
  }

  .page-about .about-panel h1,
  .page-privacy .privacy-panel h1 {
    font-size: clamp(25px, 7vw, 32px);
  }

  body.page-about .about-panel h2,
  body.page-privacy .privacy-panel h2,
  body.page-howto .panel h2,
  body.page-parents .panel h2 {
    font-size: 18px;
  }

  body.page-about .about-panel p,
  body.page-privacy .privacy-panel p,
  body.page-about .about-panel li,
  body.page-privacy .privacy-panel li,
  body.page-howto .panel p,
  body.page-howto .panel li,
  body.page-parents .panel p,
  body.page-parents .panel li {
    font-size: 16px;
    line-height: 1.8;
  }

  body.page-privacy .privacy-panel .policy-date {
    color: #777;
    font-size: 14.5px;
    line-height: 1.7;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .page-quiz .animal-card {
    min-width: 118px;
    max-width: calc(50% - 6px);
  }

  .page-quiz .animal-photo {
    height: 96px;
  }

  .page-input .grid-wrap {
    --kana-size: 6.6vw;
    gap: 6px;
  }

  .page-input .mark-col button,
  .page-input .grid button {
    min-width: 24px;
    min-height: 24px;
    font-size: 16px;
  }

  .page-input .next-button,
  .page-input #deleteButton {
    width: min(100%, 180px);
    padding: 10px 12px;
  }

  .page-static .panel {
    border-radius: 14px;
    padding: 16px 14px;
  }
}

/* =========================
   スマホ表示の第2段階調整
   文字・説明・ボタンを装飾画像より優先して表示する
========================= */
@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body,
  .page-input,
  .page-quiz,
  .page-score,
  .page-static {
    overflow-y: auto;
  }

  .site-header,
  .page-quiz .site-header,
  .page-score .site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 8px 12px 10px;
    gap: 8px;
  }

  body:not(.page-static) .site-header .site-nav,
  body:not(.page-static).page-quiz .site-header .site-nav,
  body:not(.page-static).page-score .site-header .site-nav {
    display: none;
  }

  .brand,
  .page-quiz .brand,
  .page-score .brand {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  .header-subtitle {
    display: block;
    margin-top: -2px;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
  }

  .brand-text,
  .page-quiz .brand-text,
  .page-score .brand-text,
  .site-nav a,
  .page-quiz .site-nav a,
  .page-score .site-nav a {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .site-nav,
  .page-quiz .site-nav,
  .page-score .site-nav {
    width: 100%;
  }

  .site-nav ul,
  .page-quiz .site-nav ul,
  .page-score .site-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 360px);
    margin: 0 auto;
    gap: 6px;
  }

  .site-nav li,
  .page-quiz .site-nav li,
  .page-score .site-nav li {
    min-width: 0;
    text-align: center;
  }

  .site-nav a,
  .page-quiz .site-nav a,
  .page-score .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    font-size: 13px;
    line-height: 1.25;
  }

  .site-nav li:nth-child(3),
  .page-quiz .site-nav li:nth-child(3),
  .page-score .site-nav li:nth-child(3) {
    grid-column: 1 / -1;
  }

  .hero {
    display: block;
    height: auto;
    min-height: auto;
    padding: 18px 14px 28px;
    overflow: hidden;
  }

  .hero-center {
    position: relative;
    z-index: 10;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .hero-dino {
    z-index: 1;
    opacity: .32;
    max-width: 60vw;
    height: auto;
  }

  .hero-dino.left {
    left: -22vw;
    top: 96px;
    height: auto;
    width: 55vw;
    transform: none;
  }

  .hero-dino.right {
    right: -24vw;
    top: 190px;
    height: auto;
    width: 50vw;
  }

  .hero .photo-row {
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px auto;
    max-width: 280px;
  }

  .hero .photo-row .animal-photo {
    width: 58px;
    height: 58px;
  }

  .hero .photo-row .animal-photo:nth-child(n+4) {
    display: none;
  }

  .hero-title {
    position: relative;
    z-index: 12;
    display: block;
    margin: 8px auto 9px;
    padding: 0;
    font-size: clamp(29px, 10vw, 39px);
    line-height: 1.12;
    text-shadow: 0 2px 10px rgba(255,255,255,.85);
  }

  .hero-title span {
    display: block;
  }

  .hero-description,
  .hero-prototype {
    position: relative;
    z-index: 12;
  }

  .hero-description {
    width: min(100%, 340px);
    margin: 7px auto 12px;
    padding: 0 6px;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
  }

  .hero-prototype {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: min(100%, 330px);
    margin: 0 auto 10px;
    padding: 5px 10px;
    border-radius: 14px;
    font-size: 11px;
  }

  .hero-prototype strong {
    font-size: 12px;
  }

  .hero-button,
  .page-input .next-button,
  .page-input #deleteButton,
  .page-quiz .next-button,
  .page-score .btn,
  .page-contact .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86%;
    max-width: 360px;
    min-height: 48px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.25;
  }

  .hero-button {
    position: relative;
    z-index: 12;
    font-size: 20px;
    padding: 12px 18px;
  }

  .footer-nav,
  .page-quiz .footer-nav,
  .page-score .footer-nav {
    width: 100%;
    gap: 6px 10px;
  }

  .mobile-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 10px;
    width: 100%;
    font-size: 12px;
    line-height: 1.35;
  }

  .mobile-footer-links a {
    color: #555;
  }

  .desktop-footer-links {
    display: none;
  }

  .page-input .stage,
  .page-quiz .stage,
  .page-score .stage,
  .page-static .stage {
    min-height: auto;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .page-input .side-dino,
  .page-quiz .side-dino,
  .page-static .side-dino {
    z-index: 1;
    opacity: .28;
    max-width: 60vw;
  }

  .page-input .stage-title,
  .page-input .ui,
  .page-quiz .stage-title,
  .page-quiz .ui,
  .page-static .ui {
    position: relative;
    z-index: 5;
  }

  .page-quiz .answer-button {
    min-height: 42px;
    word-break: keep-all;
  }

  .page-quiz .player-name {
    font-size: .72em;
    line-height: 1.25;
  }

  .page-quiz .question-text {
    margin-top: 3px;
    max-width: min(92vw, 14.5em);
    gap: .12em .36em;
    font-size: clamp(28px, 7.4vw, 36px);
    line-height: 1.3;
  }

  .page-score .stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 14px 30px;
    text-align: center;
  }

  .page-score .stage-title {
    position: relative;
    z-index: 5;
    order: 1;
    width: 100%;
    margin: 4px auto 14px;
    padding: 0 6px;
    line-height: 1.35;
  }

  .page-score canvas {
    z-index: 3 !important;
  }

  .page-score .player-name {
    font-size: 1.05em;
  }

  .page-score .result-text {
    display: inline-block;
    margin-top: 4px;
    font-size: 1.08em;
    line-height: 1.45;
  }

  .page-score .side-dino {
    display: none;
  }

  .page-score .ui {
    order: 2;
    position: relative;
    z-index: 4;
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .page-score .sway-wrap {
    overflow: visible;
    margin: 2px auto 14px;
  }

  .page-score .sway-dino {
    height: auto;
    width: min(46vw, 172px);
    max-width: 172px;
    animation: none;
    transform: none;
    filter: none;
  }

  .page-score .support-dino {
    height: auto;
    width: min(38vw, 128px);
    max-width: 128px;
  }

  .page-score .actions {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .page-score .actions form {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .page-score .btn {
    font-size: 18px;
    padding: 12px 18px;
  }

  .page-score .answer-review {
    width: min(100%, 340px);
    margin-top: 14px;
    padding: 12px 14px;
    text-align: left;
  }

  .page-score .answer-review h2 {
    font-size: 20px;
  }

  .page-score .answer-review ul {
    padding-left: 1em;
    font-size: 15px;
  }

  .page-score .animal-mini-knowledge {
    width: min(100%, 520px);
    margin: 14px auto;
    padding: 14px;
    border-radius: 16px;
  }

  .page-score .animal-mini-knowledge-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-score .animal-mini-card {
    padding: 14px;
    border-radius: 14px;
  }

  .page-score .animal-mini-card h3 {
    font-size: 20px;
  }

  .page-score .animal-mini-card dt,
  .page-score .animal-mini-card dd {
    font-size: 14px;
  }
}

/* =========================
   スマホ版クイズUIの調整
   5択を2列＋最後中央にし、判定をやさしく見せる
========================= */
@media (max-width: 768px) {
  .page-quiz .photo-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: start;
    gap: 8px;
    width: min(100%, 340px);
    max-width: 340px;
    margin: 10px auto 8px;
  }

  .page-quiz .animal-card {
    width: 100%;
    max-width: 146px;
    min-width: 0;
  }

  .page-quiz .animal-card:nth-child(5) {
    grid-column: 1 / -1;
    width: calc(50% - 4px);
  }

  .page-quiz .animal-photo {
    height: 88px;
    border-radius: 9px;
  }

  .page-quiz .answer-button {
    min-height: 42px;
    margin-top: 5px;
    padding: 8px 8px;
    font-size: 15px;
    line-height: 1.2;
  }

  .page-quiz .judge {
    display: block;
    width: min(100%, 340px);
    min-height: 0;
    margin: 10px auto 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    font-size: clamp(22px, 6.2vw, 28px);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    word-break: keep-all;
  }

  .page-quiz .judge:empty {
    display: none;
  }

  .page-quiz .judge--correct {
    color: #247a2f;
    border: 3px solid rgba(76,175,80,.72);
    box-shadow: 0 6px 18px rgba(76,175,80,.22);
  }

  .page-quiz .judge--try {
    color: #8a5b00;
    border: 3px solid rgba(255,193,7,.72);
    box-shadow: 0 6px 18px rgba(255,193,7,.18);
  }

  .page-quiz .animal-card.is-correct {
    padding: 5px;
    border-radius: 14px;
    outline: 4px solid #4caf50;
    background: rgba(232,255,232,.92);
    box-shadow: 0 8px 20px rgba(76,175,80,.24);
  }

  .page-quiz .animal-card.is-try {
    padding: 5px;
    border-radius: 14px;
    outline: 3px solid #ffc107;
    background: rgba(255,248,220,.9);
  }

  .page-quiz .answer-button.is-try {
    background: #f6a623;
  }
}

/* =========================
   公開前のスマホ最終調整
   空白・折り返し・ボタン主従・読みやすさの微調整
========================= */
@media (max-width: 768px) {
  .site-header,
  .page-quiz .site-header,
  .page-score .site-header {
    padding-top: 7px;
    padding-bottom: 8px;
  }

  .header-subtitle {
    font-size: 12px;
    color: #666;
  }

  .hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100svh - 154px);
    padding: 14px 14px 24px;
  }

  .hero .photo-row {
    max-width: 330px;
    gap: 10px;
  }

  .hero .photo-row .animal-photo {
    width: 72px;
    height: 72px;
  }

  .hero-title {
    font-size: clamp(34px, 11.4vw, 44px);
    line-height: 1.08;
    margin: 10px auto 14px;
  }

  .hero-dino {
    max-width: none;
    opacity: .56;
    filter: saturate(1.14) contrast(1.08);
  }

  .hero-dino.left {
    left: -42vw;
    top: clamp(64px, 18vw, 82px);
    width: min(76vw, 300px);
  }

  .hero-dino.right {
    right: -42vw;
    top: clamp(118px, 34vw, 150px);
    width: min(70vw, 276px);
  }

  .hero-button {
    min-height: 50px;
    font-size: 20px;
    padding: 13px 18px;
  }

  .page-input .stage-title span {
    display: block;
  }

  .page-input .stage-title {
    font-size: clamp(24px, 7.2vw, 31px);
    line-height: 1.25;
    margin-top: 4px;
    margin-bottom: 6px;
  }

  .page-input .form-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 9px;
  }

  .page-input .next-button {
    order: 1;
    width: 86%;
    max-width: 340px;
    min-height: 50px;
    font-size: 18px;
    font-weight: 800;
    background: #43a047;
  }

  .page-input #deleteButton,
  .page-input .small-helper {
    order: 2;
    width: calc(50% - 6px);
    max-width: 162px;
    min-height: 42px;
    font-size: 15px;
    background: rgba(255,255,255,.86);
    color: #8a4b4b;
    border: 2px solid rgba(180,90,90,.35);
  }

  .page-input .small-helper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
  }

  .page-input #btnSmall {
    display: none;
  }

  .page-quiz .stage {
    background-position: center top;
  }

  .page-quiz .photo-row {
    gap: 9px;
    margin-top: 8px;
  }

  .page-quiz .animal-card {
    max-width: 148px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 5px 16px rgba(0,0,0,.12);
  }

  .page-quiz .animal-card:nth-child(5) {
    width: calc(50% + 2px);
  }

  .page-quiz .animal-photo {
    height: 86px;
  }

  .page-quiz .answer-button {
    min-height: 43px;
    font-size: 15px;
  }

  .page-quiz .judge {
    margin-top: 11px;
    padding: 11px 12px;
    font-size: clamp(21px, 5.8vw, 26px);
    line-height: 1.32;
  }

  .page-quiz .next-wrap {
    margin-top: 9px;
  }

  .page-quiz .next-button {
    width: 86%;
    max-width: 340px;
    min-height: 50px;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    background: #43a047;
  }

  .page-score .result-text {
    font-size: clamp(28px, 7.8vw, 34px);
    line-height: 1.25;
  }

  .page-score .score-line {
    display: block;
  }

  .page-score .result-note {
    display: inline-block;
    margin-top: 6px;
    font-size: .68em;
    line-height: 1.35;
  }

  .page-score .player-name {
    font-size: .9em;
  }

  .mobile-footer-links {
    font-size: 11px;
    gap: 3px 9px;
  }

  .site-footer .footer-nav,
  .site-footer .footer-nav a,
  .site-footer .footer-nav small,
  .site-footer .mobile-footer-links,
  .site-footer .mobile-footer-links a,
  .page-quiz .site-footer .footer-nav,
  .page-quiz .site-footer .footer-nav a,
  .page-quiz .site-footer .footer-nav small,
  .page-score .site-footer .footer-nav,
  .page-score .site-footer .footer-nav a,
  .page-score .site-footer .footer-nav small {
    font-size: 12px;
    line-height: 1.35;
  }

  .site-footer .mobile-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: min(100%, 360px);
    gap: 3px 6px;
    padding-bottom: 4px;
    margin: 0 auto 4px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  .site-footer .mobile-footer-links a {
    display: block;
    min-width: 0;
    padding: 2px 4px;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .site-footer .desktop-footer-link {
    display: none;
  }

  .site-footer .desktop-footer-links {
    display: none;
  }
}

/* =========================
   主要ゲームページのスマホ恐竜位置調整
========================= */
@media (max-width: 768px) {
  .page-input .stage,
  .page-quiz .stage,
  .page-score .stage {
    overflow-x: hidden;
  }

  .page-input .side-dino,
  .page-quiz .side-dino,
  .page-score .side-dino {
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    pointer-events: none;
    filter: saturate(1.12) contrast(1.06);
  }

  .page-input .side-dino {
    opacity: .48;
  }

  .page-input .side-dino.left {
    left: -42vw;
    top: clamp(64px, 18vw, 84px);
    width: min(76vw, 300px);
  }

  .page-input .side-dino.right {
    right: -42vw;
    top: clamp(118px, 34vw, 150px);
    width: min(70vw, 276px);
  }

  .page-quiz .side-dino {
    opacity: .32;
  }

  .page-quiz .side-dino.left {
    left: -46vw;
    top: clamp(58px, 16vw, 76px);
    width: min(70vw, 270px);
  }

  .page-quiz .side-dino.right {
    right: -34vw;
    top: clamp(96px, 28vw, 128px);
    width: min(62vw, 246px);
  }

  .page-score .side-dino {
    opacity: .28;
  }

  .page-score .side-dino.left {
    left: -48vw;
    top: clamp(72px, 20vw, 96px);
    width: min(68vw, 268px);
  }

  .page-score .side-dino.right {
    right: -36vw;
    top: clamp(126px, 36vw, 164px);
    width: min(60vw, 236px);
  }
}

/* =========================
   index.php スマホ下部リンクの収まり調整
========================= */
@media (max-width: 768px) {
  body:not([class]) .site-footer {
    min-height: 0;
    padding: 4px 10px 3px;
  }

  body:not([class]) .site-footer .footer-inner {
    gap: 2px 8px;
  }

  body:not([class]) .site-footer .footer-left {
    gap: 6px;
  }

  body:not([class]) .site-footer .footer-mark {
    height: 18px;
  }

  body:not([class]) .site-footer .footer-brand {
    font-size: 11px;
    line-height: 1.1;
  }

  body:not([class]) .site-footer .footer-nav,
  body:not([class]) .site-footer .footer-nav small {
    gap: 2px 6px;
    line-height: 1.15;
  }

  body:not([class]) .site-footer .mobile-footer-links {
    gap: 0 5px;
    padding-bottom: 2px;
    margin-bottom: 2px;
  }

  body:not([class]) .site-footer .mobile-footer-links a {
    min-height: 17px;
    padding: 0 3px;
    line-height: 1.15;
  }
}

/* =========================
   series.php スマホ表示のはみ出し調整
========================= */
@media (max-width: 768px) {
  .page-series .stage {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .page-series .ui {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  .page-series .panel {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .page-series .series-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    width: min(100%, 360px);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    column-gap: 0;
    row-gap: 12px;
  }

  .page-series .series-card {
    width: 100%;
    max-width: 340px;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .page-series .thumb {
    width: 100%;
    max-width: 100%;
    height: clamp(116px, 34vw, 135px);
    box-sizing: border-box;
    overflow: hidden;
  }

  .page-series .thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .page-series .series-title,
  .page-series .series-status {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
}

/* =========================
   全ページ共通フッター統一
========================= */
.footer-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.footer-home:hover {
  text-decoration: none;
}

@media (min-width: 769px) {
  .site-footer,
  .page-quiz .site-footer,
  .page-score .site-footer,
  .page-static .site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    min-height: 70px;
    padding: 6px 24px;
    overflow: hidden;
  }

  .footer-inner,
  .page-quiz .footer-inner,
  .page-score .footer-inner,
  .page-static .footer-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand links"
      "copy copy";
    align-items: center;
    justify-content: center;
    gap: 4px 18px;
    width: 100%;
    max-width: 1180px;
    height: auto;
    text-align: center;
  }

  .footer-left,
  .page-quiz .footer-left,
  .page-score .footer-left,
  .page-static .footer-left {
    grid-area: brand;
    justify-content: center;
    min-width: 0;
  }

  .footer-nav,
  .page-quiz .footer-nav,
  .page-score .footer-nav,
  .page-static .footer-nav {
    display: contents;
  }

  .mobile-footer-links {
    display: none;
  }

  .desktop-footer-links,
  .page-quiz .desktop-footer-links,
  .page-score .desktop-footer-links,
  .page-static .desktop-footer-links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
  }

  .desktop-footer-links a,
  .page-quiz .desktop-footer-links a,
  .page-score .desktop-footer-links a,
  .page-static .desktop-footer-links a {
    white-space: nowrap;
  }

  .footer-nav small,
  .page-quiz .footer-nav small,
  .page-score .footer-nav small,
  .page-static .footer-nav small {
    grid-area: copy;
    display: block;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
  }
}

@media (max-width: 768px) {
  .site-footer .footer-left,
  .page-quiz .site-footer .footer-left,
  .page-score .site-footer .footer-left,
  .page-static .site-footer .footer-left {
    justify-content: center;
  }

  .site-footer .footer-home,
  .page-quiz .site-footer .footer-home,
  .page-score .site-footer .footer-home,
  .page-static .site-footer .footer-home {
    gap: 6px;
  }

  .site-footer .desktop-footer-links,
  .page-quiz .site-footer .desktop-footer-links,
  .page-score .site-footer .desktop-footer-links,
  .page-static .site-footer .desktop-footer-links {
    display: none;
  }

  .site-footer .mobile-footer-links,
  .page-quiz .site-footer .mobile-footer-links,
  .page-score .site-footer .mobile-footer-links,
  .page-static .site-footer .mobile-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 360px);
    gap: 3px 6px;
    margin: 0 auto 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  .site-footer .mobile-footer-links a,
  .page-quiz .site-footer .mobile-footer-links a,
  .page-score .site-footer .mobile-footer-links a,
  .page-static .site-footer .mobile-footer-links a {
    display: block;
    min-width: 0;
    padding: 2px 4px;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
}

/* =========================
   score.php 紙吹雪レイヤー調整
========================= */
.page-score canvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 999999 !important;
}

body.page-score {
  height: auto;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-score .stage {
  min-height: calc(100vh - 80px);
  height: auto;
  padding-bottom: 120px;
  overflow-x: clip;
  overflow-y: visible;
}

.page-score .animal-mini-knowledge {
  width: min(100%, 900px);
  margin: 20px auto 18px;
  padding: 20px;
  border: 3px solid #ffd38a;
  border-radius: 22px;
  background: #fff8ec;
  box-shadow: 0 10px 28px rgba(68, 44, 18, .18);
  text-align: left;
}

.page-score .animal-mini-knowledge h2 {
  margin: 0 0 16px;
  padding: 0 8px 12px;
  border-bottom: 3px dotted #f6c46a;
  color: #5f4522;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.35;
  text-align: center;
}

.page-score .animal-mini-knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-score .animal-mini-card {
  padding: 17px 18px 18px;
  border: 2px solid #b9dfb9;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(46, 83, 49, .08);
}

.page-score .animal-mini-card h3 {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 15px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e6b36;
  font-size: 21px;
  line-height: 1.35;
}

.page-score .animal-mini-card dl {
  margin: 0;
}

.page-score .animal-mini-card dt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #5d4215;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.page-score .animal-mini-card dt:first-of-type {
  margin-top: 0;
}

.page-score .animal-mini-card dt::before {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.page-score .animal-mini-card dt:nth-of-type(1) {
  background: #fff1c7;
}

.page-score .animal-mini-card dt:nth-of-type(1)::before {
  content: "!";
  background: #f5a623;
}

.page-score .animal-mini-card dt:nth-of-type(2) {
  background: #e8f5e9;
}

.page-score .animal-mini-card dt:nth-of-type(2)::before {
  content: "?";
  background: #4caf50;
}

.page-score .animal-mini-card dt:nth-of-type(3) {
  background: #e6f4ff;
}

.page-score .animal-mini-card dt:nth-of-type(3)::before {
  content: "あ";
  background: #42a5f5;
}

.page-score .animal-mini-card dd {
  margin: 7px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffdf7;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.75;
}

@media (max-width: 768px) {
  body.page-score {
    overflow-y: auto;
  }

  .page-score .stage {
    min-height: calc(100vh - 80px);
    height: auto;
    padding-bottom: 150px;
    overflow-y: visible;
  }

  .page-score .animal-mini-knowledge {
    width: min(100%, 520px);
    margin: 16px auto 18px;
    padding: 14px;
    border-radius: 18px;
  }

  .page-score .animal-mini-knowledge-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .page-score .animal-mini-card {
    padding: 15px;
    border-radius: 16px;
  }

  .page-score .animal-mini-card h3 {
    font-size: 20px;
  }

  .page-score .animal-mini-card dt {
    font-size: 14px;
  }

  .page-score .animal-mini-card dd {
    font-size: 14px;
    line-height: 1.75;
  }

  .page-score .actions {
    margin-top: 18px;
    margin-bottom: 8px;
  }
}

.page-score .side-dino {
  display: none;
}

@media (min-width: 1280px) {
  .page-score .side-dino {
    --score-side-dino-gap: 8px;
    --score-side-dino-motion-gap: 64px;
    position: fixed;
    z-index: 1600;
    display: block;
    height: auto;
    opacity: .98;
    pointer-events: none;
    filter: saturate(1.08) drop-shadow(0 12px 20px rgba(80, 55, 25, .18));
  }

  .page-score .side-dino.left {
    --score-side-dino-width: clamp(500px, 36vw, 680px);
    left: calc((100vw - 900px) / 2 - var(--score-side-dino-width) - var(--score-side-dino-gap));
    top: 56vh;
    width: var(--score-side-dino-width);
    height: auto;
    transform: translateY(-50%);
    animation: side-tyranno-float 6.6s ease-in-out .4s infinite;
  }

  .page-score .side-dino.right {
    --score-side-dino-width: clamp(520px, 34vw, 750px);
    right: calc((100vw - 900px) / 2 - var(--score-side-dino-width) - var(--score-side-dino-motion-gap));
    top: 58vh;
    width: var(--score-side-dino-width);
    height: auto;
    transform: translateY(-50%);
    transform-origin: 56% 86%;
    animation: side-trikera-drift 7s ease-in-out .8s infinite;
  }

  .page-score.tier-mid .side-dino.left {
    animation-name: side-tyranno-cheer;
    animation-duration: 5.4s;
  }

  .page-score.tier-mid .side-dino.right {
    animation-name: side-trikera-cheer;
    animation-duration: 5.8s;
  }

  .page-score.tier-high .side-dino.left {
    animation-name: side-tyranno-high;
    animation-duration: 4.8s;
  }

  .page-score.tier-high .side-dino.right {
    animation-name: side-trikera-high;
    animation-duration: 5s;
  }

  .page-score.tier-perfect .side-dino.left {
    animation-name: side-tyranno-perfect;
    animation-duration: 3.8s;
  }

  .page-score.tier-perfect .side-dino.right {
    animation-name: side-trikera-perfect;
    animation-duration: 4s;
  }
}

@media (min-width: 1800px) {
  .page-score .side-dino {
    --score-side-dino-gap: 16px;
  }
}

@keyframes side-tyranno-float {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg);
  }
  45% {
    transform: translateY(calc(-50% - 14px)) rotate(-2deg);
  }
  70% {
    transform: translateY(calc(-50% - 5px)) rotate(1.2deg);
  }
}

@keyframes side-tyranno-cheer {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  34% {
    transform: translateY(calc(-50% - 22px)) rotate(-3.5deg) scale(1.025);
  }
  62% {
    transform: translateY(calc(-50% - 6px)) rotate(2deg) scale(1);
  }
}

@keyframes side-tyranno-high {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  28% {
    transform: translateY(calc(-50% - 30px)) rotate(-5deg) scale(1.04);
  }
  52% {
    transform: translateY(calc(-50% - 4px)) rotate(4deg) scale(1);
  }
  76% {
    transform: translateY(calc(-50% - 18px)) rotate(-2deg) scale(1.025);
  }
}

@keyframes side-tyranno-perfect {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  24% {
    transform: translateY(calc(-50% - 42px)) rotate(-7deg) scale(1.07);
  }
  46% {
    transform: translateY(calc(-50% - 6px)) rotate(6deg) scale(1);
  }
  68% {
    transform: translateY(calc(-50% - 28px)) rotate(-4deg) scale(1.045);
  }
}

@keyframes side-trikera-drift {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg);
  }
  38% {
    transform: translate(-12px, calc(-50% + 6px)) rotate(2.2deg);
  }
  70% {
    transform: translate(8px, calc(-50% - 6px)) rotate(-1.8deg);
  }
}

@keyframes side-trikera-cheer {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  32% {
    transform: translate(-18px, calc(-50% - 14px)) rotate(4deg) scale(1.025);
  }
  60% {
    transform: translate(10px, calc(-50% + 4px)) rotate(-2.5deg) scale(1);
  }
}

@keyframes side-trikera-high {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  26% {
    transform: translate(-24px, calc(-50% - 22px)) rotate(5.5deg) scale(1.04);
  }
  50% {
    transform: translate(12px, calc(-50% + 4px)) rotate(-4deg) scale(1);
  }
  74% {
    transform: translate(-10px, calc(-50% - 12px)) rotate(2.5deg) scale(1.025);
  }
}

@keyframes side-trikera-perfect {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg) scale(1);
  }
  22% {
    transform: translate(-32px, calc(-50% - 34px)) rotate(8deg) scale(1.07);
  }
  44% {
    transform: translate(18px, calc(-50% + 4px)) rotate(-6deg) scale(1);
  }
  66% {
    transform: translate(-18px, calc(-50% - 24px)) rotate(5deg) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-score .side-dino.left,
  .page-score .side-dino.right {
    animation: none !important;
    transform: translateY(-50%) !important;
  }
}

.page-quiz .judge.judge--correct,
.page-quiz .judge.judge--try {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 8;
  width: min(96vw, 440px);
  max-width: min(96vw, 560px);
  min-height: 0;
  margin: 6px auto 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  line-height: 1.28;
  font-size: clamp(17px, 4.1vw, 22px);
  font-weight: 800;
  text-align: center;
}

.page-quiz .judge.judge--correct {
  color: #247a2f;
  border: 3px solid rgba(76,175,80,.72);
  box-shadow: 0 6px 18px rgba(76,175,80,.22);
}

.page-quiz .judge.judge--try {
  color: #8a5b00;
  border: 3px solid rgba(255,193,7,.72);
  box-shadow: 0 6px 18px rgba(255,193,7,.18);
}

.page-quiz .judge-message {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .1em .22em;
  max-width: 100%;
}

.page-quiz .judge-intro {
  flex-basis: 100%;
}

.page-quiz .judge-answer {
  flex-basis: 100%;
  max-width: 100%;
  font-size: clamp(15px, 3.9vw, 21px);
}

.page-quiz .judge-intro,
.page-quiz .judge-answer,
.page-quiz .judge-answer-name {
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.page-quiz .judge--long-answer {
  font-size: clamp(15px, 3.8vw, 20px);
}

.page-quiz .judge--long-answer .judge-answer {
  font-size: clamp(14px, 3.7vw, 19px);
}

@media (min-width: 769px) {
  .page-quiz .judge.judge--correct,
  .page-quiz .judge.judge--try {
    width: min(100%, 520px);
    font-size: clamp(20px, 1.8vw, 24px);
    line-height: 1.3;
  }
}

/* input-name.php: 進む導線と入力補助を分けて整理 */
.page-input .name-action-area {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(90%, 520px);
  margin: 6px auto 8px;
}

.page-input .name-action-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  width: min(100%, 390px);
  margin: 4px auto 8px;
}

.page-input .name-action-area .next-button,
.page-input .name-action-area .skip-name-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(95, 62, 24, .13);
}

.page-input .name-action-area .next-button {
  order: 1;
  border: 2px solid rgba(145, 83, 17, .12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffc46b 0%, #f4a94f 100%);
  color: #4a2d08;
  font-weight: 900;
}

.page-input .name-action-area .skip-name-button {
  order: 2;
  min-height: 46px;
  font-size: 15px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(36, 92, 104, .1);
}

.page-input .name-action-secondary #deleteButton,
.page-input .name-action-secondary .small-helper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 calc(50% - 5px);
  width: calc(50% - 5px);
  max-width: 180px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 800;
}

@media (max-width: 480px) {
  .page-input .name-action-area {
    width: min(100%, 340px);
    flex-direction: column;
    gap: 8px;
  }

  .page-input .name-action-area .next-button,
  .page-input .name-action-area .skip-name-button {
    flex: 0 0 auto;
    width: 100%;
    max-width: 340px;
    min-height: 44px;
    padding: 10px 14px;
    line-height: 1.35;
  }

  .page-input .name-action-secondary {
    gap: 8px;
    margin-top: 2px;
    margin-bottom: 8px;
  }

  .page-input .name-action-secondary #deleteButton,
  .page-input .name-action-secondary .small-helper {
    flex-basis: calc(50% - 4px);
    width: calc(50% - 4px);
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
  }

  .page-input .name-action-secondary #deleteButton {
    background: #fff7e6;
    color: #6b4b1f;
    border-color: rgba(229, 172, 88, .55);
  }

  .page-input .name-action-secondary .small-helper {
    background: #f2fbf9;
    color: #245c68;
    border-color: rgba(128, 199, 213, .55);
  }

  .page-input .skip-name-button {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 15px;
  }

  .page-input .parent-name-note {
    width: min(100%, 340px);
    padding: 10px 13px;
  }

  .page-input .parent-name-note h2 {
    font-size: 17px;
  }

  .page-input .parent-name-note p {
    font-size: 14px;
  }
}

/* score.php: 結果後の行動ボタンをサイト全体のやわらかい色味に合わせる */
.page-score .actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 16px;
  border: 2px solid #f1d6a9;
  line-height: 1.35;
  white-space: normal;
  background: #fffdf7;
  color: #5f4526;
  box-shadow: 0 3px 10px rgba(95, 62, 24, .1);
  font-weight: 900;
}

.page-score .actions form:nth-child(1) .btn {
  color: #7a4a0d;
  border-color: #efc47c;
  background: #fff4dc;
}

.page-score .actions form:nth-child(1) .btn:hover {
  background: #ffedc7;
}

.page-score .actions form:nth-child(2) .btn {
  color: #245c68;
  border-color: #9bd6cf;
  background: #f2fbf9;
}

.page-score .actions form:nth-child(2) .btn:hover {
  background: #e7f7f4;
}

.page-score .actions form:nth-child(3) .btn {
  color: #6a5743;
  border-color: #e8d9c2;
  background: #fffaf0;
}

.page-score .actions form:nth-child(3) .btn:hover {
  background: #fff3de;
}

@media (max-width: 480px) {
  .page-score .actions .btn {
    width: 100%;
    max-width: 312px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 17px;
  }
}
