/* ワークシート（A4 1枚） */
@page { size: A4; margin: 12mm; }
* { box-sizing: border-box; }
body { margin: 0; background: #e9e4d8; color: #1d1a16; font-family: 'Lexend', 'Noto Sans JP', 'Yu Gothic UI', sans-serif; font-size: 12.5pt; line-height: 1.55; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body.big { font-size: 15pt; }
.toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: #1f4e3d; color: #f4f1e8; font: 700 13px 'Zen Maru Gothic', sans-serif; }
.toolbar button, .toolbar a { border: 2px solid #1d1a16; border-radius: 999px; padding: 7px 16px; background: #ffd23f; color: #1d1a16; font: 900 14px 'Zen Maru Gothic', sans-serif; cursor: pointer; text-decoration: none; }
.toolbar a { background: #fff; }
.toolbar span { font-weight: 500; opacity: 0.9; font-size: 12px; }
.sheet { width: 210mm; min-height: 297mm; margin: 16px auto; background: #fff; padding: 12mm 13mm; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18); }
.wh { display: flex; gap: 12px; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #1d1a16; padding-bottom: 6px; margin-bottom: 8px; }
.kicker { margin: 0; font: 700 9pt 'Zen Maru Gothic', sans-serif; color: #1f4e3d; letter-spacing: 0.04em; }
.wh h1 { margin: 0; font: 800 22pt/1.15 'Lexend', 'Zen Maru Gothic', sans-serif; }
.big .wh h1 { font-size: 26pt; }
.wh h1 small { font-size: 12pt; background: #ff6b5b; color: #fff; padding: 1px 8px; border-radius: 6px; vertical-align: middle; }
.wh .sub { margin: 2px 0 0; font: 700 11pt 'Zen Maru Gothic', sans-serif; }
.who { display: flex; flex-direction: column; gap: 4px; font: 600 10pt 'Lexend', sans-serif; flex: none; }
.who span { display: flex; align-items: flex-end; gap: 4px; }
.who i { display: inline-block; width: 22mm; border-bottom: 1.5px solid #1d1a16; height: 1.2em; }
.who i.s { width: 12mm; }
.who i.l { width: 45mm; }
.inst { background: #fff6d6; border: 2px solid #1d1a16; border-radius: 10px; padding: 5px 10px; margin-bottom: 8px; font-size: 10.5pt; }
.big .inst { font-size: 13pt; }
.inst p { margin: 2px 0; }
.inst .en { color: #1f4e3d; font-weight: 600; }
.wb { margin: 0 0 9px; break-inside: avoid; }
.wb h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font: 800 12.5pt 'Lexend', 'Zen Maru Gothic', sans-serif; }
.big .wb h3 { font-size: 15pt; }
.bn { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #1f4e3d; color: #ffd23f; font-size: 10pt; flex: none; }
.wt { width: 100%; border-collapse: collapse; font-size: 11pt; }
.big .wt { font-size: 13pt; }
.wt th, .wt td { border: 1.5px solid #1d1a16; padding: 5px 7px; text-align: left; vertical-align: top; height: 2.1em; }
.wt th { background: #e8f3ee; font-weight: 700; }
.bank { display: flex; flex-wrap: wrap; gap: 5px; border: 2px dashed #1f4e3d; border-radius: 10px; padding: 6px; }
.bank span { border: 1.5px solid #1d1a16; border-radius: 999px; padding: 1px 10px; background: #fffbe9; font-size: 10.5pt; }
.dlg { border-left: 5px solid #ffd23f; padding-left: 10px; }
.dlg p { margin: 2px 0; }
.qs { margin: 0; padding-left: 1.5em; }
.qs li { margin: 0 0 5px; }
.ln { display: block; border-bottom: 1.3px solid #888; height: 1.9em; }
.big .ln { height: 2.4em; }
.opts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 2px; }
.prompt { margin: 0 0 2px; color: #444; }
.lines .ln:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); border: 2px solid #1d1a16; }
.grid span { border: 1px solid #1d1a16; aspect-ratio: 1.6; display: grid; place-items: center; text-align: center; padding: 3px; font-weight: 600; font-size: 11pt; }
.big .grid span { font-size: 14pt; }
/* half: true の表は2つ横に並べる（地図A・地図B など） */
.wb.half { display: inline-block; width: calc(50% - 6px); vertical-align: top; }
.wb.half + .wb.half { margin-left: 8px; }
.wb.half .grid span { font-size: 9pt; padding: 2px; aspect-ratio: 1.15; }
.txt { border: 2px solid #1d1a16; border-radius: 10px; padding: 6px 12px; font-size: 11.5pt; line-height: 1.75; }
.txt p { margin: 0 0 5px; }
.boxes { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; }
.boxes span { border: 2px solid #1d1a16; border-radius: 10px; height: 46mm; }
.chk { list-style: none; margin: 0; padding: 0; }
.chk li { margin: 3px 0; }
.chk li::before { content: '☐ '; font-size: 1.1em; }
.ans li { margin: 4px 0; }
.blank { display: inline-block; border-bottom: 1.5px solid #1d1a16; height: 1.1em; vertical-align: bottom; }
.wf { margin-top: 10px; border-top: 1px solid #bbb; padding-top: 4px; font-size: 7.5pt; color: #777; }
@media screen and (max-width: 820px) {
  .sheet { width: auto; min-height: 0; margin: 10px; padding: 16px; }
  .wh { flex-direction: column; align-items: flex-start; }
  /* スマホ：表や地図が画面の右にはみ出さないように（印刷には効かない） */
  .wb { overflow-x: auto; }
  .wb.half { display: block; width: auto; }
  .wb.half + .wb.half { margin-left: 0; }
  .wt, .big .wt { font-size: 10pt; }
  .wt th, .wt td { padding: 4px 5px; }
  .grid { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .grid span, .big .grid span { font-size: 9pt; padding: 2px; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
}
@media print {
  body { background: #fff; }
  .toolbar { display: none; }
  .sheet { margin: 0; padding: 0; width: auto; min-height: 0; box-shadow: none; }
}
@media print { .sheet { zoom: var(--fit, 1); } }
.wf { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }
