.g6{--g6-ink:var(--ui-text-e3f5f3,#e3f5f3);--g6-muted:var(--ui-text-9cb7c5,#9cb7c5);max-width:1240px;margin:auto;padding:20px;color:var(--g6-ink);font-family:Tahoma,Arial,sans-serif}.g6-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}.g6-header h1{font-size:clamp(19px,2.4vw,28px);margin:7px 0;line-height:1.5}.g6-header small{font-size:13px;color:var(--ui-text-8fc6c1,#8fc6c1)}.g6-header button{flex-shrink:0;min-height:46px}.g6-intro{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:32px 0;color:var(--ui-text-a7c3cd,#a7c3cd)}.g6-intro p{margin:0;font-size:18px}.g6-lessons{display:grid;gap:12px}.g6-lesson{display:flex;align-items:center;text-align:right;gap:23px;padding:23px 25px;background:linear-gradient(120deg,var(--ui-bg-163334,#163334),var(--ui-bg-17283a,#17283a));border:1px solid var(--ui-border-36575d,#36575d);border-radius:18px;min-height:92px}.g6-lesson:hover{background:var(--ui-bg-254650,#254650);transform:translateY(-1px)}.g6-lesson strong{font-size:17px;line-height:1.7}.g6-lesson small{display:block;color:var(--ui-text-8fc2bd,#8fc2bd);font-size:13px;margin-top:6px}.g6-order{display:grid;place-items:center;width:49px;height:49px;border-radius:14px;background:var(--ui-bg-285c5d,#285c5d);color:var(--ui-text-b9f3d6,#b9f3d6);font-size:20px;flex-shrink:0}.g6-enter{margin-right:auto;font-size:28px;color:var(--ui-text-a7e8da,#a7e8da)}.g6-tabs{display:flex;gap:8px;overflow:auto;padding:5px 0 14px;margin-bottom:9px;scrollbar-width:thin}.g6-tabs button{white-space:nowrap;font-size:14px;min-height:44px}.g6-tabs .active{background:var(--ui-bg-39756f,#39756f);color:var(--ui-text-eafff6,#eafff6);border-color:#81baad}.g6-stage{background:#dfeef0;border-radius:24px;overflow:hidden;box-shadow:0 15px 45px #0413234d;color:#294958}.g6-stage-heading{display:flex;justify-content:space-between;gap:16px;padding:22px 25px 5px}.g6-stage-heading h2{font-size:19px;margin:0 0 8px;line-height:1.6}.g6-stage-heading p{font-size:15px;margin:0;color:#54727f;line-height:1.7}.g6-stage-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:end;max-width:245px}.g6-stage-actions button{font-size:13px;min-height:42px;background:#c6dee2;color:#31576b;border-color:#adcbd1}.g6-stage-actions a{font-size:13px;color:#366c79;text-decoration:none}.g6-stage svg{display:block;width:100%;height:auto;max-height:62dvh;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;direction:ltr}.g6-object{cursor:grab}.g6-object[data-act]{cursor:pointer}.g6-object:focus{outline:none;filter:drop-shadow(0 0 6px #fff)}.g6-status{min-height:26px;padding:0 20px 12px;font-size:14px;color:#926143;text-align:center}.g6-controls{display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:var(--ui-bg-152e3d,#152e3d);border:1px solid var(--ui-border-335563,#335563);border-radius:19px;margin-top:16px;padding:18px}.g6-controls label{display:grid;gap:9px;min-width:145px;font-size:14px;color:var(--ui-text-b8d5dd,#b8d5dd)}.g6-controls .g6-range{flex:1;min-width:210px}.g6-range span{display:flex;justify-content:space-between;gap:12px}.g6-controls input[type=range]{min-height:38px;accent-color:var(--ui-text-71d2b8,#71d2b8);direction:ltr}.g6-controls button{min-height:46px}.g6-controls .g6-power{background:#66c9b1;color:#073b38;border-color:#8bd6be}.g6-controls small{font-size:13px;line-height:1.7;color:var(--ui-text-b1cbd3,#b1cbd3)}.g6-footer{display:flex;gap:20px;justify-content:space-between;align-items:flex-start;margin:17px 0 8px;color:var(--ui-text-91acb7,#91acb7);font-size:12px;line-height:1.8}.g6-footer details{max-width:400px}.g6-footer summary{cursor:pointer}.g6-footer p{padding-top:10px}.grade6-entry{grid-column:1/-1;min-height:125px!important;background:linear-gradient(100deg,var(--ui-bg-1d4243,#1d4243),var(--ui-bg-17334a,#17334a))!important}.grade6-entry p{margin-bottom:0!important}@media(max-width:650px){.g6{padding:12px}.g6-header{gap:9px;margin-bottom:13px}.g6-header h1{font-size:17px}.g6-header small{font-size:11px}.g6-header button{padding:8px;min-width:43px}.g6-intro{margin:20px 0;font-size:12px}.g6-intro p{font-size:15px}.g6-lesson{padding:17px 13px;gap:12px}.g6-lesson strong{font-size:15px}.g6-order{width:39px;height:43px;font-size:16px}.g6-stage-heading{display:block;padding:16px 16px 0}.g6-stage-heading h2{font-size:16px}.g6-stage-heading p{font-size:13px}.g6-stage-actions{max-width:none;justify-content:start;margin-top:10px}.g6-stage svg{min-height:260px;max-height:none}.g6-controls{gap:12px;padding:14px}.g6-controls label{min-width:125px;flex:1}.g6-controls .g6-range{min-width:100%}.g6-footer{display:block}.g6-footer details{margin-top:8px}.g6-tabs button{font-size:13px}.g6-stage{border-radius:18px}}@media(max-height:550px) and (min-width:650px){.g6-stage{display:grid;grid-template-columns:220px 1fr}.g6-stage-heading{display:block;padding:15px}.g6-stage-heading h2{font-size:15px}.g6-stage svg{max-height:75dvh}.g6-stage-actions{justify-content:start}.g6-status{grid-column:1/-1}.g6-header{margin-bottom:8px}.g6-tabs{margin-bottom:0}.g6-controls{padding:10px}.g6-footer{font-size:11px}}

.g6-sound{display:flex;align-items:center;gap:12px;margin-inline-start:auto}.g6-sound label{min-width:115px!important}.g6-sound input{width:140px;accent-color:var(--ui-text-79d7bd,#79d7bd);direction:ltr;min-height:35px}@media(max-width:650px){.g6-sound{width:100%;border-top:1px solid var(--ui-border-345665,#345665);padding-top:12px}.g6-sound label{flex:1}.g6-sound input{width:100%}}
@media(orientation:landscape) and (max-height:600px){.g6-experiment{height:var(--official-view,100dvh);max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:37px 35px minmax(0,1fr) 16px;gap:5px;padding:5px 8px;overflow:hidden}.g6-experiment .g6-header{grid-column:1/-1;margin:0;min-width:0}.g6-experiment .g6-header h1{font-size:14px;margin:0}.g6-experiment .g6-header small{display:none}.g6-experiment .g6-header button{min-height:31px;padding:4px 9px;font-size:12px}.g6-experiment .g6-tabs{grid-column:1/-1;margin:0;padding:0;min-width:0}.g6-experiment .g6-tabs button{font-size:11px;min-height:31px;padding:4px 9px}.g6-experiment .g6-stage{grid-row:3;grid-column:1;display:flex;flex-direction:column;min-width:0;min-height:0;border-radius:12px}.g6-experiment .g6-stage-heading{display:flex;padding:6px 10px;gap:9px}.g6-experiment .g6-stage-heading h2{font-size:12px;margin:0}.g6-experiment .g6-stage-heading p{font-size:10px;line-height:1.4}.g6-experiment .g6-stage-actions{margin:0;flex-wrap:nowrap;gap:3px;max-width:none}.g6-experiment .g6-stage-actions button{font-size:10px;min-height:28px;padding:3px 5px}.g6-experiment .g6-stage-actions a{font-size:10px}.g6-experiment .g6-stage svg{flex:1;min-height:0;height:100%;max-height:none;width:100%}.g6-experiment .g6-status{padding:0 6px;min-height:14px;font-size:10px}.g6-experiment .g6-controls{grid-row:3;grid-column:2;margin:0;overflow-y:auto;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:9px;padding:9px;min-height:0;border-radius:12px}.g6-experiment .g6-controls label,.g6-experiment .g6-controls .g6-range{min-width:0!important;width:100%;font-size:11px;flex:none}.g6-experiment .g6-controls button{font-size:12px;min-height:34px;padding:6px}.g6-experiment .g6-sound{display:block;width:100%;margin:0}.g6-experiment .g6-sound input{width:100%}.g6-experiment .g6-footer{grid-row:4;grid-column:1/-1;margin:0;font-size:9px;line-height:14px;overflow:hidden}.g6-experiment .g6-footer details{display:none}}

/* A fixed lesson frame: the experiment stays visible while tool pages change. */
.g6-experiment{box-sizing:border-box;max-width:none;height:var(--official-view,100vh);height:var(--official-view,100dvh);min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 270px;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:10px 14px;overflow:hidden}
.g6-experiment *{box-sizing:border-box}
.g6-experiment .g6-header{grid-column:1/-1;gap:12px;margin:0;min-width:0}
.g6-experiment .g6-header>div{min-width:0;flex:1}
.g6-experiment .g6-header h1{margin:2px 0;font-size:clamp(15px,1.6vw,23px);line-height:1.35}
.g6-experiment .g6-header small{font-size:11px}
.g6-experiment .g6-header button{min-height:44px;padding:8px 12px;white-space:nowrap}
.g6-experiment .g6-tabs{grid-column:1/-1;min-width:0;margin:0;padding:0 0 3px;gap:6px}
.g6-experiment .g6-tabs button{min-height:40px;font-size:13px;padding:7px 12px;flex:none}
.g6-experiment .g6-stage{grid-column:1;grid-row:3;display:flex;flex-direction:column;min-width:0;min-height:0;border-radius:16px}
.g6-experiment .g6-stage-heading{display:flex;flex:none;padding:10px 14px 5px;gap:10px}
.g6-experiment .g6-stage-heading>div:first-child{min-width:0;flex:1}
.g6-experiment .g6-stage-heading h2{font-size:16px;line-height:1.45;margin:0 0 3px}
.g6-experiment .g6-stage-heading p{font-size:12px;line-height:1.45}
.g6-experiment .g6-stage-actions{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:start;max-width:none;margin:0;gap:5px}
.g6-experiment .g6-stage-actions button{font-size:12px;min-height:36px;padding:6px 10px}
.g6-experiment .g6-stage svg{flex:1;min-height:0;height:100%;max-height:none;width:100%}
.g6-experiment .g6-status{flex:none;min-height:0;padding:3px 10px;font-size:12px;line-height:1.4}
.g6-experiment .g6-status:empty{display:none}
.g6-experiment .g6-controls{grid-column:2;grid-row:3;margin:0;padding:10px;min-width:0;min-height:0;overflow:hidden;border-radius:16px}
.g6-experiment .g6-controls label,.g6-experiment .g6-controls .g6-range{min-width:0!important;width:100%;font-size:13px;gap:4px;flex:none}
.g6-experiment .g6-controls button{font-size:13px;min-height:42px;padding:7px}
.g6-experiment .g6-controls select{width:100%;min-width:0;min-height:38px;font-size:13px;padding:6px}
.g6-experiment .g6-controls input[type=range]{width:100%;min-height:32px;margin:0;padding:0}
.g6-experiment .g6-footer{grid-column:1/-1;grid-row:4;display:flex;align-items:center;gap:8px;margin:0;font-size:11px;line-height:1.4;overflow:visible}
.g6-experiment .g6-footer button{padding:4px 8px;min-height:28px;font-size:11px;white-space:nowrap}
.g6-single-app{grid-template-rows:auto minmax(0,1fr) auto}
.g6-single-app .g6-tabs{display:none}
.g6-single-app .g6-stage,.g6-single-app .g6-controls{grid-row:2}
.g6-single-app .g6-footer{grid-row:3}
/* Shared by grades six and seven; rows are measured before paging. */
.g6-controls.lab-control-deck,.g7-controls.lab-control-deck{display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:8px;overflow:hidden}
.lab-control-viewport{flex:1;min-height:0;min-width:0;overflow:hidden}
.lab-control-page{display:grid;align-items:start;align-content:start;gap:10px;min-width:0}
.lab-control-page>*{min-width:0!important;grid-column:auto!important;margin:0}
.lab-control-page>[hidden]{display:none!important}
.lab-control-nav{display:flex;flex:none;align-items:center;justify-content:space-between;gap:6px;border-top:1px solid #65838955;padding-top:6px}
.lab-control-nav output{font-size:11px;text-align:center;white-space:nowrap}
.lab-control-nav button{font-size:11px!important;padding:5px 9px!important;min-height:32px!important}
.lab-control-nav button:disabled{opacity:.35}
@media(orientation:portrait){
 .g6-experiment{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) minmax(180px,28vh) auto;grid-template-rows:auto auto minmax(0,1fr) minmax(180px,28dvh) auto;padding:8px;gap:6px}
 .g6-experiment .g6-header{gap:6px}.g6-experiment .g6-header h1{font-size:15px}.g6-experiment .g6-header button{padding:7px 9px;font-size:12px;min-height:40px}
 .g6-experiment .g6-stage{grid-column:1;grid-row:3}.g6-experiment .g6-controls{grid-column:1;grid-row:4;padding:8px}
 .g6-experiment .g6-stage-heading{padding:8px 10px 2px}.g6-experiment .g6-stage-heading h2{font-size:14px}.g6-experiment .g6-stage-heading p{font-size:12px}
 .g6-experiment .g6-stage-actions button{font-size:11px;min-height:32px;padding:5px 8px}
 .g6-experiment .g6-footer{grid-row:5;font-size:10px}.g6-experiment .g6-footer button{font-size:10px}
 .g6-single-app{grid-template-rows:auto minmax(0,1fr) minmax(180px,28vh) auto;grid-template-rows:auto minmax(0,1fr) minmax(180px,28dvh) auto}
 .g6-single-app .g6-stage{grid-row:2}.g6-single-app .g6-controls{grid-row:3}.g6-single-app .g6-footer{grid-row:4}
}
@media(orientation:landscape) and (max-height:600px){
 .g6-experiment{grid-template-columns:minmax(0,1fr) 225px;gap:4px;padding:4px 8px}
 .g6-experiment .g6-header h1{font-size:14px}.g6-experiment .g6-header small{display:none}.g6-experiment .g6-header button{min-height:34px;font-size:12px;padding:5px 9px}
 .g6-experiment .g6-tabs button{min-height:32px;font-size:12px;padding:4px 9px}
 .g6-experiment .g6-stage-heading{padding:6px 9px 0}.g6-experiment .g6-stage-heading h2{font-size:13px}.g6-experiment .g6-stage-heading p{font-size:11px}
 .g6-experiment .g6-stage-actions{flex-direction:row}.g6-experiment .g6-stage-actions button{min-height:32px;padding:4px 8px}
 .g6-experiment .g6-controls{padding:7px}.g6-experiment .g6-controls label,.g6-experiment .g6-controls .g6-range{font-size:12px}
 .g6-experiment .g6-controls button{font-size:12px;min-height:36px}.g6-experiment .g6-controls select{font-size:12px;min-height:34px}
 .g6-experiment .g6-footer{font-size:10px}.g6-experiment .g6-footer button{min-height:24px;font-size:10px;padding:2px 8px}
}
.lab-live-result{display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:8px 12px;flex:none;background:#eef8f5;color:#214e50;border-top:1px solid #b4d3cf;padding:8px 12px;font-size:12px;line-height:1.4}
.lab-live-result strong{font-size:16px;color:#125857;white-space:nowrap;font-variant-numeric:tabular-nums}
.lab-live-result>span:last-child{color:#3d626b;text-align:end}
@media(max-width:500px){.lab-live-result{grid-template-columns:auto 1fr;gap:2px 10px;padding:6px 9px}.lab-live-result strong{text-align:end;font-size:15px}.lab-live-result>span:last-child{grid-column:1/-1;text-align:start;font-size:11px}}
@media(orientation:landscape) and (max-height:600px){.lab-live-result{padding:4px 9px;font-size:11px;gap:7px}.lab-live-result strong{font-size:14px}}

.g6-stage-heading .g6-stage-actions{display:flex;flex-direction:row;align-items:center;gap:6px;flex-wrap:wrap}.g6-stage-actions [data-command="yellow-kit"][aria-pressed="true"]{background:#eed374;color:#283e42}.g6 [data-rheostat]:focus-visible{outline:2px solid #138d78;outline-offset:4px}

/* A calm, uninterrupted work surface; warnings never resize the circuit. */
.g6-experiment .g6-stage{background:linear-gradient(145deg,#e4eeeb,#d5e3e1);box-shadow:none}
.g6-experiment #g6-scene{background:transparent;border:0;border-radius:0;outline:none!important;box-shadow:none!important}
.g6-experiment #g6-scene [tabindex]:focus{outline:none!important;box-shadow:none!important}
.g6-experiment #g6-scene [tabindex]:focus-visible{filter:drop-shadow(0 0 3px #229b88)}
.g6-experiment .g6-controls .g6-status{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:10px;background:#fff1d5;color:#775021;text-align:start;flex:none}
.g6-experiment .g6-stage-heading{padding:8px 12px 3px}
.g6-experiment .g6-controls{overflow-y:auto}

/* The tools own vertical gestures; reaching an edge never moves the page. */
.g6-experiment .g6-controls.lab-control-stack{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;align-content:start}
.g6-experiment .g6-controls input[type=range]{touch-action:pan-y}
.g6-experiment .g6-controls .g6-solar-light{flex:none;touch-action:pan-y}
