/* ── long_division_steps3_4（一けたでわる筆算を組み立てよう、単元仕様書 v1.5）── */
/* 画面：問題文、筆算の図と手順の一覧（PC は左右、せまい画面は上下）、4択、回答案内。回答後は全部の正しい手順、問うた手順のますを太字と下線、だんごとのたしかめ（§5-3・§7）。 */
#question-text .lds-q{display:block}
.lds-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center}
.lds-figs{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:12px;width:min(100%,720px);margin:2px auto 8px}
.lds-grid-wrap{max-width:100%;padding:6px 10px;border:2px solid #64748b;border-radius:10px;background:#fff}
.lds-grid{border-collapse:collapse;font-variant-numeric:tabular-nums;font-weight:800;color:#0f172a}
.lds-cell{width:28px;height:28px;padding:0;text-align:center;vertical-align:middle;font-size:20px;line-height:1}
.lds-cell-d{width:38px;color:#1e3a8a;padding-right:10px}
/* わり算の記号（筆算の「）」）は、上の横線の左はしからなめらかな弧で下ろす（ほかの筆算ドリルと同じ形。2026-11-23 ひろさんの指摘：直角の「┌」形だった）。横線と同じ太さで、上の端を横線の高さにそろえる。 */
.lds-row-n .lds-cell-d{position:relative}
.lds-bracket{position:absolute;top:-1.5px;bottom:0;right:-1px;width:10px;color:#0f172a;pointer-events:none}
.lds-bracket svg{display:block;width:100%;height:100%;overflow:visible}
.lds-row-n .lds-cell:not(.lds-cell-d){border-top:3px solid #0f172a}
.lds-row-line .lds-cell:not(.lds-cell-d){border-bottom:2px solid #334155}
.lds-row-q .lds-cell{color:#b45309}
.lds-cell-mark{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:3px;color:#15803d;background:#ecfdf5}
.lds-list{min-width:180px;max-width:100%;padding:6px 10px;border:2px dashed #94a3b8;border-radius:10px;background:#f8fafc}
.lds-list-head{font-size:13px;font-weight:700;color:#475569;margin-bottom:2px}
.lds-steps,.lds-checks{margin:0;padding-left:1.1em;text-align:left;font-size:15px;font-weight:700;line-height:1.5}
.lds-checks{margin-top:6px;padding-top:4px;border-top:1px dashed #94a3b8;color:#1e3a8a}
.lds-guide{margin:4px 0 2px;font-size:15px;font-weight:700;text-align:center;line-height:1.4}
.lds-guide[hidden]{display:none}
.lds-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,640px);margin:2px auto}
.lds-choice{position:relative;box-sizing:border-box;min-height:52px;padding:6px 8px 6px 26px;border:3px solid #64748b;border-radius:10px;background:#fff;color:#1e293b;font-size:1.05rem;font-weight:800;font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation;text-align:left;word-break:keep-all;overflow-wrap:anywhere}
.lds-check{position:absolute;top:1px;left:6px;font-size:18px;font-weight:900;color:#1d4ed8}
.lds-choice.lds-on{background:#dbeafe;border-color:#1d4ed8;color:#1e3a8a}
.lds-choice:focus-visible{outline:3px solid #f59e0b;outline-offset:1px}
.lds-choice:disabled{cursor:default;opacity:1}
.lds-choice.lds-ok,.lds-choice.lds-ok:disabled{border:3px solid #15803d;background:#dcfce7;color:#14532d}
.lds-choice.lds-ng,.lds-choice.lds-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2;color:#7f1d1d}
.lds-choice.lds-right,.lds-choice.lds-right:disabled{border:3px solid #15803d;background:#f0fdf4;color:#14532d}
.lds-ok .lds-check,.lds-right .lds-check{color:#15803d}
.lds-ng .lds-check{color:#b91c1c}
.lds-msg{min-height:1.4em;margin:4px 0 2px;color:#b45309;font-weight:700;text-align:center;line-height:1.4}
.lds-msg:empty{min-height:0;margin:0}
.feedback.has-text.lds-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.lds-correct{margin:2px 0 6px;font-weight:800;font-size:17px;overflow-wrap:anywhere}
.lds-expl-text{margin:4px 0 6px;word-break:normal;overflow-wrap:normal;line-break:strict}
.lds-score{margin:6px 0 2px;font-weight:800;color:#1e3a8a}
@media (max-width:480px){.lds-figs{flex-direction:column;align-items:center}.lds-list{width:100%;box-sizing:border-box}.lds-cell{width:24px;height:24px;font-size:17px}.lds-cell-d{width:33px;padding-right:9px}.lds-bracket{width:9px}.lds-choices{grid-template-columns:minmax(0,1fr)}}
@media (max-width:360px){.lds-cell{width:22px;height:22px;font-size:16px}.lds-cell-d{width:31px}.lds-choice{font-size:.98rem;padding-left:24px}}

.lds-example .lds-ex-q{font-weight:700;margin:6px 0 2px}
.lds-example .lds-ex-a{margin:2px 0 8px;overflow-wrap:anywhere}
#page-quiz.active:has(.lds-main) #question-text{word-break:normal;overflow-wrap:anywhere;line-break:strict}
#page-quiz.active:has(.lds-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.lds-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.lds-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.lds-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}

/* 印刷：A4縦・5列2段・1ページ（§7）。題名の枠（幅いっぱい・中央）とその下の記入欄、共通の案内、5列2段（各問 36mm×109.5mm）、破線、答え1行。 */
.lds-pr-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}
.lds-pr-headrow{display:flex;flex-direction:column;gap:0;flex:none}
.lds-pr-headrow .pp-fields{height:8mm;margin:1mm 0 0}
.lds-pr-headrow .pp-field-line{height:6mm}
.lds-pr-headrow hr.pp-fields-solid{margin:1mm 0 0!important;border:0;border-top:1.5pt solid #333}
.lds-pr-title{box-sizing:border-box;margin:0;height:8mm;width:100%;padding:0 2mm;font-size:14pt;font-weight:700;line-height:7.4mm;white-space:nowrap;text-align:center;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact;flex:none}
.lds-pr-inst{flex:none;box-sizing:border-box;width:184mm;margin:1.2mm 0 0;font-size:12.5pt;line-height:5.3mm}
.lds-pr-problems{flex:none;display:grid;grid-template-columns:repeat(5,36mm);column-gap:1.5mm;row-gap:0;margin:5.2mm 0 0}
.lds-pr-cell{box-sizing:border-box;height:109.5mm;overflow:hidden;padding:0.6mm 0 0}
.lds-pr-num{height:5.5mm;line-height:5.5mm;font-size:12.5pt;font-weight:700;white-space:nowrap}
.lds-pr-grid{margin:0 0 1.5mm}
.lds-pr-grid .lds-cell{box-sizing:border-box;width:4.5mm;height:4mm;font-size:11pt;line-height:4mm}
.lds-pr-grid .lds-cell-d{width:6.1mm;color:#000;padding-right:1.6mm}
.lds-pr-grid .lds-bracket{top:-1px;width:1.6mm;color:#000}
.lds-pr-grid .lds-bracket path{stroke-width:2}
.lds-pr-grid .lds-row-n .lds-cell:not(.lds-cell-d){border-top:2px solid #000}
.lds-pr-grid .lds-row-line .lds-cell:not(.lds-cell-d){border-bottom:2px solid #000}
.lds-pr-grid .lds-row-q .lds-cell{color:#000}
.lds-pr-choices{font-size:12.5pt;line-height:5.1mm;white-space:nowrap}
.lds-pr-l1,.lds-pr-l2{height:5.1mm}
.lds-pr-page[lang="en"] .lds-pr-l2{padding-left:0;letter-spacing:-0.1mm}
.lds-pr-l2{padding-left:5mm}
.lds-pr-answers{flex:none;box-sizing:border-box;width:190mm;margin-top:auto;padding-bottom:5.6mm}
.lds-pr-dashed{box-sizing:content-box;display:block;height:0;margin:0 0 0.8mm;padding:0;border:0;border-top:2pt dashed #aaa}
.lds-pr-ansrow{display:grid;grid-template-columns:22mm repeat(10,16.8mm);align-items:baseline;height:5.5mm;line-height:5.5mm;font-size:10pt;white-space:nowrap}
.lds-pr-answers-title{font-weight:700;font-size:12.5pt}
.lds-app-pdf-page .lds-pr-page{box-shadow:none;margin:0}
/* アプリの PDF（html2canvas）は表の横線を約1px下にえがくので、記号の上の端も1px下げてそろえる（独立検査 IR5-01）。 */
.lds-app-pdf-page .lds-pr-grid .lds-bracket{top:0}

#pr-sheet[data-unit="long_division_steps3_4"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="long_division_steps3_4"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="long_division_steps3_4"]>#pr-problems{display:block}
#pr-sheet[data-unit="long_division_steps3_4"] .lds-pr-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="long_division_steps3_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="long_division_steps3_4"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="long_division_steps3_4"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="long_division_steps3_4"] .lds-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
