/* 理科ラボ 小学校の教材（2026-10-18 試作）。中学校の教材（lesson-v2.css・quiz.css）の上に重ねて、文字とボタンを大きくする */
body[data-elementary] { font-size: 1.06rem; }
body[data-elementary] .hero h1 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); }
body[data-elementary] .lv-question,
body[data-elementary] .qz-q { font-size: 1.15rem; line-height: 1.7; }
body[data-elementary] .lv-choices button,
body[data-elementary] .qz-choices button { min-height: 56px; padding: 10px 20px; font-size: 1.08rem; }
body[data-elementary] .lv-nav button { min-height: 56px; font-size: 1.05rem; }
body[data-elementary] .lv-feedback,
body[data-elementary] .lv-learn p { font-size: 1.08rem; }
body[data-elementary] .lv-controls label { font-size: 1rem; }
body[data-elementary] .lv-controls input[type=range] { min-height: 48px; }
body[data-elementary] .lv-steps button { min-height: 64px; font-size: .98rem; }
body[data-elementary] .lv-summary th,
body[data-elementary] .lv-summary td { font-size: 1.02rem; }

/* 先生・保護者の方へ */
.es-teacher { border-left: 6px solid #c58220; }
.es-teacher h3 { margin: 18px 0 6px; font-size: 1.05rem; color: #7a4a0c; }
.es-teacher ol, .es-teacher ul { margin: 0; padding-left: 1.4em; line-height: 1.8; }
.es-teacher-note { margin-top: 14px; padding: 10px 14px; background: #fffaf3; border-radius: 10px; color: #6b4a1a; }

/* 小学校の入口 */
body[data-elementary-home] .related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
body[data-elementary-home] .lv-card h2 { margin-top: 0; }

/* 2026-10-20 見直し：スマホで図を少しでも大きく（カードの余白をつめる）・学年のジャンプ・動画カード */
@media (max-width: 520px) {
  body[data-elementary] #stage { padding-left: 8px; padding-right: 8px; }
  body[data-elementary] .lv-legend, body[data-elementary] .lv-controls-hint { font-size: .95rem; }
}
.es-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.es-jump a { flex: 1 1 120px; min-height: 52px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--teal, #1b7f8c); border-radius: 999px; background: #fff; color: var(--teal, #1b7f8c); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.es-jump a:hover { background: var(--teal, #1b7f8c); color: #fff; }
.es-video { border-left: 6px solid #c0453a; }
.es-video h2 { margin-top: 0; }
/* 確認問題の「✓ 正解」（quiz.css）は小4までは「正かい」 */
body[data-elementary="3"] .qz-choices .is-correct::after,
body[data-elementary="4"] .qz-choices .is-correct::after { content: "  ✓ 正かい"; }
/* 実験道具・確認問題へのカードは、スマホでは上下に（長い題名が細い列で折れないように） */
@media (max-width: 520px) {
  body[data-elementary] .questions-link-card { display: block; }
  body[data-elementary] .questions-link-card .questions-link-title { display: block; margin-bottom: 6px; }
}

/* ===== 小学校のホーム（2026-10-20 作り直し） ===== */
body[data-elementary-home] { font-size: 1.06rem; }
.es-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(300px, 1.15fr); gap: 24px; align-items: center; padding: 10px 0 26px; }
.es-hero h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 14px; }
.es-hero h1 span { color: #087c86; }
.es-hero p { font-size: 1.08rem; line-height: 1.8; }
.es-hero-fig { width: 100%; height: auto; max-width: 640px; justify-self: end; border-radius: 20px; box-shadow: 0 14px 34px rgba(29, 63, 78, .16); }
.es-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.es-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 10px 22px; border: 2px solid #087c86; border-radius: 999px; background: #fff; color: #087c86; font-weight: 900; font-size: 1.05rem; text-decoration: none; }
.es-btn-primary { background: #087c86; color: #fff; }
.es-btn:hover { filter: brightness(1.08); }
.card-kicker { margin: 0 0 8px; color: #087c86; font-size: .8rem; font-weight: 900; letter-spacing: .1em; }
.es-grades { margin: 10px 0 18px; }
.es-grade-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.es-grade-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 84px; padding: 14px 8px; border-radius: 16px; background: var(--c); color: #fff; text-decoration: none; box-shadow: 0 8px 20px rgba(29, 63, 78, .12); transition: transform .15s; }
.es-grade-tile:hover { transform: translateY(-3px); }
.es-grade-tile b { font-size: 1.35rem; }
.es-grade-tile span { font-size: .9rem; opacity: .95; }
.es-how { margin: 0 0 18px; padding: 18px 20px; background: #fff; border: 1px solid #c8dfe3; border-radius: 16px; }
.es-how h2 { margin: 0 0 12px; font-size: 1.4rem; }
.es-how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.es-how-steps li { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.es-how-steps svg { grid-row: 1 / 3; width: 64px; height: 64px; }
.es-how-steps b { font-size: 1.1rem; color: #12364b; }
.es-how-steps span { font-size: .95rem; color: #496373; line-height: 1.6; }
.es-filter { margin: 0 0 10px; }
.es-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.es-chips button { --c: #087c86; min-height: 44px; padding: 6px 18px; border: 2px solid var(--c); border-radius: 999px; background: #fff; color: var(--c); font: inherit; font-weight: 800; cursor: pointer; }
.es-chips button.is-on { background: var(--c); color: #fff; }
.es-grade { margin: 0 0 22px; }
.es-grade h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.35rem; }
.es-grade-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--c); color: #fff; font-size: 1.1rem; }
.es-unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.es-unit-grid[data-empty="1"]::after { content: "この分野の単元は、この学年にはありません。"; color: #71848d; font-size: .95rem; }
.es-unit { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px 18px; border: 1px solid #c7dddf; border-left: 6px solid var(--c); border-radius: 12px; background: #fff; color: #173b52; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.es-unit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(29, 63, 78, .12); }
.es-unit-field { color: var(--c); font-size: .78rem; font-weight: 900; letter-spacing: .06em; }
.es-unit strong { font-size: 1.1rem; color: #076c78; }
.es-unit-q { font-size: .95rem; color: #496373; line-height: 1.6; }
.es-unit-meta { margin-top: auto; padding-top: 4px; font-size: .82rem; color: #71848d; }
@media (max-width: 760px) {
  .es-hero { grid-template-columns: 1fr; }
  .es-hero-fig { max-width: 100%; justify-self: center; }
  .es-grade-tiles { grid-template-columns: repeat(2, 1fr); }
  .es-how-steps { grid-template-columns: 1fr; }
}
/* 共通の a の色指定より強くする（白文字のボタン・タイル） */
body[data-elementary-home] .es-btn-primary, body[data-elementary-home] .es-grade-tile, body[data-elementary-home] .es-grade-tile b, body[data-elementary-home] .es-grade-tile span { color: #fff; }
body[data-elementary-home] .es-chips button.is-on { color: #fff; }
.es-hero h1 .es-nw { display: inline-block; }
/* 単元カードの図（シミュレーターの画像・2026-10-20） */
.es-unit-thumb { width: calc(100% + 34px); height: auto; margin: -14px -16px 4px -18px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 10px 10px 0 0; border-bottom: 1px solid #e3eef0; background: #f7fbfc; }
/* 小学校のホームは中学のトップと同じ幅（1080px）で、PC では絵を大きく見せる */
body[data-elementary-home] .page-shell { max-width: 1080px; }
body[data-elementary-home] .es-hero { max-width: none; }
