/* 黒板の緑、チョークの黄、赤ペンの赤がモチーフ。学年ごとに色が付く。
   色や書体は :root の変数を変えると、サイト全体に反映される。 */

:root {
  --ink: #1f2d27;
  --green: #24483b;
  --green-d: #1a362d;
  --link: #1e6b52;
  --band: #eef3ef;
  --line: #d5ddd7;
  --muted: #56645d;
  --yellow: #f7d64a;
  --cta: #b84a12;
  --red: #c8372d;
  --g0: #56645d;
  --g1: #c8372d;
  --g2: #b85400;
  --g3: #8a7300;
  --g4: #2e7d4f;
  --g5: #1f6fa8;
  --g6: #6b48a8;
  --body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --round: "Zen Maru Gothic", "BIZ UDPGothic", "Hiragino Maru Gothic ProN", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: #fff; font-family: var(--body); font-size: 16px; line-height: 1.75; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--round); line-height: 1.4; }
h1 { font-size: 30px; margin-bottom: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: .5rem; top: .5rem; z-index: 10; padding: .4rem .8rem; background: var(--yellow); }
.lead { color: var(--muted); }
.note { margin-top: 8px; font-size: 14px; color: var(--muted); }
[hidden] { display: none !important; }

/* ヘッダー */
.hd { background: var(--green); color: #fff; }
.hd-in { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--round); font-weight: 700; font-size: 26px; white-space: nowrap; }
.logo-mascot { flex: none; width: auto; margin: -4px 0; }
.search { display: flex; flex: 1; max-width: 560px; }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 3px 0 0 3px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; }
.search button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 96px; height: 44px; border: 0; border-radius: 0 3px 3px 0; font: 700 15px var(--body); color: var(--ink); background: var(--yellow); cursor: pointer; }
.search.on-white input { border: 1.5px solid var(--green); border-right: 0; }
.hd-links { display: flex; gap: 6px; margin-left: auto; }
.hd-links a { padding: 8px 12px; font-size: 15px; color: #fff; text-decoration: none; }
.gnav { background: #fff; border-bottom: 1px solid var(--line); }
/* 入りきらない幅では横にスクロールする(スクロールバーは出さない) */
.gnav .wrap { display: flex; align-items: center; gap: 2px; height: 52px; overflow-x: auto; scrollbar-width: none; }
.gnav .wrap::-webkit-scrollbar { display: none; }
.gnav a { display: flex; flex: none; align-items: center; height: 52px; padding: 0 12px; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.gnav a.sub { font-weight: 400; }
.gnav a:hover { box-shadow: inset 0 -4px 0 var(--yellow); }
.gnav .sep { flex: none; width: 1px; height: 20px; margin: 0 6px; background: var(--line); }
.crumbs { padding: 14px 0 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs .s { margin: 0 8px; }

/* 2カラム */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 24px; padding-bottom: 56px; }
section { margin-bottom: 36px; }
h2.sec { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 8px; font-size: 22px; border-bottom: 2px solid var(--green); }
h2.sec small { margin-left: 4px; font: 400 13px var(--body); color: var(--muted); }
h2.sec a { color: inherit; text-decoration: none; }
h2.sec a:hover { text-decoration: underline; }
h2.sec.s { font-size: 18px; }
h1 .chip { margin-right: 10px; height: 30px; font-size: 16px; vertical-align: 4px; }

/* 使う場面など、長い一覧の上に置くジャンプ用ナビ */
.jumpnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--band); }
.jumpnav a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; }
.jumpnav a:hover { box-shadow: inset 0 -4px 0 var(--yellow); }
.grade-sub { margin: 20px 0 4px; font-size: 15px; color: var(--muted); }

