/* ワークシート（印刷用の紙）。画面では紙を並べて見せ、印刷では A4 にそのまま出す */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #efe9dc; color: #1b1a22; font: 500 10.5pt/1.7 'Zen Kaku Gothic New', 'Hiragino Sans', 'BIZ UDPGothic', 'Yu Gothic', sans-serif; }
.ws-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between; padding: 10px 14px; background: #1b1a22; color: #fff; font-size: 13px; font-weight: 700; }
.ws-bar a { color: #fff; }
.ws-bar button { font: 900 14px 'Zen Maru Gothic', sans-serif; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: #ffc928; color: #1b1a22; cursor: pointer; }
.ws-sheet { position: relative; width: 210mm; max-width: 100%; min-height: 297mm; margin: 14px auto; padding: 13mm 14mm 16mm; background: #fff; box-shadow: 0 8px 30px -14px rgba(0, 0, 0, 0.4); }
.ws-hd { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: end; border-bottom: 2.5pt solid #1b1a22; padding-bottom: 5px; margin-bottom: 9px; }
.ws-hd .k { grid-column: 1 / -1; margin: 0; font: 400 11pt/1 'Bebas Neue', sans-serif; letter-spacing: 0.12em; color: #f0245a; font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 900; font-size: 8.5pt; }
.ws-hd h1 { margin: 0; font: 900 15pt/1.3 'Zen Maru Gothic', sans-serif; }
.ws-hd .nm { margin: 0; font-size: 9pt; border-bottom: 0.8pt solid #1b1a22; min-width: 62mm; padding: 0 0 1px; white-space: pre; }
.ws-sheet h2 { font: 900 10.5pt/1.5 'Zen Kaku Gothic New', sans-serif; margin: 11px 0 6px; padding: 2px 8px; background: #1b1a22; color: #fff; border-radius: 3px; }
.ws-pt { border: 1.2pt solid #1b1a22; border-radius: 6px; padding: 6px 10px; margin: 0 0 4px; font-size: 9.5pt; line-height: 1.65; break-inside: avoid; }
.ws-pt > b:first-child { display: inline-block; background: #ffc928; padding: 0 7px; border-radius: 3px; margin-right: 8px; font-size: 8.5pt; }
.ws-pt ol { margin: 3px 0 0; padding-left: 1.5em; }
.ws-pt mark, .ws-sheet mark { background: none; color: inherit; font-weight: 900; border-bottom: 1pt solid #1b1a22; }
.ws-s { position: relative; padding: 2px 0 4px 24px; break-inside: avoid; }
.ws-s .n { position: absolute; left: 0; top: 4px; font-weight: 900; font-size: 9.5pt; }
.ws-s .en { margin: 0; font: 500 12.5pt/2.6 'Source Serif 4', Georgia, serif; word-spacing: 0.12em; }
.ans .ws-s .en { line-height: 2.9; font-size: 11.5pt; }
.ans .ws-s .en:not(.kp-s) { line-height: 1.7; }
.ws-s .ln { margin: 0; height: 7.4mm; border-bottom: 0.6pt dotted #777; }
.ws-s .ja { margin: 2px 0 0; font-weight: 900; font-size: 9.5pt; }
.ws-s .ja::before { content: '訳'; display: inline-block; font-size: 7.5pt; background: #1b1a22; color: #fff; border-radius: 3px; padding: 0 5px; margin-right: 6px; }
.ws-s .tip { margin: 0; font-size: 9pt; color: #444; }
.ws-s .ch { margin: 0 0 2px; display: flex; flex-wrap: wrap; gap: 3px 4px; font-size: 8.5pt; line-height: 1.35; }
.ws-s .ch span { border: 0.6pt solid #bbb; border-radius: 4px; padding: 1px 5px; font-family: 'Source Serif 4', Georgia, serif; }
.ws-s .ch i { display: block; font-style: normal; font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 700; color: #c2103f; }
.ws-leg { font-size: 7.5pt; color: #555; margin: 4px 0 0; }
.ws-q, .ws-a { margin: 0; padding-left: 1.6em; }
.ws-q > li { margin: 0 0 4px; font-size: 9.8pt; line-height: 1.6; break-inside: avoid; }
.ws-q p { margin: 0 0 2px; font-weight: 700; }
.ws-q ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px 14px; font-size: 9.5pt; }
.ws-q ul b { display: inline-block; width: 1.5em; }
.ws-a > li { margin: 0 0 4px; font-size: 9.5pt; line-height: 1.6; break-inside: avoid; }
.ws-a .ok { display: inline-block; min-width: 1.6em; text-align: center; background: #1b1a22; color: #fff; border-radius: 3px; margin-right: 4px; }
.ws-psg { font: 500 11.5pt/2.1 'Source Serif 4', Georgia, serif; border: 1pt solid #1b1a22; border-radius: 6px; padding: 4px 12px; }
.ws-psg.sm { font-size: 10pt; line-height: 2.1; }
.ws-psg p { margin: 0; text-indent: 1.2em; }
.ws-ja { margin: 0; font-size: 9pt; line-height: 1.7; }
.ws-ft { position: absolute; left: 14mm; right: 14mm; bottom: 7mm; font-size: 7.5pt; color: #777; border-top: 0.5pt solid #bbb; padding-top: 3px; }
/* 解答の構造（サイトと同じ印を、印刷でも読める形で） */
.kp-s .w { position: relative; display: inline-block; white-space: nowrap; line-height: 1.5; padding: 0 0.04em; }
.kp-s .w .ul { position: absolute; left: -0.16em; right: -0.16em; bottom: -3px; height: 2.4pt; background: var(--rc); }
.kp-s .w.rs .ul { left: 0; } .kp-s .w.re .ul { right: 0; }
.kp-s .w.sb .ul { height: 1.2pt; }
.kp-s .w .lb { position: absolute; left: 0; bottom: -15px; font: 900 8pt/1 'Zen Kaku Gothic New', sans-serif; font-style: normal; color: var(--rc); }
.kp-s .r-S { --rc: #0b6fc2; } .kp-s .r-V { --rc: #d1124a; } .kp-s .r-O { --rc: #0a8a63; } .kp-s .r-C { --rc: #d15f00; } .kp-s .r-M { --rc: #777; }
.kp-s .br { font: 900 1.1em/1 'Zen Kaku Gothic New', sans-serif; font-style: normal; }
.kp-s .br.b1 { color: #5b2fe0; } .kp-s .br.b2 { color: #0b7f6c; } .kp-s .br.b3 { color: #96600f; }
.rp-p mark { background: none; color: inherit; border: 0; font-weight: inherit; }
.rp-p mark.h-key { background: linear-gradient(transparent 55%, #ffe58a 55%); }
.rp-p mark.h-sig { outline: 1.4pt solid #d1124a; border-radius: 999px; padding: 0 4px; font-weight: 700; }
.rp-p mark.h-main { border-bottom: 2.2pt solid #0b6fc2; font-weight: 700; }
.rp-p mark.h-ex { color: #999; }
.rp-p mark.h-para { border-bottom: 1.4pt dashed #0a8a63; }
.rp-p mark.h-ref { text-decoration: underline wavy #5b2fe0; text-underline-offset: 3px; }
@media (max-width: 800px) { .ws-sheet { padding: 20px 16px 40px; min-height: 0; } .ws-ft { position: static; margin-top: 16px; } .ws-hd { grid-template-columns: 1fr; } .ws-q ul { grid-template-columns: 1fr; } }
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .ws-bar { display: none; }
  .ws-sheet { width: 210mm; max-width: none; min-height: 0; height: 296mm; margin: 0; padding: 13mm 14mm 16mm; box-shadow: none; break-after: page; overflow: hidden; }
  .ws-sheet:last-child { break-after: auto; }
  .ws-ft { position: absolute; margin: 0; }
  .ws-hd { grid-template-columns: 1fr auto; } .ws-q ul { grid-template-columns: 1fr 1fr; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
