/* ── bundle_unit_price3_4（まとめ買いから一このねだんを求めよう、単元仕様書 v1.3）── */
/* 画面：問題文の下に、まとめ買いの表（見出しの行と数の行）と4択。PC幅では左右に、せまい幅では上下に並べる（§7 画面表示）。 */
.bup-main{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:10px 18px;margin:4px 0 6px;max-width:100%}
.bup-figure{flex:0 1 auto;max-width:100%}
.bup-table{border-collapse:collapse;margin:0 auto;background:#fff;font-size:1.05rem;font-variant-numeric:tabular-nums}
.bup-table th,.bup-table td{border:2px solid #64748b;padding:6px 10px;text-align:center;white-space:nowrap}
.bup-table th{background:#f1f5f9;font-weight:800;color:#1f2937}
.bup-table td{font-weight:800;color:#111827;font-size:1.15rem}
.bup-answer-side{display:flex;flex-direction:column;align-items:stretch;gap:6px;flex:0 1 auto;max-width:100%;min-width:0}
.bup-response{margin:0;font-weight:700;text-align:center}
.bup-choices{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;max-width:100%}
.bup-choice{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-height:48px;padding:6px 14px;border:2px solid #94a3b8;border-radius:12px;background:#fff;color:#111827;font-size:1.1rem;font-weight:700;font-family:inherit;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums}
.bup-choice:hover:not(:disabled){border-color:#1d4ed8;background:#eff6ff}
.bup-choice:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}
.bup-choice:disabled{cursor:default;opacity:1;color:#111827}
.bup-choice.bup-choice-correct{border:3px solid #15803d;background:#dcfce7}
.bup-choice.bup-choice-wrong{border:3px dashed #b91c1c;background:#fff1f2}
.bup-choice.bup-choice-selected{box-shadow:0 0 0 2px #111827 inset}
.bup-choice.bup-choice-selected:not(:disabled){border-color:#1d4ed8;background:#dbeafe;box-shadow:0 0 0 2px #1d4ed8 inset}
.bup-choice-tag{font-weight:900;min-width:1.1em}
.bup-choice-text{display:inline;line-height:1.4;min-width:0}
/* 式の中（数・記号・かっこ）では改行しない。折り返すのは「＝一このねだん」の前だけ（§7）。 */
.bup-choice-expr,.bup-choice-rest,.bup-choice-mark{white-space:nowrap}
.feedback.has-text.bup-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.feedback.has-text.bup-feedback-empty{color:#9a3412;font-weight:700}
.bup-answer-line{margin:4px 0 2px;font-weight:700;overflow-wrap:anywhere}
.bup-expl-text{margin:2px 0 6px;overflow-wrap:anywhere}
#page-quiz.active:has(.bup-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.bup-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.bup-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.bup-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
@media (max-width:560px){
  .bup-main{flex-direction:column;align-items:stretch}
  .bup-table{font-size:.95rem}
  .bup-table th,.bup-table td{padding:5px 6px}
  .bup-table td{font-size:1.05rem}
  .bup-answer-side{width:100%}
  .bup-choice{min-width:0;max-width:100%}
  .bup-choice{font-size:1rem;padding:6px 10px}
}

/* アプリのPDF（html2canvas）は等幅数字の指定を写せず数のあとにすき間ができるため、印刷では等幅数字を指定しない。 */
/* 印刷：A4縦・2列・1ページ（§7。用紙の余白10mm、本文190×277mm）。 */
/* 字の大きさは12.55pt・14.05pt・10.05pt：A4 の PDF は 594.96pt 幅に丸められ全体が0.9996倍になるため、紙の上で 12.5・14・10pt を下回らないよう少し大きくする（品質検査442）。 */
.bup-print-page{width:190mm;height:277mm;box-sizing:border-box;display:flex;flex-direction:column;padding:0;margin:0 auto 8mm;overflow:hidden;background:#fff;color:#000;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;font-size:12.55pt}
/* 共通の領域（38mm）：題名の枠、月・日・年・組・名前の記入欄と実線、共通の案内（3行まで。点数の欄は置かない）。 */
.bup-print-head{display:flex;flex-direction:column;height:39.1mm;flex:none;box-sizing:border-box;font-size:12.55pt}
.bup-print-title{box-sizing:border-box;margin:0 0 0.5mm;height:7.5mm;font-size:14.05pt;font-weight:700;line-height:6.4mm;text-align:center;white-space:nowrap;padding:0;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.bup-print-head .pp-fields{margin:0;height:7mm;line-height:7mm!important}
.bup-print-head .pp-fields-solid{margin:1mm 0!important}
.bup-print-instruction{margin:0;max-height:16.5mm;line-height:5.5mm;padding-right:3mm;overflow:hidden;overflow-wrap:break-word;word-break:normal;line-break:strict}
/* 問題：2列（各91mm、列の間5mm）×5段（各41mm）。各問の中は、番号と表（見出しの行・数の行）、その下に4択（1行に1つ）。 */
.bup-print-problems{display:grid;grid-template-columns:91mm 91mm;column-gap:5mm;flex:none;height:202mm;margin-top:1.3mm}
.bup-print-col{display:grid;grid-template-rows:repeat(5,40.4mm)}
.bup-print-cell{display:flex;flex-direction:column;height:40.4mm;overflow:hidden;box-sizing:border-box}
.bup-print-top{display:flex;align-items:center;gap:2mm}
.bup-print-number{flex:none;min-width:9mm;font-weight:700;line-height:6mm}
/* 線は2px（完成PDFで0.3mm以上）。アプリPDF（html2canvas）は重ねた線を二重に描いて内側の線が約1.1mmになり字にかかるため、重ねずに、表の上と左、各ます目の右と下に1本ずつ引く。 */
.bup-print-table{border-collapse:separate;border-spacing:0;border-top:2px solid #000;border-left:2px solid #000}
.bup-print-table th,.bup-print-table td{border:0 solid #000;border-width:0 2px 2px 0;height:6mm;padding:0 1.5mm;line-height:5.4mm;text-align:center;white-space:nowrap;box-sizing:border-box}
.bup-print-table th{font-weight:700}
/* 日本語の字は行の中で上に寄るため、少し下げて上の線との間をあける（品質検査442 のスモーク確認：見出しの字が上の線に触れていた）。 */
.bup-print-page[lang="ja"] .bup-print-table th,.bup-print-page[lang="ja"] .bup-print-table td{line-height:4.6mm;padding-top:0.8mm;padding-bottom:0}
.bup-print-choices{display:grid;grid-template-columns:1fr;line-height:5.7mm;white-space:nowrap;margin-top:0}
.bup-print-choice{overflow:hidden}
.bup-print-answers{flex:none;box-sizing:border-box;font-size:12.55pt}
.bup-print-dashed{box-sizing:content-box;display:block;height:0;margin:1mm 0 1mm;padding:0;border:0;border-top:2pt dashed #aaa}
.bup-print-answers-title{height:6mm;line-height:6mm;font-weight:700}
.bup-print-answers-row{display:grid;grid-template-columns:repeat(5,35.4mm);column-gap:2.5mm;height:10mm;line-height:10mm;font-size:10.05pt;white-space:nowrap}
.bup-print-ans{overflow:hidden}
.bup-app-pdf-page .bup-print-page{box-shadow:none;margin:0}

#pr-sheet[data-unit="bundle_unit_price3_4"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="bundle_unit_price3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="bundle_unit_price3_4"]>#pr-problems{display:block}
/* 画面のプレビューでは、用紙の余白10mmを白い縁で見せる（印刷の寸法は変えない）。 */
#pr-sheet[data-unit="bundle_unit_price3_4"] .bup-print-page{box-shadow:0 0 0 10mm #fff,0 0 4px 10mm rgba(0,0,0,.12);margin-bottom:calc(8mm + 10mm)}
@media print{
  #page-print #pr-sheet[data-unit="bundle_unit_price3_4"]{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;transform:none!important;box-shadow:none!important}
  #page-print #pr-sheet[data-unit="bundle_unit_price3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="bundle_unit_price3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="bundle_unit_price3_4"] .bup-print-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
