/* Load last: generous, consistent reading sizes across every game engine. */
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game){font-size:17px;line-height:1.65;min-width:0}
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game) :is(p,li,label,summary){font-size:17px!important;line-height:1.65!important;overflow-wrap:break-word}
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game) :is(input,textarea,select){font-size:17px;line-height:1.55}
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game) :is(textarea,select,input:not([type="radio"]):not([type="checkbox"])){min-height:46px}
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game) :is(input[type="radio"],input[type="checkbox"]){width:19px;height:19px;flex-shrink:0}
:is(.robot-game,.numbers-game,.strategy-game,.pixels-game,.designer-game) :is(input,textarea)::placeholder{font-size:16px;line-height:1.55}

/* Robot: the command labels and programming controls are reading content. */
.robot-game{container-type:inline-size;container-name:robot-readable}
.robot-game .robot-mission{align-items:flex-start;gap:20px;flex-wrap:wrap}
.robot-game h3{font-size:32px;line-height:1.2;letter-spacing:-.035em}
.robot-game h4{font-size:20px;line-height:1.4}
.robot-game :is(.robot-eyebrow,.robot-mode-badge,.robot-board-caption,.robot-editor-heading>span,.robot-speed,.robot-speed>span,.robot-card-index,[data-cost]){font-size:14px;line-height:1.5}
.robot-game .robot-eyebrow{letter-spacing:.07em}
.robot-game .robot-mode-badge{white-space:normal;padding:9px 13px}
.robot-game .robot-mission p{font-size:17px;line-height:1.7;max-width:680px}
.robot-game .robot-workspace{grid-template-columns:minmax(0,1fr) minmax(340px,1fr);gap:26px}
.robot-game .robot-stage-top{flex-wrap:wrap;gap:10px}
.robot-game .robot-map-tabs{flex-wrap:wrap;gap:6px}
.robot-game .robot-map-tabs button{font-size:15px;min-height:40px;padding:8px 11px}
.robot-game .robot-stage-footer{font-size:14px;line-height:1.55;gap:12px;flex-wrap:wrap}
.robot-game .robot-stage-footer>span:last-child{margin-left:auto}
.robot-game .robot-status{font-size:17px;line-height:1.7;min-height:82px;padding:15px}
.robot-game .robot-status-icon{font-size:19px;flex-basis:19px}
.robot-game .robot-heading-arrow{font-size:17px;width:22px;height:22px}
.robot-game .robot-command-controls{gap:10px}
.robot-game .robot-command{font-size:17px;line-height:1.4;min-height:90px;padding:12px 7px;gap:8px;overflow-wrap:break-word}
.robot-game .robot-command>span:first-child{font-size:29px}
.robot-game .robot-command-safe{min-height:82px;gap:15px}
.robot-game .robot-command-safe small{font-size:14px;line-height:1.5}
.robot-game .robot-repeat-controls{padding:16px;margin-top:17px}
.robot-game .robot-repeat-controls>div:first-child{font-size:17px;line-height:1.5;gap:10px;margin-bottom:14px}
.robot-game .robot-repeat-fields{gap:10px;flex-wrap:wrap;align-items:end}
.robot-game .robot-repeat-fields label{gap:7px}
.robot-game .robot-repeat-fields label>span{font-size:14px;line-height:1.5}
.robot-game .robot-repeat-fields :is(input,select){font-size:17px;min-height:46px;height:auto;padding:10px}
.robot-game .robot-repeat-fields input{width:76px}
.robot-game .robot-repeat-action{flex:1;min-width:150px}
.robot-game .robot-repeat-add{font-size:27px;width:46px;height:46px}
.robot-game .robot-program-heading{flex-wrap:wrap;margin-top:24px;gap:10px}
.robot-game .robot-program{padding:13px;min-height:190px;max-height:340px;gap:10px}
.robot-game .robot-program-card{font-size:17px;line-height:1.5;min-height:53px;padding:8px 10px;gap:9px}
.robot-game .robot-card-index{font-size:14px;min-width:16px}
.robot-game .robot-card-symbol{font-size:23px;width:21px}
.robot-game .robot-card-title{font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.robot-game .robot-card-tools{gap:2px}
.robot-game .robot-card-tools button{font-size:19px;width:31px;height:34px}
.robot-game .robot-card-tools button:last-child{font-size:22px}
.robot-game .robot-empty-program{font-size:16px;line-height:1.6;min-height:160px;gap:8px;padding:12px}
.robot-game .robot-empty-program strong{font-size:17px;line-height:1.5}
.robot-game .robot-empty-program>span:first-child{font-size:42px}
.robot-game .robot-program-help{font-size:14px;line-height:1.7;margin:11px 1px 15px;color:#786c87}
.robot-game .robot-edit-tools{gap:10px;flex-wrap:wrap;margin-bottom:20px}
.robot-game .robot-edit-tools button{font-size:16px;line-height:1.45;min-height:44px;padding:10px 12px;white-space:normal}
.robot-game .robot-run-row{gap:14px;align-items:end;flex-wrap:wrap}
.robot-game .robot-run{font-size:18px;line-height:1.5;min-height:54px;padding:13px 17px;min-width:190px}
.robot-game .robot-speed select{font-size:16px;width:92px;min-height:46px;padding:9px}
.robot-game .robot-hint{font-size:17px;line-height:1.7;margin-top:24px;padding-top:20px}
.robot-game .robot-hint p{font-size:17px;padding:17px}
.robot-game .robot-success{padding:20px;align-items:flex-start}
.robot-game .robot-success strong{font-size:21px;line-height:1.4}
.robot-game .robot-success p{font-size:17px;line-height:1.7}

/* Numbers and strategy: large card values, comfortable explanations. */
:is(.numbers-game,.strategy-game) .ng-header h3{font-size:32px;line-height:1.2;letter-spacing:-.035em}
:is(.numbers-game,.strategy-game) .ng-eyebrow{font-size:14px;line-height:1.5;letter-spacing:.07em;padding:8px 11px}
:is(.numbers-game,.strategy-game) .ng-header p{font-size:17px;line-height:1.7}
:is(.numbers-game,.strategy-game) :is(.ng-target-layout,.ng-rule-layout,.ng-strategy-layout){grid-template-columns:minmax(0,1.3fr) minmax(310px,1fr);gap:24px}
:is(.numbers-game,.strategy-game) :is(.ng-workbench,.ng-rule-main,.ng-stone-arena,.ng-notebook,.ng-rule-lab,.ng-strategy-notebook){padding:25px}
.numbers-game .ng-target-orb{width:155px;height:155px;margin-bottom:26px}
.numbers-game .ng-target-orb span{font-size:14px;letter-spacing:.1em}
.numbers-game .ng-target-orb strong{font-size:58px;line-height:1.1}
.numbers-game .ng-how{font-size:17px;line-height:1.7;max-width:530px;margin-bottom:22px}
.numbers-game .ng-number-card{min-width:94px;min-height:112px;padding:25px 15px 15px;max-width:240px}
.numbers-game .ng-number-card strong{font-size:36px;line-height:1.2}
.numbers-game .ng-number-card small{font-size:14px;line-height:1.5;max-width:190px;margin-top:10px}
.numbers-game .ng-card-order{font-size:14px;top:5px;right:9px}
.numbers-game .ng-selection{font-size:17px;line-height:1.7;min-height:30px;margin:22px 0 16px}
.numbers-game .ng-operators{gap:11px;row-gap:16px}
.numbers-game .ng-operator{width:52px;height:52px;font-size:31px}
.numbers-game .ng-swap{font-size:29px;gap:4px}
.numbers-game .ng-swap span{font-size:14px;line-height:1.4;max-width:92px}
:is(.numbers-game,.strategy-game) .game-btn{font-size:17px;line-height:1.5;min-height:49px;padding:12px 16px;gap:12px;white-space:normal}
:is(.numbers-game,.strategy-game) .ng-soft{font-size:16px;line-height:1.5;min-height:45px;padding:10px 13px;white-space:normal}
:is(.numbers-game,.strategy-game) .ng-notebook-title{font-size:19px;line-height:1.45;margin-bottom:18px}
.numbers-game .ng-steps li{font-size:17px!important;line-height:1.7!important;padding:13px 0;gap:12px}
.numbers-game .ng-steps li::before{font-size:14px;min-width:27px;height:27px}
.numbers-game .ng-empty-step{font-size:16px!important;line-height:1.7!important}
.numbers-game .ng-coach>span{font-size:16px;line-height:1.5}
:is(.numbers-game,.strategy-game) .ng-feedback{font-size:17px;line-height:1.7;margin-top:20px}
:is(.numbers-game,.strategy-game) .ng-feedback:not(:empty){padding:16px}
.numbers-game .ng-machine{gap:16px;padding:24px 0 32px}
.numbers-game .ng-machine-port{min-width:61px;gap:9px}
.numbers-game .ng-machine-port span{font-size:14px;letter-spacing:.06em}
.numbers-game .ng-machine-port strong{font-size:36px;line-height:1.2;overflow-wrap:anywhere}
.numbers-game .ng-machine-arrow{font-size:29px}
.numbers-game .ng-machine-core{width:166px;min-width:120px;min-height:139px;padding:13px}
.numbers-game .ng-machine-core strong{font-size:49px}
.numbers-game .ng-machine-core small{font-size:14px;line-height:1.5;letter-spacing:.03em;text-align:center}
.numbers-game .ng-probe-form>div{gap:11px;flex-wrap:wrap}
.numbers-game .ng-probe-form input{font-size:21px;max-width:160px;min-height:50px}
.numbers-game .ng-probe-form small{font-size:14px;line-height:1.7;margin-top:13px;color:#65715f}
.numbers-game .ng-observation-rows{gap:10px;max-height:310px;grid-template-columns:minmax(0,1fr)}
.numbers-game .ng-observation{font-size:18px;gap:12px;line-height:1.5;padding:13px 14px;flex-wrap:wrap}
.numbers-game .ng-observation small{font-size:14px;line-height:1.5;color:#718064}
.numbers-game .ng-rule-candidate{padding:16px 14px;gap:11px;line-height:1.6}
.numbers-game .ng-rule-candidate strong{font-size:18px;line-height:1.5;margin-bottom:6px}
.numbers-game .ng-rule-candidate small{font-size:14px;line-height:1.65;color:#75667f}
.numbers-game .ng-candidate-state{font-size:18px}
.numbers-game .ng-survivor-count{font-size:16px;line-height:1.7}
.numbers-game .ng-formula-builder>span{font-size:17px;line-height:1.5}
:is(.numbers-game,.strategy-game) :is(.ng-formula-builder select,.ng-discovery select){font-size:17px;line-height:1.55;padding:12px;min-height:49px}
.numbers-game .ng-predictions label{gap:16px;flex-wrap:wrap;margin:13px 0}
.numbers-game .ng-predictions label>span{font-size:17px;line-height:1.5;min-width:112px}
.numbers-game .ng-predictions input{font-size:20px;min-height:49px;max-width:130px}
.strategy-game .ng-player{gap:12px;padding:12px}
.strategy-game .ng-player>span{width:47px;height:47px;font-size:29px;flex-shrink:0}
.strategy-game .ng-player small{font-size:14px;line-height:1.4;letter-spacing:.04em}
.strategy-game .ng-player strong{font-size:19px;line-height:1.5}
.strategy-game .ng-versus{font-size:15px}
.strategy-game .ng-stone-counter strong{font-size:60px;line-height:1.1}
.strategy-game .ng-stone-counter span{font-size:14px;letter-spacing:.07em}
.strategy-game .ng-turn-status{font-size:18px;line-height:1.65;min-height:52px;margin:24px 0 19px}
.strategy-game .ng-first-choice{gap:15px;padding:16px}
.strategy-game .ng-first-choice>span{font-size:16px;line-height:1.5}
.strategy-game .ng-first-choice label{gap:8px}
.strategy-game .ng-take{min-width:82px;min-height:83px;padding:15px 21px;gap:5px}
.strategy-game .ng-take strong{font-size:31px}
.strategy-game .ng-take span{font-size:16px;line-height:1.4}
.strategy-game .ng-ai-explanation{font-size:17px;line-height:1.7;margin-top:25px}
.strategy-game .ng-move-history{max-height:310px}
.strategy-game .ng-move-history li{font-size:17px!important;line-height:1.6!important;padding:13px 0;flex-wrap:wrap;gap:5px 14px}
.strategy-game .ng-move-history small{font-size:14px;line-height:1.55;white-space:normal}
.strategy-game .ng-discovery>label{margin:18px 0}
.strategy-game .ng-discovery .ng-strategy-hint{font-size:17px;line-height:1.7}

/* Pixel and designer panels share the same comfortable reading scale. */
:is(.pixels-game,.designer-game){container-type:inline-size;container-name:pixel-readable}
:is(.pixels-game,.designer-game) h2{font-size:32px;line-height:1.2;letter-spacing:-.04em}
:is(.pixels-game,.designer-game) h3{font-size:25px;line-height:1.35;letter-spacing:-.025em}
:is(.pixels-game,.designer-game) .px-header{gap:22px;margin-bottom:28px;align-items:flex-start}
:is(.pixels-game,.designer-game) .px-header p{font-size:17px;line-height:1.7}
:is(.pixels-game,.designer-game) :is(.px-eyebrow,.px-pill,.px-board-caption){font-size:14px;line-height:1.55;letter-spacing:.06em}
:is(.pixels-game,.designer-game) .px-layout{grid-template-columns:minmax(0,1fr) minmax(330px,.95fr);gap:24px}
:is(.pixels-game,.designer-game) .px-panel{padding:25px}
:is(.pixels-game,.designer-game) .px-note{font-size:17px;line-height:1.7;padding:16px 18px;margin:20px 0}
:is(.pixels-game,.designer-game) .px-checklist li{font-size:17px!important;line-height:1.7!important;padding:10px 0 10px 27px}
:is(.pixels-game,.designer-game) .px-checklist li::before{font-size:21px;top:9px}
:is(.pixels-game,.designer-game) .px-stat{padding:15px 8px}
:is(.pixels-game,.designer-game) .px-stat strong{font-size:30px;line-height:1.2}
:is(.pixels-game,.designer-game) .px-stat span{font-size:14px;line-height:1.5;color:#756782}
:is(.pixels-game,.designer-game) .px-button{font-size:17px;line-height:1.5;min-height:50px;padding:13px 17px;white-space:normal}
:is(.pixels-game,.designer-game) .px-actions{gap:12px;margin-top:23px}
:is(.pixels-game,.designer-game) .px-feedback{font-size:17px!important;line-height:1.7!important;padding:16px 17px;margin-top:24px!important}
:is(.pixels-game,.designer-game) .px-small{font-size:14px!important;line-height:1.75!important;color:#796b85!important}
:is(.pixels-game,.designer-game) .px-field{font-size:17px!important;line-height:1.6!important;gap:9px;margin-top:19px}
:is(.pixels-game,.designer-game) .px-code-input{font-size:17px;line-height:1.8;padding:15px;min-height:120px;letter-spacing:.015em}
:is(.pixels-game,.designer-game) .px-code-input::placeholder{font-size:16px;line-height:1.6;color:#8e7da5}
.pixels-game .px-tab{font-size:17px;line-height:1.5;min-height:47px;padding:11px 16px}
.pixels-game .px-legend{font-size:16px;line-height:1.6;gap:14px 22px;flex-wrap:wrap}
.pixels-game .px-binary-code{font-size:21px;line-height:1.85;letter-spacing:.23em;padding:20px 15px}
.pixels-game .px-question{font-size:17px;line-height:1.6;margin:21px 0 12px}
.pixels-game .px-choice{gap:9px;flex-wrap:wrap}
.pixels-game .px-choice-button{font-size:16px;line-height:1.5;min-height:45px;padding:10px 13px}
.designer-game .px-text-input{font-size:17px;line-height:1.7;padding:13px 14px;min-height:49px}
.designer-game .px-peer{padding:18px;margin-top:23px}
.designer-game .px-peer summary{font-size:17px!important;line-height:1.6!important}
.designer-game .px-peer .px-code-input{font-size:17px;line-height:1.75;min-height:105px}

/* Adapt to the activity's width, including desktop lesson sidebars. */
@container robot-readable (max-width:780px){
  .robot-game .robot-workspace{grid-template-columns:minmax(0,1fr);gap:27px}
  .robot-game .robot-stage{max-width:550px;width:100%;margin:auto;padding:22px}
  .robot-game .robot-map-wrap{max-width:440px}
}
@container ng-game (max-width:780px){
  :is(.numbers-game,.strategy-game) :is(.ng-target-layout,.ng-rule-layout,.ng-strategy-layout){grid-template-columns:minmax(0,1fr);gap:24px}
  :is(.numbers-game,.strategy-game) :is(.ng-notebook,.ng-rule-lab,.ng-strategy-notebook,.ng-workbench,.ng-rule-main,.ng-stone-arena){padding:24px}
  .numbers-game .ng-notebook .ng-steps{display:block}
  .numbers-game .ng-notebook .ng-steps li{border-bottom:1px dashed #e4ddeb}
}
@container pixel-readable (max-width:780px){
  :is(.pixels-game,.designer-game) .px-layout{grid-template-columns:minmax(0,1fr);gap:24px}
  :is(.pixels-game,.designer-game) .px-grid{max-width:430px}
  :is(.pixels-game,.designer-game) .px-preview .px-grid{max-width:210px}
}
@container robot-readable (max-width:400px){
  .robot-game .robot-stage{padding:15px}
  .robot-game .robot-mode-badge{display:none}
  .robot-game .robot-command-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .robot-game .robot-command-safe{grid-column:1/-1}
  .robot-game .robot-command{min-height:87px}
  .robot-game .robot-repeat-fields{display:grid;grid-template-columns:76px minmax(0,1fr)}
  .robot-game .robot-repeat-action{min-width:0}
  .robot-game .robot-repeat-add{grid-column:1/-1;width:100%}
  .robot-game .robot-edit-tools{justify-content:stretch}
  .robot-game .robot-edit-tools button{flex:1;min-width:86px}
  .robot-game .robot-edit-tools button:first-child{margin-right:0}
  .robot-game .robot-program{padding:9px}
  .robot-game .robot-program-card{flex-wrap:wrap;gap:7px}
  .robot-game .robot-card-title{min-width:95px}
  .robot-game .robot-card-tools{margin-left:auto}
  .robot-game .robot-run{min-width:170px}
  .robot-game .robot-success{padding:17px;gap:13px}
}
@container ng-game (max-width:400px){
  :is(.numbers-game,.strategy-game) :is(.ng-notebook,.ng-rule-lab,.ng-strategy-notebook,.ng-workbench,.ng-rule-main,.ng-stone-arena){padding:20px 15px}
  :is(.numbers-game,.strategy-game) .ng-header h3{font-size:28px}
  .numbers-game .ng-number-card{min-width:87px;padding:24px 12px 14px}
  .numbers-game .ng-number-card strong{font-size:34px}
  .numbers-game .ng-machine{gap:9px;flex-wrap:wrap;position:relative;padding:22px 0 28px}
  .numbers-game .ng-machine-core{order:-1;flex-basis:100%;width:100%;min-height:125px;flex-shrink:0;margin-bottom:17px}
  .numbers-game .ng-machine-core small{font-size:14px}
  .numbers-game .ng-machine>.ng-machine-arrow:nth-child(2){display:none}
  .numbers-game .ng-machine-port{min-width:77px}
  .numbers-game .ng-machine-port strong{font-size:34px}
  .numbers-game .ng-observation-rows{grid-template-columns:minmax(0,1fr)}
  .numbers-game .ng-predictions label>span{min-width:100px}
  .numbers-game .ng-predictions input{max-width:110px}
  .strategy-game .ng-players{gap:7px;flex-wrap:wrap;justify-content:center}
  .strategy-game .ng-player{padding:8px;gap:7px}
  .strategy-game .ng-player>span{width:38px;height:38px;font-size:26px}
  .strategy-game .ng-player strong{font-size:18px}
  .strategy-game .ng-take-actions{gap:10px;flex-wrap:wrap}
  .strategy-game .ng-take{min-width:74px;padding:14px 17px}
}
@container pixel-readable (max-width:400px){
  :is(.pixels-game,.designer-game) .px-header{gap:12px}
  :is(.pixels-game,.designer-game) h2{font-size:28px}
  :is(.pixels-game,.designer-game) h3{font-size:24px}
  :is(.pixels-game,.designer-game) .px-orbit{width:45px;height:45px;border-radius:15px;font-size:29px}
  :is(.pixels-game,.designer-game) .px-panel{padding:20px 16px}
  :is(.pixels-game,.designer-game) .px-stats{flex-wrap:wrap;gap:9px}
  :is(.pixels-game,.designer-game) .px-stat{flex:1 1 93px;padding:13px 8px}
  :is(.pixels-game,.designer-game) .px-stat span{font-size:14px}
  :is(.pixels-game,.designer-game) .px-actions{flex-direction:column;align-items:stretch}
  :is(.pixels-game,.designer-game) .px-actions .px-button{width:100%;flex:auto}
  .pixels-game .px-tabs{flex-direction:column;align-items:stretch}
  .pixels-game .px-tab{width:100%}
  .pixels-game .px-binary-code{font-size:20px;letter-spacing:.16em}
  .pixels-game .px-choice-button{flex:1 1 110px}
}

/* Fallback stacking for browsers without container queries. */
@media(max-width:720px){
  .robot-game .robot-workspace,:is(.numbers-game,.strategy-game) :is(.ng-target-layout,.ng-rule-layout,.ng-strategy-layout),:is(.pixels-game,.designer-game) .px-layout{grid-template-columns:minmax(0,1fr)}
}
