.triangle-board{max-width:720px;margin:12px auto;color:#243749}
.triangle-board canvas{display:block;touch-action:none;width:100%;height:auto;aspect-ratio:560/205;background:#f1f6ed;border:1px solid #c5d3c5;border-radius:9px;object-fit:contain}
.triangle-board .tri-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:8px 0}
.triangle-board label{display:flex;align-items:center;gap:9px;flex:1;min-width:170px}
.triangle-board input[type=range]{min-width:70px;width:auto;flex:1;accent-color:#37695b}
.triangle-board output{min-width:3em}.tri-status{font-size:.88rem;color:#426453}
#triActions,#triFindings{margin:8px 0}#triList .work-card{margin:8px 0}.triangle-board [hidden]{display:none!important}
#triFindings canvas{max-height:145px}.slide-paper .triangle-board{max-width:570px}
.ggb-board{width:100%;min-width:0;margin:.55rem 0;color:#243749}
.ggb-frame{display:block;width:100%;height:clamp(290px,54vh,530px);border:1px solid #bbc9bd;border-radius:6px;background:white}
.ggb-command,.ggb-editor-inputs{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap;margin:.45rem 0}
.ggb-command input{min-width:9rem;flex:1}.ggb-command[hidden]{display:none}
.ggb-keypad{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;max-width:560px;padding:6px;margin:0 0 6px;border:1px solid #cbd6c9;border-radius:6px;background:#eff3ed}
.ggb-keypad[hidden]{display:none}.ggb-keypad .ggb-key{min-width:0;min-height:34px;padding:3px 1px;line-height:1.2;border:1px solid #ced8ce;border-radius:4px;background:white;color:#294d40;font-size:15px;touch-action:manipulation}
.ggb-keypad .ggb-key:active,.ggb-key-toggle[aria-expanded=true]{background:#deeadf;border-color:#789985}
.ggb-note{display:block;color:#466751}.ggb-note:empty,#ggbEditorNote:empty{display:none}
.ggb-note.bad{color:#963e32}.ggb-editor{width:min(940px,94vw);max-height:94vh}
.ggb-editor-inputs label{display:flex;align-items:center;gap:.4rem}.ggb-editor-inputs input{max-width:240px}
.canvas-geometry .ggb-frame{height:310px}.slide-paper .ggb-frame{height:395px}#triFindings .ggb-frame{height:285px}

.ggb-tools,.ggb-object-list,.ggb-object-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.ggb-tools{margin:4px 0}.ggb-tools[hidden],.ggb-objects[hidden]{display:none}
.ggb-objects{margin:5px 0;border:1px solid #cbd6c9;border-radius:6px;padding:5px 8px;background:#f7f9f4}
.ggb-objects summary{cursor:pointer;font-weight:600}
.ggb-object-list{align-items:stretch;margin-top:5px}.ggb-object-row{padding:4px 8px;background:white;border-radius:4px}
.ggb-object-row label{display:inline-flex;align-items:center;gap:4px;font-size:14px}
.ggb-object-row input[type=number]{width:5.4em;min-width:0}
.ggb-object-row input[type=range]{width:clamp(90px,18vw,220px);accent-color:#37695b}
.ggb-student .ggb-tools button,.ggb-student .ggb-key,.ggb-student .ggb-object-row input:not([type=checkbox]){min-height:44px}
.ggb-student .ggb-keypad{max-width:100%}
.ggb-dock{display:contents}
.ggb-full-tools{display:none}
.student-wrap:has(#studentTriangle:not([hidden])>div:not([hidden])>.ggb-board){max-width:none}
.ggb-board.ggb-expanded{
  position:fixed;inset:0;z-index:1000;box-sizing:border-box;display:flex;flex-direction:column;
  width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;
  overflow:hidden;overscroll-behavior:contain;background:#fffefa;color:#243749;font-size:16px;line-height:1.35
}
.ggb-board.ggb-expanded .ggb-tools{
  order:3;align-self:center;flex:0 0 auto;position:relative;z-index:2;max-width:calc(100% - 14px);margin:0 7px max(7px,env(safe-area-inset-bottom));
  align-items:center;gap:3px;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;padding:3px;
  background:#fafbf7;border:1px solid #d3dacf;border-radius:10px;box-shadow:0 3px 14px #34443a12
}
.ggb-expanded .ggb-tools>*{flex:none}
.ggb-expanded .ggb-tools>.ggb-zoom-actions{display:flex;gap:3px}
.ggb-board.ggb-expanded .ggb-full-tools{display:inline-block}
.ggb-expanded:not(.ggb-controls-open) .ggb-tools>:not(.ggb-full-tools,.ggb-expand-toggle,.ggb-zoom-actions),
.ggb-expanded:not(.ggb-controls-open)>.ggb-objects,.ggb-board.ggb-expanded:not(.ggb-controls-open) .ggb-dock{display:none}
.ggb-board.ggb-expanded::before{content:"";flex:1;pointer-events:none}
.ggb-board.ggb-expanded .ggb-frame{position:absolute;inset:0;min-height:0;min-width:0;width:100%;height:100%!important;border:0;border-radius:0}
.ggb-board.ggb-expanded .ggb-dock{
  display:block;position:relative;z-index:1;align-self:center;order:2;flex:0 1 auto;
  width:min(100%,600px);max-height:48%;overflow:auto;overscroll-behavior:contain;background:#fffefa
}
.ggb-board.ggb-expanded .ggb-objects{margin:0}
.ggb-board.ggb-expanded>.ggb-objects,.ggb-board.ggb-expanded>.ggb-note{position:relative;z-index:1;max-height:25%;overflow:auto}
body:has(.ggb-expanded){overflow:hidden}
.layout-plane:has(.ggb-inline-fullscreen){transform:none;isolation:auto}
.layout-viewport:has(.ggb-inline-fullscreen),[data-layout-key]:has(.ggb-inline-fullscreen){overflow:visible;z-index:1000}
.ggb-zoom summary{display:inline list-item;cursor:pointer;padding:6px;color:#345e51}
.ggb-zoom[open]>div{display:inline-flex;gap:4px;flex-wrap:wrap}
/* An open group puts its buttons on a line of their own in current browsers, which left the keys beside it half a row
   higher. Title and buttons share one line; where a browser still stacks them, the bar lines up along its bottom edge. */
.ggb-tools .ggb-zoom{margin:0}
.ggb-zoom[open]{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.ggb-board:not(.ggb-expanded) .ggb-tools{align-items:flex-end}
.ggb-student .ggb-zoom summary{display:inline-block;box-sizing:border-box;min-height:44px;line-height:32px}
.ggb-student .ggb-zoom summary::after{content:" ▸"}.ggb-student .ggb-zoom[open] summary::after{content:" ▾"}

@media(max-width:560px){
  .ggb-student .ggb-tools{gap:4px}
  .ggb-student .ggb-tools button{padding:4px 8px;font-size:14px}
  .ggb-student .ggb-zoom[open]{display:flex;align-items:center;gap:4px;flex:1 0 100%}
  .ggb-student .ggb-zoom[open]>div{display:flex}
}
/* Point plotting: the student's table and steps, and the teacher's picture of the whole class. */
/* A plotting board is taller, so one unit is wide enough to tap a quarter of it. */
.ggb-student.ggb-plot .ggb-frame{height:clamp(360px,72vh,760px)}
.plot-panel{margin:.5rem 0;padding:.6rem .75rem;border:1px solid #cbd6c9;border-radius:6px;background:#f7f9f4;color:#243749}
.plot-guide{margin:0 0 .5rem;font-weight:600;line-height:1.5}
.plot-table{border-collapse:collapse;max-width:100%;background:white}
.plot-table th,.plot-table td{border:1px solid #bbc9bd;padding:4px 6px;text-align:center;min-width:3.4rem}
.plot-table th{background:#eff3ed;font-style:italic;font-family:"Times New Roman",serif;min-width:2.2rem}
.plot-table input{width:4.2rem;min-height:40px;box-sizing:border-box;padding:2px 4px;text-align:center;font-size:1.05rem}
.plot-value{display:inline-flex;align-items:center;gap:1px;font-size:1.05rem}
.plot-frac{display:inline-flex;flex-direction:column;align-items:center;line-height:1.05;font-size:.92em}
.plot-frac span:first-child{border-bottom:1px solid currentColor;padding:0 3px}
.plot-confirm{margin-top:.55rem;min-height:44px}.plot-confirm[hidden]{display:none}
.plot-class{margin:.4rem 0 .8rem}.plot-class h4{margin:.2rem 0}.plot-class-count{margin:.2rem 0;color:#466751}
.plot-class-picture{display:block;width:100%;max-height:62vh;border:1px solid #bbc9bd;border-radius:6px;background:white}
.plot-class-options{display:flex;gap:1.2rem;flex-wrap:wrap;margin:.35rem 0}
.plot-class-options label{display:inline-flex;align-items:center;gap:.3rem}.plot-class-options label[hidden]{display:none}
.plot-grid{stroke:#e3e9e1;stroke-width:1}.plot-axis{stroke:#4a5a52;stroke-width:1.4}
.plot-tick{font-size:12px;fill:#55675d}
.plot-dot{fill:#2468a8;fill-opacity:.42;stroke:#1b4f80;stroke-width:1}
.plot-guess{fill:#c63e30;fill-opacity:.55;stroke:#8f2b21;stroke-width:1}
.plot-curve{fill:none;stroke:#1f7a54;stroke-width:2.6;stroke-linejoin:round}
.plot-function{display:flex;align-items:baseline;gap:.6rem;margin:0 0 .45rem;font-size:1.35rem}
.plot-function-label{font-size:.85rem;color:#466751;border:1px solid #bbc9bd;border-radius:4px;padding:0 6px;background:white}
.plot-table input:focus{outline:3px solid #2468a8;outline-offset:1px}
.plot-table td[data-mark=ok]{background:#e8f4ea}.plot-table td[data-mark=ok]::after{content:" \2713";color:#1f7a54;font-weight:700}
.plot-table td[data-mark=bad]{background:#fbe9e5}.plot-table td[data-mark=bad]::after{content:" \2717";color:#b0452f;font-weight:700}
.plot-table td[data-mark] input{width:3.3rem}
.plot-keys{display:grid;grid-template-columns:repeat(4,minmax(0,4.2rem));gap:6px;margin-top:.55rem}.plot-keys[hidden]{display:none}
.plot-key{min-height:46px;padding:2px;font-size:1.1rem;touch-action:manipulation}.plot-key:last-child{grid-column:span 2}
.plot-class h4 .plot-function-law{font-weight:400}
.plot-errors{display:flex;flex-wrap:wrap;gap:6px;margin:.3rem 0}
.plot-error{min-height:38px;text-align:left}
.plot-errors button.plot-error[aria-pressed=true],.plot-errors button.plot-error[aria-pressed=true]:hover,.plot-errors button.plot-error[aria-pressed=true]:focus{background:#b0452f;border-color:#8f2b21;color:#fff;font-weight:600}
.plot-class-options[hidden]{display:none}
.plot-density{display:inline-flex;align-items:center;gap:.4rem}.plot-density input{width:min(260px,40vw);accent-color:#2468a8}
.plot-dot.plot-class-dot{fill:#8a8f98;fill-opacity:.3;stroke:#6b7078}
.plot-examples{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px;margin:.4rem 0}
.plot-example{border:1px solid #cbd6c9;border-radius:6px;padding:8px 10px;background:#fbfcf9}
.plot-example h5{margin:0 0 6px;font-size:1rem}
.plot-example .plot-table{margin-bottom:6px}.plot-example .plot-table td{min-width:2.6rem;white-space:nowrap}
.plot-cross{fill:none;stroke:#b0452f;stroke-width:2.6;stroke-linecap:round}
.plot-cross-label{font-size:12px;fill:#b0452f}
.plot-example-slips{margin:.4rem 0 0;padding-left:1.2rem;color:#7c2c1e}
.plot-curve.plot-law-0{stroke:#2468a8}.plot-curve.plot-law-1{stroke:#c2681c}.plot-curve.plot-law-2{stroke:#7c52a0}
.plot-dot.plot-law-1{fill:#c2681c;stroke:#8a480f}.plot-dot.plot-law-2{fill:#7c52a0;stroke:#553672}
.plot-law-name.plot-law-0{color:#1b4f80}.plot-law-name.plot-law-1{color:#8a480f}.plot-law-name.plot-law-2{color:#553672}
.plot-table th .katex{font-size:1em;font-style:normal}
/* The sheet on a slide: readable from the back of the room, and never taller than the screen. */
/* The table and the controls stand beside the graph paper, so the whole sheet is on screen at once. */
.plot-demo{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:.35rem 1.2rem;align-items:start;font-size:1.1rem}
.plot-demo>*{grid-column:1;min-width:0}
.plot-demo>.plot-class-picture{grid-column:2;grid-row:1 / span 4;max-height:60vh;margin:0}
.plot-demo .plot-table{width:100%}.plot-demo .plot-table td{min-width:2.6rem;height:2.4rem;font-size:1.1rem}
.plot-demo .plot-class-count{margin:.3rem 0;line-height:1.5}
.plot-demo .plot-class-options[hidden]{display:none}.plot-demo .plot-class-options{align-items:center;margin:.2rem 0}
@media (max-width:760px){.plot-demo{display:block}.plot-demo>.plot-class-picture{margin:.4rem 0}}

/* 含参函数画板：每条曲线一行——函数式、当前的底数、滑条；滑条两端的数是取值区间，可以自己填 */
.ggb-params{display:grid;gap:.3em;margin:.35em 0;padding:.4em .6em;border:1px solid #cbd6c9;border-radius:6px;background:#f7f9f4}
.ggb-params[hidden]{display:none}
/* 画板页右侧放课件卡片（观察方向、要想的问题）时，卡片上不要「下发此元素」「打开大图」 */
#slidePlane:has(#geometryBlock:not([hidden])) .el-page>.element-send,#slidePlane:has(#geometryBlock:not([hidden])) .el-page .slide-media-link{display:none}
.ggb-param{display:grid;grid-template-columns:minmax(6.4em,auto) 5.8em minmax(0,1fr);align-items:center;gap:.6em;padding-left:.55em;border-left:.4em solid var(--curve)}
.ggb-param-law{font-size:1.1em;white-space:nowrap}
.ggb-param-value{font-weight:700;font-variant-numeric:tabular-nums;color:var(--curve);white-space:nowrap}
.ggb-param-range{display:flex;align-items:center;gap:.4em;min-width:0}
.ggb-param-range input.ggb-param-slider{flex:1;width:auto;min-width:60px;margin:0;padding:0;accent-color:var(--curve)}
.ggb-param-range input.ggb-param-end{flex:none;width:4.2em;min-width:0;margin:0;padding:.15em .3em;text-align:center;font:inherit;border:1px solid #9fb3a5;border-radius:4px;background:white;-moz-appearance:textfield}
.ggb-param-end::-webkit-inner-spin-button,.ggb-param-end::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.ggb-param-link{display:inline-flex;align-items:center;gap:.45em;font-weight:600;cursor:pointer;justify-self:start}
.ggb-param-link input{width:1.2em;height:1.2em;margin:0;accent-color:#37695b}
.ggb-student .ggb-param-range input{min-height:40px}
.ggb-params[inert] input.ggb-param-end{border-color:transparent;background:transparent}
.ggb-tools .pupil-cast{margin-left:auto}.pupil-cast[data-on="true"]{background:#fbe9e6;border-color:#c63e30;color:#8f2a1f;font-weight:700}
/* 学生平板：画板、滑条一屏放得下 */
.ggb-student:has(.ggb-params:not([hidden])) .ggb-frame{height:clamp(240px,calc(100dvh - 445px),640px)}
/* 「指数与对数」页在学生平板上：画板在左，两根滑条竖排在右，下面还要留出写发现的地方 */
.ggb-student.ggb-simple:not(.ggb-expanded):has(.ggb-params:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,330px);column-gap:.6rem;align-items:start}
.ggb-student.ggb-simple:not(.ggb-expanded):has(.ggb-params:not([hidden]))>.ggb-tools{grid-column:1 / -1}
.ggb-student.ggb-simple:not(.ggb-expanded):has(.ggb-params:not([hidden]))>.ggb-frame{grid-column:1;grid-row:2;height:clamp(240px,calc(100dvh - 470px),640px)}
.ggb-student.ggb-simple:not(.ggb-expanded) .ggb-params{grid-column:2;grid-row:2;margin:0;gap:.7em;padding:.6em .7em}
.ggb-student.ggb-simple:not(.ggb-expanded) .ggb-param{grid-template-columns:1fr auto;row-gap:.25em}
.ggb-student.ggb-simple:not(.ggb-expanded) .ggb-param-range{grid-column:1 / -1}
.ggb-student.ggb-simple:not(.ggb-expanded) :is(.ggb-note,.ggb-objects){grid-column:1 / -1}
@media (max-width:760px){
  .ggb-student.ggb-simple:not(.ggb-expanded):has(.ggb-params:not([hidden])){display:block}
  .ggb-student.ggb-simple:not(.ggb-expanded) .ggb-params{margin:.35em 0}
}
/* 展开成大画板时滑条留在画板下面 */
.ggb-board.ggb-expanded:has(.ggb-params:not([hidden])) .ggb-dock{display:block}
.ggb-board.ggb-expanded>.ggb-params{position:relative;z-index:1;order:2;align-self:center;width:min(100%,640px);margin:0 0 6px;background:#fffefa}
.student-page:has(#studentTriangle .ggb-simple .ggb-params:not([hidden])) #runForm :is(#runAnswer,.math-answer-edit){height:4.4rem;min-height:0}
