/* water_level_flow_continue2_5（水位グラフから流量と続きを求めよう、単元仕様書 v1.2 §7・確定表 WLF-10） */
#wlf-main{display:flex;flex-direction:column;align-items:stretch;gap:10px;width:100%;max-width:640px;margin:0 auto}
.wlf-figs{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:10px;width:100%}
.wlf-figs svg{max-width:100%;height:auto;display:block}
.wlf-container{flex:none;max-width:none!important}
.wlf-graph{flex:1 1 280px;max-width:280px}
.wlf-svg-text{fill:#222;font-family:inherit}
.wlf-axis{stroke:#333;stroke-width:1.4}
.wlf-grid{stroke:#d8d8d8;stroke-width:0.8}
.wlf-line{stroke:#1a1a1a;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
.wlf-dot{fill:#111}
.wlf-part{fill:#e8f2fb;stroke:#333;stroke-width:1.4}
.wlf-mark{stroke:#333;stroke-width:1.2;stroke-dasharray:4 3}
.wlf-cand-frame{fill:#fff;stroke:#bbb;stroke-width:0.8}
.wlf-field{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;font-size:16px}
.wlf-field-name{font-weight:700;white-space:nowrap}
#wlf-main .wlf-input{width:5.5em;font-size:20px;text-align:center;padding:6px 8px;border:2px solid #888;border-radius:8px;min-height:44px;box-sizing:border-box}
.wlf-input.wlf-ok{border-color:#2e7d32;background:#eef8ee}
.wlf-input.wlf-ng{border-color:#c62828;background:#fdeeee}
.wlf-unit{font-size:18px;white-space:nowrap}
.wlf-guide{margin:0;text-align:center;font-size:16px;color:#444}
.wlf-msg{margin:0;min-height:1.2em;text-align:center;font-size:16px;color:#b3261e;font-weight:700}
.wlf-choices{display:flex;flex-direction:column;gap:8px;width:100%;max-width:420px;margin:0 auto}
.wlf-choice{min-height:44px;font-size:18px;padding:8px 12px;border:2px solid #9aa7b4;border-radius:10px;background:#fff;cursor:pointer;color:#222}
.wlf-choice.wlf-chosen{border-color:#1565c0;background:#e6f0fb;font-weight:700}
.wlf-choice.wlf-correct{border-color:#2e7d32;background:#eef8ee}
.wlf-choice.wlf-wrong{border-color:#c62828;background:#fdeeee}
.wlf-choice:disabled{cursor:default;opacity:1}
.wlf-cands{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;max-width:460px;margin:0 auto}
.wlf-cand-item{display:flex;flex-direction:column;align-items:center;gap:6px}
.wlf-cand{width:100%;max-width:220px;height:auto}
.wlf-cand-item .wlf-choice{width:100%;max-width:220px}
.wlf-q{white-space:normal}
.wlf-correct{font-weight:700;margin:0 0 4px}
.wlf-expl-text{margin:4px 0 0;line-height:1.7}
.wlf-example{display:flex;flex-direction:column;gap:8px}
.wlf-ex-figs{justify-content:flex-start}
/* 狭い画面（幅400px以下）：説明の例題の図は枠の余白まで使い、幅に合わせて縮める（右はしが切れないように） */
@media (max-width:400px){
  .lesson-example .wlf-ex-figs{width:calc(100% + 56px);margin:0 -28px}
  .lesson-example .wlf-ex-figs .wlf-container{max-width:100%!important;height:auto}
}
@media (max-width:520px){
  .wlf-figs{flex-direction:column;align-items:center}
  .wlf-graph{flex:0 0 auto;width:100%}
  .wlf-cands{grid-template-columns:minmax(0,1fr)}
  .wlf-cand{max-width:240px}
  .wlf-cand-item .wlf-choice{max-width:240px}
}

/* 印刷（A4縦・2列・1ページ） */
.wlf-pr-page{width:190mm;box-sizing:border-box;color:#000;font-family:inherit;display:flex;flex-direction:column}
.wlf-pr-headrow{display:flex;flex-direction:column;gap:0}
.wlf-pr-title{box-sizing:border-box;font-size:14pt;margin:0;height:7mm;line-height:6mm;text-align:center;font-weight:700;border:1.5pt solid #666;background:#ffffcc;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.wlf-pr-headrow .pp-fields{height:6mm;margin:0.5mm 0 0}
.wlf-pr-headrow hr.pp-fields-solid{flex:none;width:100%;margin:0.8mm 0 1mm!important;border:0;border-top:1.2pt solid #333}
.wlf-pr-inst{font-size:12.5pt;line-height:5.5mm;margin:0 0 2mm;padding:0 2mm}
.wlf-pr-problems{display:flex;gap:4mm;justify-content:center}
.wlf-pr-col{width:91mm;display:flex;flex-direction:column;gap:1mm}
.wlf-pr-cell{box-sizing:border-box;width:91mm;height:40mm;border:0.3mm solid transparent;border-radius:1.5mm;padding:0.8mm 1.5mm;overflow:hidden;break-inside:avoid}
.wlf-pr-head{display:flex;align-items:center;justify-content:space-between;height:6mm}
.wlf-pr-num{font-size:12.5pt;font-weight:700;white-space:nowrap}
.wlf-pr-ansbox{display:flex;align-items:center;gap:1mm}
.wlf-pr-box{display:inline-block;width:15mm;height:6mm;border:0.4mm solid #000;box-sizing:border-box}
.wlf-pr-unit{font-size:10pt}
.wlf-pr-body{display:flex;gap:1.5mm;margin-top:1mm;align-items:flex-start}
.wlf-pr-table{width:36mm;flex:none;font-size:9pt;line-height:3.8mm}
.wlf-pr-row{white-space:nowrap;border-bottom:0.2mm solid #bbb}
.wlf-pr-fig{width:48.5mm;flex:none}
.wlf-pr-fig svg{display:block}
.wlf-pr-cands{display:grid;grid-template-columns:23.75mm 23.75mm;gap:1mm}
.wlf-pr-graph .wlf-line,.wlf-pr-cand .wlf-line{stroke-width:0.4}
.wlf-pr-graph .wlf-axis{stroke-width:0.3}
.wlf-pr-cand .wlf-cand-frame{stroke-width:0.2}
.wlf-pr-choices{display:grid;grid-template-columns:42.5mm 42.5mm;column-gap:2mm;margin-top:1mm;font-size:10pt;line-height:4.5mm}
.wlf-pr-choice{white-space:nowrap}
.wlf-pr-answers{margin-top:2mm;border-top:0.3mm dashed #666;padding-top:1mm}
.wlf-pr-anshead{font-size:12.5pt;font-weight:700;height:6mm;line-height:6mm}
.wlf-pr-ansrow{display:grid;grid-template-columns:repeat(5,36mm);font-size:10pt;line-height:4.5mm}
.wlf-pr-answer{white-space:nowrap}
#pr-sheet[data-unit="water_level_flow_continue2_5"]{width:190mm;max-width:none;padding:0;margin:calc(12px + 10mm) auto;background:transparent;box-shadow:none}
#pr-sheet[data-unit="water_level_flow_continue2_5"]>:not(#pr-problems){display:none!important}
#pr-sheet[data-unit="water_level_flow_continue2_5"]>#pr-problems{display:block}
#pr-sheet[data-unit="water_level_flow_continue2_5"] .wlf-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="water_level_flow_continue2_5"]{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="water_level_flow_continue2_5"]>:not(#pr-problems){display:none!important}
  #page-print #pr-sheet[data-unit="water_level_flow_continue2_5"]>#pr-problems{display:block!important}
  #page-print #pr-sheet[data-unit="water_level_flow_continue2_5"] .wlf-pr-page{display:flex!important;margin:0!important;box-shadow:none!important;break-after:auto;page-break-after:auto}
}
.wlf-app-pdf-page .wlf-pr-page{box-shadow:none;margin:0}
.wlf-main .ufk-keypad{margin-top:4px}
#page-quiz:has(#question-text[data-unit="water_level_flow_continue2_5"]) .ufk-keypad{max-width:240px;width:100%}
#page-quiz:has(#question-text[data-unit="water_level_flow_continue2_5"]) .ufk-keypad .num-btn{font-family:var(--font-ui)}
#page-quiz.active:has(.wlf-main) #tts-btn{min-width:44px;min-height:44px}