/* 学年の表 */
.tabs { display: flex; }
.tabs a { display: block; white-space: nowrap; margin-right: 4px; padding: 8px 26px; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; font-weight: 700; color: var(--ink); text-decoration: none; background: var(--band); }
.tabs a.on { background: #fff; box-shadow: inset 0 4px 0 var(--yellow); }
.tabs button { display: block; white-space: nowrap; margin-right: 4px; padding: 8px 26px; border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; font: inherit; font-weight: 700; color: var(--ink); background: var(--band); cursor: pointer; }
.tabs button.on { background: #fff; box-shadow: inset 0 4px 0 var(--yellow); }
.tabs.sm button { padding: 6px 18px; font-size: 14px; }

.course-fold { margin: -6px 0 16px; }
.course-fold summary { padding: 10px 14px; background: var(--band); border-radius: 4px; font-size: 14px; font-weight: 700; color: var(--green); cursor: pointer; }
.course-fold[open] summary { border-radius: 4px 4px 0 0; }

/* コース(復習スケジュール) */
.course-step { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--green); }
.course-help { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.course-note { margin-top: -1px; }
.course-note-js { padding: 10px 0; font-size: 14px; color: var(--muted); }
.course-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.seg { display: inline-flex; border: 1.5px solid var(--green); border-radius: 20px; overflow: hidden; }
.seg button { padding: 8px 16px; border: 0; border-right: 1.5px solid var(--green); font: inherit; font-size: 14px; font-weight: 700; color: var(--green); background: #fff; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { color: #fff; background: var(--green); }
.course-date { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.course-date input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.zipbtn { padding: 9px 18px; border: 1.5px solid var(--green); border-radius: 20px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--green); background: #fff; cursor: pointer; }
.zipbtn:hover { background: var(--band); }
.zipbtn:disabled { opacity: 0.5; cursor: default; }
.course-list { margin-top: 18px; padding: 0; list-style: none; }
.course-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.course-list .cn { flex: none; min-width: 6.5em; font-weight: 700; color: var(--green); }
.course-list a { color: var(--link); text-decoration: none; }
.course-list a:hover { text-decoration: underline; }
.course-list .course-dl { margin-left: auto; font-size: 13px; color: var(--muted); }
/* 列の数は --cols(学年が3つより少ない教科は、その数だけの列にする)。
   区切り線は各マスの右と下の影で引き、表の外枠からはみ出た分は隠す(最後の行が欠けても線が崩れない) */
.gtable { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); margin-bottom: 20px; }
.gcell { padding: 14px 16px 12px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.gh { display: flex; align-items: center; gap: 10px; font: 700 20px var(--round); color: var(--ink); text-decoration: none; }
.gh .chip { height: 26px; font-size: 16px; }
.gcell ul { margin-top: 6px; }
.gcell li { position: relative; padding: 5px 0 5px 14px; font-size: 14px; line-height: 1.5; }
.gcell li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 5px; height: 5px; background: #9aa8a0; }
.gcell .more { display: block; margin-top: 6px; font-size: 13px; }

/* 学年ラベルとNEW */
.chip { display: inline-flex; flex: none; align-items: center; white-space: nowrap; justify-content: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: 3px; font-size: 12px; font-weight: 700; line-height: 1; color: #fff; background: var(--g0); }
.g1 { background: var(--g1); } .g2 { background: var(--g2); } .g3 { background: var(--g3); }
.g4 { background: var(--g4); } .g5 { background: var(--g5); } .g6 { background: var(--g6); }
.new { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 2px; font-size: 11px; font-weight: 700; line-height: 1.5; color: var(--ink); background: var(--yellow); }

/* 見本つきのプリント一覧 */
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 20px; }
.item a { display: block; color: var(--ink); text-decoration: none; }
.thumb { overflow: hidden; aspect-ratio: 1 / 1.414; background: #fff; border: 1px solid #bfcac3; box-shadow: 2px 3px 0 #dfe6e1; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { display: grid; place-items: center; height: 100%; padding: 8px; font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); }
.item .cap { margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--link); }
.item a:hover .cap { text-decoration: underline; }
.item .meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* 罫線入りの行 */
.rows { border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 12px 8px; color: var(--ink); text-decoration: none; }
.rows a:hover { background: var(--band); }
.row-title { font-weight: 700; color: var(--link); }
.row-meta { font-size: 14px; color: var(--muted); }

/* 場面・時期のボタン */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1.5px solid var(--green); border-radius: 20px; font-size: 15px; font-weight: 700; color: var(--green); text-decoration: none; background: #fff; }
.chips a:hover { background: var(--yellow); }
.chips.m a { justify-content: center; min-width: 58px; height: 38px; padding: 0 10px; border-color: #9fb3a9; border-radius: 4px; font-weight: 400; color: var(--ink); }

/* 右側と補助ボックス */
.box { padding: 16px 18px; background: var(--band); border-radius: 4px; }
.box h3 { margin-bottom: 8px; font-size: 16px; }
.kv { display: grid; grid-template-columns: 5em 1fr; gap: 2px 10px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.news li { padding: 8px 0; border-bottom: 1px dotted #b8c4bc; font-size: 14px; line-height: 1.55; }
.news time { display: block; font-size: 12px; color: var(--muted); }
.faq { margin: 0; }
.faq dt { margin-top: 10px; font-size: 14px; font-weight: 700; }
.faq dd { margin: 2px 0 0; font-size: 14px; line-height: 1.6; }
.ad { margin: 24px 0; min-height: 1px; }
.ad small { display: block; font-size: 11px; color: var(--muted); }

/* 左メニュー(単元ツリー) */
.tree > li > a { display: block; padding: 7px 8px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.tree > li > a:hover { text-decoration: underline; }
.tree > li > a.cur { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.tree ul { margin: 0 0 4px 12px; border-left: 2px solid var(--line); }
.tree ul a { display: block; padding: 4px 10px; font-size: 14px; line-height: 1.5; color: var(--link); text-decoration: none; }
.tree ul a.cur { font-weight: 700; color: var(--ink); background: var(--yellow); }

/* プリント個別ページ */
.ph1 { display: flex; align-items: center; margin: 6px 0 0; font-size: 32px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 12px 0 24px; font-size: 14px; color: var(--muted); }
.pv { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 36px; align-items: start; }
.acts { display: grid; gap: 12px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 60px; padding: 0 16px; border-radius: 4px; font-size: 17px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn.p { color: #fff; background: var(--cta); }
.btn.p:hover { background: #9c3d0d; }
.btn.s { color: var(--red); background: #fff; border: 2px solid var(--red); }
.btn.s:hover { background: #fff1ef; }
.btn.link { justify-content: flex-start; height: auto; padding: 0; font-size: 15px; font-weight: 400; color: var(--link); text-decoration: underline; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pn a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; color: var(--ink); text-decoration: none; }
.pn a:hover { background: var(--band); }
.pn a small { display: block; font-size: 12px; color: var(--muted); }
.pn a.off { color: #8a9891; background: #f6f8f6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.two-col h2.sec { font-size: 20px; }
.bul { padding-left: 1.2em; list-style: disc; line-height: 1.85; }
.shop { margin: 24px 0; padding: 14px 20px; background: var(--yellow); }
.prose { max-width: 40rem; }
.prose h2 { margin: 28px 0 8px; padding-bottom: 6px; font-size: 20px; border-bottom: 2px solid var(--green); }
.prose p, .prose ul { margin: 8px 0; }
.prose ul { padding-left: 1.4em; list-style: disc; }
.prose table { width: 100%; margin: 12px 0; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.prose th { background: var(--band); font-weight: 700; }
.facts { display: grid; grid-template-columns: 9em 1fr; gap: 6px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.play-card { margin: 20px 0; padding: 20px; background: var(--band); border: 1px solid var(--line); border-radius: 14px; }
.play-card-eyebrow { margin: 0 0 4px; font-family: var(--round); font-weight: 700; font-size: 18px; }
.play-btn { display: inline-block; margin-top: 8px; padding: 12px 28px; background: var(--cta); color: #fff; font-family: var(--round); font-weight: 700; font-size: 16px; border-radius: 999px; text-decoration: none; }
.play-btn:hover { opacity: .9; }

.game-banner { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--band); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.game-banner:hover { border-color: var(--cta); }
.game-banner-text { display: flex; flex-direction: column; }
.game-banner-eyebrow { font-size: 13px; color: var(--muted); }
.game-banner-title { font-family: var(--round); font-weight: 700; font-size: 17px; }
.game-banner-arrow { margin-left: auto; color: var(--cta); font-weight: 700; font-size: 18px; }
.license { white-space: pre-wrap; font-size: 12px; line-height: 1.5; padding: 12px 14px; background: var(--band); border-radius: 8px; overflow-x: auto; }

/* コラム(読みもの記事、プリントとは別枠) */
.col-list { display: grid; gap: 20px; margin-top: 24px; }
.col-card { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.col-card a { display: block; color: var(--ink); text-decoration: none; }
.col-card-title { font: 700 19px var(--round); color: var(--link); }
.col-card a:hover .col-card-title { text-decoration: underline; }
.col-card-summary { margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.col-card-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.col-card-meta .tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 10px; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.pr-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 3px; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); vertical-align: 2px; }
.pr-notice { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.col-body .data-table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 14px; }
.col-body .data-table th, .col-body .data-table td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.col-body .data-table th { background: var(--band); }
.col-body .note { margin: -4px 0 12px; font-size: 12.5px; color: var(--muted); }
.col-body .lead { font-size: 17px; line-height: 1.9; }
.col-body p { line-height: 1.9; }
.col-body .point { margin: 22px 0; padding: 16px 20px; border-left: 4px solid var(--green); background: var(--band); border-radius: 0 8px 8px 0; font-family: var(--round); font-weight: 700; font-size: 19px; line-height: 1.6; }
.col-body b { color: var(--green-d); }
.cta-box { margin: 28px 0; padding: 20px 22px; border: 2px solid var(--yellow); border-radius: 8px; background: #fffdf3; }
.cta-pr { display: inline-block; margin: 0 0 6px; padding: 1px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); }
.cta-title { font: 700 18px var(--round); margin: 0 0 8px; }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; margin-top: 12px; padding: 0 24px; border-radius: 4px; font-size: 16px; font-weight: 700; color: #fff; background: var(--cta); text-decoration: none; }
.cta-btn:hover { background: #9c3d0d; }
.cta-disclaimer { margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.col-sources { margin-top: 32px; font-size: 13.5px; }
.col-sources ul { padding-left: 1.2em; list-style: disc; }
.col-sources li { margin: 4px 0; }
.col-back { margin-top: 28px; }

/* フッター */
.ft { margin-top: 8px; padding: 36px 0 22px; font-size: 14px; color: #e6efe9; background: var(--green-d); }
.ft a { display: block; padding: 3px 0; color: #e6efe9; text-decoration: none; }
.ft a:hover { text-decoration: underline; }
.ft .cols { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 32px; }
.ft h4 { margin: 0 0 6px; font: 700 14px var(--body); color: #fff; }
.ft p { line-height: 1.7; }
.ft .cp { margin-top: 24px; font-size: 13px; color: #a9bdb2; }

/* 画面が狭いとき */
@media (max-width: 1140px) {
  /* メニューが入りきらない幅。右端をうすくして、横にスクロールできることを見せる */
  .gnav .wrap { padding-right: 36px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
}
@media (max-width: 900px) {
  .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hd-in { flex-wrap: wrap; height: auto; gap: 8px 16px; padding-top: 10px; padding-bottom: 14px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search button { min-width: 52px; }
  .search button span { display: none; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .pv { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pv-thumb { max-width: 320px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .ft .cols { grid-template-columns: 1fr 1fr; }
  .ft .cols > div:first-child { grid-column: 1 / -1; }
  aside { margin-top: 12px; }
  h1 { font-size: 26px; }
  .ph1 { font-size: 26px; }
}
@media (max-width: 700px) {
  .hd-links { display: none; }
  h2.sec small { display: none; }
  .tabs a { flex: 1; margin-right: 3px; padding: 11px 0; font-size: 14px; text-align: center; }
  .tabs a:last-child { margin-right: 0; }
  .gcell { display: flex; align-items: center; justify-content: center; padding: 10px 4px; }
  .gcell ul, .gcell .more { display: none; }
  .gh { flex-direction: column; gap: 4px; min-height: 68px; justify-content: center; font-size: 15px; }
  .gh .chip { min-width: 52px; height: 34px; font-size: 18px; }
  .search.on-white button span { display: inline; }
}

/* ブラウザの印刷では、プリント以外の要素を隠す */
@media print {
  .hd, .gnav, .crumbs, .ft, .ad, .shop, .acts, .skip, aside { display: none; }
  .two { display: block; }
  .no-print { display: none !important; }
}

/* その場で作る(型と条件を選ぶと、PDFと同じ紙面の見本がすぐに変わる) */
.gen { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.gen-controls { padding: 18px 20px; background: var(--band); border-radius: 4px; }
.gen-step { margin-bottom: 16px; }
.gen-step h3 { margin: 0 0 8px; font-size: 14px; }
.gen-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-btns button { padding: 7px 13px; border: 1.5px solid var(--green); border-radius: 20px; font: 700 14px var(--body); color: var(--green); background: #fff; cursor: pointer; }
.gen-btns.many button { padding: 5px 10px; font-size: 13px; }
.gen-btns button.on { color: #fff; background: var(--green); }
.gen-note { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.gen-note.warn { color: #b3261e; font-weight: 700; }
.gen-actions { display: grid; gap: 10px; margin-top: 20px; }
.gen-actions .btn { width: 100%; height: 50px; font: 700 15px var(--body); cursor: pointer; }
.gen-actions .btn.p, .gen-actions .btn.g, .gen-bar .btn { border: 0; }
.btn.g { color: #fff; background: var(--green); }
.btn.g:hover { background: var(--green-d); }
.gen .btn:disabled { opacity: 0.4; cursor: default; }
.gen-btns.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.gen-btns.list button { padding: 5px 6px; border-radius: 6px; font: 400 15px/1.3 var(--body); letter-spacing: 0.08em; }
.gen-bar { display: none; gap: 10px; margin-bottom: 10px; }
.gen-bar .btn { flex: 1; height: 46px; font: 700 15px var(--body); cursor: pointer; }
.gen-actions .btn[hidden] { display: none; }
.gen-paper { position: relative; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; background: #fff; border: 1px solid #bfcac3; box-shadow: 2px 3px 0 #dfe6e1; }
.gen-paper iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform: scale(var(--s, 0.6)); transform-origin: 0 0; pointer-events: none; }
.gen-err { margin-top: 12px; padding: 12px 14px; border-radius: 4px; background: #fdecea; color: #7a1c14; font-size: 15px; }
.faq dt { margin-top: 14px; font-weight: 700; }
.faq dd { margin: 4px 0 0; }
.bul { margin: 8px 0 0; padding-left: 1.3em; }
.bul li { margin: 4px 0; }
/* 見本が狭くなりすぎる幅では、操作パネルを見本の上に置く */
@media (max-width: 1080px) and (min-width: 901px), (max-width: 680px) {
  .gen { grid-template-columns: minmax(0, 1fr); }
  .gen-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 20px; }
  .gen-actions, #genUrlNote { grid-column: 1 / -1; }
  .gen-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 4px; }
  .gen-bar { display: flex; }
}
.gen-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gen-link .btn { height: 48px; font-size: 15px; }

/* 日本語サポート: ふつう / ふりがなつき の切りかえ */
.rtog { display: inline-flex; border: 1.5px solid var(--green); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.rtog button { font: inherit; font-size: 15px; padding: 7px 16px; border: 0; background: #fff; color: var(--green); cursor: pointer; }
.rtog button.on { background: var(--green); color: #fff; }
.nh-g { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 18px 0 6px; }
.nh-u { border-bottom: 1px solid var(--line); }
.nh-u summary { display: flex; gap: 12px; list-style: none; padding: 10px 8px; font-weight: 700; color: var(--link); cursor: pointer; }
.nh-u summary::-webkit-details-marker { display: none; }
.nh-u summary::before { content: "▸"; margin-right: -4px; color: var(--muted); }
.nh-u[open] summary::before { content: "▾"; }
.nh-u summary > :first-child { margin-right: auto; }
.nh-u summary span { font-size: 14px; font-weight: 400; color: var(--muted); }
.nh-u summary:hover { background: var(--band); }
.nh-rows { margin: 0 0 10px; padding: 0 0 0 16px; list-style: none; }
.nh-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 8px; border-top: 1px dotted var(--line); }
.nh-t { color: var(--ink); }
.nh-t small { margin-left: 8px; font-size: 13px; color: var(--muted); }
.nh-dl { display: flex; gap: 8px; }
.nh-dl a { padding: 3px 12px; border: 1px solid var(--green); border-radius: 4px; font-size: 14px; font-weight: 700; color: var(--green); text-decoration: none; white-space: nowrap; }
.nh-dl a:hover { background: var(--band); }
