/* The question and its model share one sheet, including on phones. */
@media screen {
 .worksheet-reader{height:100%;width:min(1120px,100%);margin:auto;display:grid;grid-template-rows:64px minmax(0,1fr) 82px;padding:0 max(24px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(24px,env(safe-area-inset-left));overflow:hidden;--sheet-blue:#294c90;--sheet-amber:#b98120}
 .worksheet-top{display:grid;grid-template-columns:1fr auto 44px;align-items:center;gap:16px;border-bottom:1px solid #d9dfe6;position:relative}
 .worksheet-top::after{content:'';position:absolute;bottom:-1px;height:2px;width:var(--progress);background:var(--sheet-blue);transition:width .15s}
 .sheet-home{display:flex;align-items:center;gap:10px;color:#344b68;font-size:13px}.sheet-home svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7}
 .sheet-position{font-size:13px;line-height:1.3;color:#536379;text-align:center}
 .worksheet-stage{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;min-width:0;gap:28px;padding:30px 0 24px;overflow:hidden}
 .has-model .worksheet-stage{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .sheet-question{min-height:0;min-width:0;display:grid;grid-template-rows:minmax(0,1fr) 48px;gap:10px}
 .sheet-question-copy.screen-content{max-width:710px;margin:0 auto;height:100%;gap:18px;padding:0 4px;overflow:hidden;justify-content:center}
 .sheet-question-copy .screen-question{font-size:clamp(24px,3vw,35px);font-weight:500;line-height:1.38;color:#172e4c;letter-spacing:-.45px}
 .sheet-question-copy .screen-given,.sheet-question-copy .screen-reason{font-size:clamp(18px,2vw,22px);line-height:1.45;color:#4a5e78}
 .sheet-question-copy .screen-question.calculation{font-size:clamp(30px,3vw,42px);line-height:1.6}
 .sheet-question-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#607087;font-size:12px}
 .sheet-small-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 12px;border:1px solid #c9d5e6;border-radius:6px;background:#edf3fc;color:#294c90;font-size:13px;font-weight:500;white-space:nowrap}
 .sheet-small-button[aria-expanded=true]{background:white}
 .sheet-small-button:hover{background:#e1eafa}
 .sheet-question-tools .screen-icon{width:38px;height:38px;padding:9px}
 .sheet-copy-pager{display:flex;align-items:center;gap:5px;font-size:11px;margin-right:auto}.sheet-copy-pager button{min-width:28px;min-height:36px;font-size:18px}
 .sheet-model{display:grid;grid-template-rows:34px auto minmax(0,1fr) 36px;gap:8px;min-width:0;min-height:0;border:1px solid #d5dfec;border-radius:10px;background:#f0f5fc;padding:14px 16px;overflow:hidden}
 .sheet-model:not(:has(.sheet-inline-hint)){grid-template-rows:34px minmax(0,1fr) 36px}
 .sheet-model-heading{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#536b8c}
 .sheet-model-heading .screen-icon{width:32px;height:32px;padding:6px}
 .sheet-inline-hint{font-size:15px;line-height:1.4;color:#2e496d;border-left:3px solid #d9a94c;padding-left:10px;margin:0;overflow-wrap:break-word}
 .sheet-model-canvas{width:100%;height:100%;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;container-type:inline-size}
 .sheet-model-canvas>.screen-model-fit{margin:0 auto}
 .sheet-model-controls{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;color:#4d6380}
 .sheet-model-controls>button{min-height:36px;padding:4px 0;display:flex;align-items:center;gap:8px;font-size:13px;color:#294c90}
 .sheet-model-controls>button:first-child{min-width:30px;font-size:18px}
 .worksheet-reader button:disabled{opacity:.32;cursor:default}
 .worksheet-bottom{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center;border-top:1px solid #d9dfe6;padding:12px 0 18px}
 .worksheet-bottom .screen-primary{justify-self:end;min-width:150px;font-size:15px;border-radius:6px;background:#294c90;border-color:#294c90;gap:12px;box-shadow:none}
 .worksheet-bottom .screen-primary:hover{background:#203c74}
 .sheet-back{justify-self:start;min-height:44px;font-size:14px;color:#435a76;text-align:left}
 .sheet-book{font-size:12px;color:#778496;text-align:center}
 .worksheet-reader[data-mode=menu] .worksheet-stage{display:block;overflow:auto}
 .worksheet-reader[data-mode=menu] .worksheet-bottom:empty{display:none}
 .worksheet-reader[data-mode=menu]:has(.worksheet-bottom:empty){grid-template-rows:64px minmax(0,1fr) 0}
 .sheet-menu-content{max-width:600px;margin:auto;display:flex;flex-direction:column;gap:20px;outline:none}
 .sheet-menu-content label{font-size:22px;color:#294c90;margin-top:12px}.sheet-menu-content input[type=range]{width:100%;min-height:44px;accent-color:#294c90}
 .sheet-panel-label{font-size:12px;text-transform:uppercase;letter-spacing:1px;font-weight:600;color:#496988}
 .sheet-menu-content .screen-question-grid{margin-bottom:6px}.deeper-grid{grid-template-columns:repeat(3,1fr);max-width:350px}
 .sheet-answer.sheet-model{display:flex;flex-direction:column;justify-content:center;background:#edf5f1;border-color:#cadfd6;padding:24px}
 .sheet-answer .sheet-panel-label{color:#346653;flex-shrink:0}
 .sheet-answer-copy{font-size:clamp(19px,2.5vw,27px);line-height:1.5;color:#234d3f;overflow:auto;overscroll-behavior:contain;min-height:0}
 .large-text .sheet-question-copy .screen-question{font-size:clamp(28px,3.5vw,41px)}.large-text .sheet-question-copy :is(.screen-given,.screen-reason){font-size:24px}.large-text .sheet-inline-hint{font-size:19px}
 .sheet-complete .worksheet-stage{align-content:center;max-width:620px;margin:auto;gap:16px}.sheet-complete h1{font-size:30px;color:#203e62}.sheet-complete p{font-size:18px;line-height:1.5;color:#586d87}
 @media(max-width:700px){
  .worksheet-reader{grid-template-rows:54px minmax(0,1fr) 72px;padding-left:20px;padding-right:20px}
  .worksheet-top{gap:6px;grid-template-columns:1fr auto 36px}.worksheet-top .screen-icon{width:36px;height:40px;padding:8px}
  .sheet-home{gap:7px;font-size:12px}.sheet-position{font-size:12px;max-width:150px}
  .worksheet-stage{padding:20px 0 14px;gap:14px}.has-model .worksheet-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,.85fr) minmax(0,1.15fr);padding:16px 0 12px;gap:12px}
  .sheet-question{grid-template-rows:minmax(0,1fr) 40px;gap:6px}.sheet-question-copy.screen-content{gap:13px;padding:0}
  .has-model .sheet-question-copy .screen-question{font-size:21px;line-height:1.35}.has-model .sheet-question-copy :is(.screen-given,.screen-reason){font-size:17px;line-height:1.35}.has-model .sheet-question-copy .screen-question.calculation{font-size:27px}
  .sheet-model{padding:10px 12px;gap:6px;grid-template-rows:28px auto minmax(0,1fr) 32px;border-radius:8px}.sheet-model:not(:has(.sheet-inline-hint)){grid-template-rows:28px minmax(0,1fr) 32px}
  .sheet-model-heading{font-size:11px}.sheet-model-heading .screen-icon{width:28px;height:28px;padding:5px}.sheet-inline-hint{font-size:14px;line-height:1.35}.sheet-model-controls{font-size:11px}.sheet-model-controls>button{font-size:12px;min-height:32px}
  .worksheet-bottom{gap:8px;padding:10px 0 12px}.sheet-book{display:none}.worksheet-bottom{grid-template-columns:1fr auto}.worksheet-bottom .screen-primary{min-width:130px;font-size:14px;padding:10px 12px}.sheet-back{font-size:13px}
  .worksheet-reader[data-mode=menu]:has(.worksheet-bottom:empty){grid-template-rows:54px minmax(0,1fr) 0}.worksheet-reader[data-mode=menu] .worksheet-bottom>span{display:none}
  .sheet-answer.sheet-model{padding:15px;gap:10px}.sheet-answer-copy{font-size:18px}
  .large-text .has-model .sheet-question-copy .screen-question{font-size:25px}.large-text .has-model .sheet-question-copy :is(.screen-given,.screen-reason){font-size:21px}.large-text .sheet-inline-hint{font-size:17px}
 }
 @media(max-height:550px){
  .worksheet-reader{grid-template-rows:48px minmax(0,1fr) 62px;padding-left:16px;padding-right:16px}.worksheet-stage{padding:12px 0;gap:10px}.has-model .worksheet-stage{padding:10px 0;gap:8px;grid-template-rows:minmax(0,.8fr) minmax(0,1.2fr)}
  .worksheet-bottom{padding:8px 0}.worksheet-bottom .screen-primary{min-height:42px}.sheet-question-copy.screen-content{gap:8px}.sheet-inline-hint{font-size:13px}.sheet-model{padding:6px 10px;gap:4px;grid-template-rows:24px auto minmax(0,1fr) 28px}.sheet-model:not(:has(.sheet-inline-hint)){grid-template-rows:24px minmax(0,1fr) 28px}.sheet-model-heading .screen-icon{height:24px}.sheet-model-controls>button{min-height:28px}
  .has-model .sheet-question-copy .screen-question{font-size:19px}.has-model .sheet-question-copy :is(.screen-given,.screen-reason){font-size:16px}.worksheet-reader[data-mode=menu]:has(.worksheet-bottom:empty){grid-template-rows:48px minmax(0,1fr) 0}
 }
 @media(min-width:701px) and (max-height:550px){.has-model .worksheet-stage{grid-template-rows:minmax(0,1fr)}}
}
@media print{.worksheet-reader{display:none!important}.print-worksheet{display:block!important}.print-worksheet .question-card{break-inside:avoid}.print-worksheet .question-position{font-size:15px}.print-worksheet .question-prompt{font-size:17px}.print-worksheet .print-model{max-width:550px;margin:14px auto}.print-section-title{break-before:page}.print-only{display:block}}
@media screen{.print-worksheet{display:none}}
@media screen{
 .sheet-question{display:flex;flex-direction:column;justify-content:center;height:100%;gap:12px}
 .sheet-question-copy.screen-content{flex:none;margin:0;width:100%}
 .sheet-question-tools{flex:none;min-height:40px;width:100%}
 .sheet-model{height:min(100%,500px);align-self:center;width:100%}
 @media(max-width:700px){.sheet-model{height:100%}.sheet-question{gap:8px}}
}
@media screen and (max-width:700px), screen and (max-height:550px){
 .sheet-model-canvas .ten-frame-model{gap:10px;align-items:start}
 .sheet-model-canvas .ten-frame-model>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-width:300px}
 .sheet-model-canvas .frame-label{grid-column:1/-1;margin:0;font-size:12px}
 .sheet-model-canvas .ten-frame{grid-template-columns:repeat(5,20px);margin:0;width:max-content}
 .sheet-model-canvas .ten-frame>span{width:20px;height:22px}
 .sheet-model-canvas .ten-frame .counter{width:13px;height:13px}
 .sheet-model-canvas .value-pieces{gap:3px;padding:6px 2px;min-height:70px}
 .sheet-model-canvas .value-coin{width:23px;height:23px;font-size:9px}
 .sheet-model-canvas .value-heading{padding:5px 1px}
 .sheet-model-canvas .value-heading strong{font-size:13px}
}
@media screen and (max-width:700px), screen and (max-height:550px){
 .sheet-model-canvas .purpose-given{margin-bottom:8px;gap:8px}.sheet-model-canvas .purpose-given strong{font-size:23px}
 .sheet-model-canvas .purpose-note{margin:7px 0;font-size:13px}
 .sheet-model-canvas .purpose-groups{gap:7px;margin:8px 0}
 .sheet-model-canvas .purpose-group{padding:7px;gap:4px}
 .sheet-model-canvas .purpose-division .purpose-group{max-width:95px}
 .sheet-model-canvas .purpose-division .purpose-dot{width:13px;height:13px}
 .sheet-model-canvas .purpose-dots{gap:4px}
 .sheet-model-canvas .purpose-left{margin-top:8px;gap:5px}
}

@media screen and (min-width:701px) and (min-height:551px){
 .sheet-model-canvas .purpose-division .purpose-dot{width:20px;height:20px}
 .sheet-model-canvas .purpose-division .purpose-group{max-width:130px}
 .sheet-model-canvas .purpose-note{font-size:16px}
 .sheet-model-canvas .purpose-given strong{font-size:28px}
}
