/* ── mass_scale_conversion2_3（重さの目もりとたんいをつなごう、単元仕様書 v1.3）── */
/* 画面：問題文、はかりの目もりの図、回答欄（数の欄とたんい／たんいの選択）、案内、共通のテンキー。回答後は正誤・欄ごとの正誤・正しい答え・解説（§5-3・§7） */
#question-text .msc-q{display:block;overflow-wrap:normal}
.msc-nb{white-space:nowrap}
.msc-phrase-group{display:inline;min-width:0}
.msc-main{margin:4px 0 6px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:8px}
.msc-input{width:9em;min-height:48px;font-size:1.35rem;padding:0 6px;border:3px solid #1d4ed8;background:#eff6ff;border-radius:8px;text-align:center;font-family:inherit;font-weight:800;box-sizing:border-box}
.msc-input:disabled{background:#f8fafc;color:#111827;opacity:1;border-color:#94a3b8}
.msc-input.msc-ok,.msc-input.msc-ok:disabled{border:3px solid #15803d;background:#dcfce7}
.msc-input.msc-ng,.msc-input.msc-ng:disabled{border:3px dashed #b91c1c;background:#fff1f2}
.msc-guide{margin:2px 0 0;font-size:16px;font-weight:700;text-align:center;max-width:560px;line-height:1.7}
.msc-guide[hidden]{display:none}
.msc-msg{min-height:1.4em;margin:2px 0;color:#b45309;font-weight:700;text-align:center;line-height:1.6;max-width:560px}
.msc-msg:empty{min-height:0;margin:0}
.msc-msg-line{display:block}
.msc-main .ufk-keypad{margin-top:4px}
.feedback.has-text.msc-feedback{height:auto;min-height:40px;padding:4px 0;text-align:center;line-height:1.45}
.msc-correct{margin:4px 0 6px;font-weight:800;font-size:17px;line-height:1.9}
.msc-expl-text{margin:4px 0 8px;line-height:2;overflow-wrap:normal;word-break:normal;line-break:strict}
.msc-example .msc-ex-q{margin:6px 0 4px;font-weight:700;line-height:2}
.msc-example .msc-ex-a{margin:4px 0 14px;line-height:2}
.msc-learning-focus{word-break:normal;line-break:strict}
#page-quiz.active:has(.msc-main) #question-text{word-break:normal;overflow-wrap:normal;line-break:strict;font-size:17px;line-height:2}
#page-quiz.active:has(.msc-main) #hint-area .kp-card{display:flex;align-items:flex-start;gap:8px}
#page-quiz.active:has(.msc-main) #hint-area .kp-head{margin-bottom:0;flex:none}
#page-quiz.active:has(.msc-main) #hint-area .kp-title:empty{display:none}
#page-quiz.active:has(.msc-main) #hint-area .kp-body{flex:1;min-width:0;padding-left:0}
#page-quiz:has(#question-text[data-unit="mass_scale_conversion2_3"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="mass_scale_conversion2_3"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
/* 結果画面の単元名：狭い幅でも省略せず、文節で折り返す */
.result-unit-badge.msc-badge{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;height:auto;border-radius:14px;line-height:1.5}
.result-unit-badge.msc-badge .rub-name{white-space:normal;overflow:visible;text-overflow:clip}
@media (max-width:400px){
  #page-lesson:has(.msc-example) .lesson-point,#page-lesson:has(.msc-example) .lesson-point *{font-size:15px}
  #page-lesson:has(.msc-example) .lesson-point{padding-left:10px;padding-right:10px;gap:6px}
  #page-lesson:has(.msc-example) .lesson-point .pt-icon{display:none}
  #page-lesson .lesson-example:has(.msc-example){padding-left:8px;padding-right:8px}
  #page-lesson .lesson-example div:has(>.msc-example){padding-left:6px!important;padding-right:6px!important}
  .msc-example .msc-ex-q,.msc-example .msc-ex-a{font-size:14px}
  .msc-guide,.msc-msg{font-size:15px}
}
@media (max-width:340px){
  .msc-example .msc-ex-q,.msc-example .msc-ex-a{font-size:13px}
  #page-lesson:has(.msc-example) :is(h1,h2,h3):has(.msc-phrase){font-size:22px!important}
}
/* はかりの目もりの図（SVG。線・色・書体は SVG の属性で書く） */
.msc-fig-wrap{width:100%;max-width:400px;margin:0 auto}
.msc-fig{display:block;width:100%;height:auto;overflow:visible}
/* 答えの欄：数の欄の右に、たんいを離さずに置く */
.msc-fields{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px 14px;max-width:100%}
.msc-field{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.msc-input-s{width:5.6em}
.msc-funit{font-size:1.25rem;font-weight:800;color:#111827}
.msc-part{margin:2px 0;font-weight:800;font-size:16px;line-height:1.7}
.msc-part-ok{color:#15803d}
.msc-part-ng{color:#b91c1c}
.msc-part-ok::before{content:"○ "}
.msc-part-ng::before{content:"× "}
/* たんいの選択：横に4つ */
.msc-choices{display:flex;flex-direction:row;justify-content:center;gap:10px;width:100%}
.msc-choice{position:relative;box-sizing:border-box;width:64px;min-height:56px;padding:6px 4px 16px;border:2px solid #64748b;border-radius:12px;background:#fff;color:#111827;font-family:inherit;font-size:1.25rem;font-weight:800;cursor:pointer;text-align:center;line-height:1.4}
.msc-choice .msc-check{position:absolute;bottom:1px;right:50%;transform:translateX(50%);font-size:13px;line-height:1;color:#1d4ed8;visibility:hidden}
.msc-choice.msc-sel{border:4px solid #1d4ed8;background:#dbeafe;padding:4px 2px 14px}
.msc-choice.msc-sel .msc-check{visibility:visible}
.msc-choice:disabled{cursor:default;opacity:1;color:#111827}
.msc-choice.msc-hit{border:4px solid #15803d;background:#dcfce7;padding:4px 2px 14px}
.msc-choice.msc-hit .msc-check{visibility:visible;color:#15803d;font-weight:900}
.msc-choice.msc-miss{border:4px dashed #b91c1c;background:#fff1f2;padding:4px 2px 14px}
.msc-choice.msc-miss .msc-check{visibility:visible;color:#b91c1c;font-weight:900}
.msc-list-fig{display:block;margin:6px 0 2px;max-width:320px}
.msc-fig-ex{margin:6px auto 4px;max-width:360px}
/* 結果の一覧：図の幅を取るため、問題文と図を1行ぶん使い、答えはその下に置く */
.result-row-top:has(.msc-fig-list){flex-wrap:wrap}
.result-row-top:has(.msc-fig-list) .q-text{flex:1 1 100%;min-width:0}
@media (max-width:400px){
  .msc-choices{gap:6px}
  .msc-choice{width:58px}
  .msc-input-s{width:4.8em}
  .msc-funit{font-size:1.1rem}
}

/* 印刷（プリント共通仕様書のひな型P・P-標準：A4縦・2列×5行・1ページ。§7・確定表 MSK-09） */
.msc-pr-page{width:190mm;box-sizing:border-box;color:#000;background:#fff;font-family:'Atkinson Hyperlegible','BIZ UDPGothic','Yu Gothic','Meiryo',sans-serif;display:flex;flex-direction:column}
.msc-pr-headrow{display:flex;flex-direction:column;gap:0}
.msc-pr-title{box-sizing:border-box;width:100%;height:9mm;margin:0;padding:0 2mm;border:1.5pt solid #666;background:#ffffcc;font-size:13pt;line-height:calc(9mm - 3pt);text-align:center;font-weight:700;white-space:nowrap;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.msc-pr-headrow .pp-fields{margin:1mm 0 0}
.msc-pr-headrow .pp-field-name .pp-field-line{min-width:40mm}
.msc-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:1.5mm 0 1.5mm!important}
.msc-pr-inst{font-size:12.5pt;line-height:6mm;height:6mm;margin:0 0 2mm;padding:0 1mm;white-space:nowrap}
.msc-pr-problems{display:flex;gap:4mm;justify-content:center}
.msc-pr-col{width:93mm;display:flex;flex-direction:column;gap:2mm}
.msc-pr-cell{box-sizing:border-box;width:93mm;height:40mm;padding:0 0.5mm;overflow:hidden;break-inside:avoid;display:flex;flex-direction:column}
.msc-pr-line{flex:none;display:flex;align-items:center;height:10mm;font-size:12.5pt;font-weight:700;line-height:10mm;white-space:nowrap}
.msc-pr-no{margin-right:2.5mm}
.msc-pr-lead{font-size:12.5pt}
.msc-pr-paren{font-size:14pt;font-weight:400}
.msc-pr-blank{display:inline-block;width:27mm;height:9mm}
.msc-pr-blank-s{width:15mm}
.msc-pr-opt{font-size:12.5pt;font-weight:700;margin:0 2.6mm}
.msc-pr-figwrap{flex:none;width:76mm;margin:0 auto}
.msc-pr-answers{margin-top:3mm}
.msc-pr-fold{width:100%;height:0;border-top:2px dotted #333;margin:0 0 1.5mm}
.msc-pr-anshead{font-size:12.5pt;font-weight:700;line-height:6mm}
.msc-pr-acols{display:flex;gap:4mm}
.msc-pr-acol{width:93mm}
.msc-pr-answer{margin:0 0 0.5mm;font-size:10pt;line-height:4.4mm;white-space:nowrap}
#pr-sheet[data-unit="mass_scale_conversion2_3"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="mass_scale_conversion2_3"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="mass_scale_conversion2_3"]>#pr-problems{display:block}
#pr-sheet[data-unit="mass_scale_conversion2_3"] .msc-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="mass_scale_conversion2_3"]{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="mass_scale_conversion2_3"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="mass_scale_conversion2_3"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="mass_scale_conversion2_3"] .msc-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.msc-app-pdf-page .msc-pr-page{box-shadow:none;margin:0}
