html{--studio-accent:#245a7a;--studio-soft:#edf4f8;--studio-bg:#f4f7fa;--studio-line:#c9d7e1}
html[data-studio-theme="spring"]{--studio-accent:#256b50;--studio-soft:#edf6ee;--studio-bg:#f5f8f1;--studio-line:#c7dbcf}
html[data-studio-theme="summer"]{--studio-accent:#806015;--studio-soft:#fff5d9;--studio-bg:#fffaf0;--studio-line:#e0d3b1}
html[data-studio-theme="fall"]{--studio-accent:#8a4829;--studio-soft:#fff0e5;--studio-bg:#fbf5ee;--studio-line:#e0ccba}
html[data-studio-theme="winter"]{--studio-accent:#315b84;--studio-soft:#edf3fb;--studio-bg:#f3f6fb;--studio-line:#c9d7e9}
@media screen{
  html[data-studio-theme] body:not(.calm-mode){background:var(--studio-bg);color:#16324f}
  html[data-studio-theme] body:not(.calm-mode) .topbar{border-bottom-color:var(--studio-line);background:#fff}
  html[data-studio-theme] body:not(.calm-mode) .studio-actions,html[data-studio-theme] body:not(.calm-mode) .setup-panel{background:#fff;border-color:var(--studio-line)}
  html[data-studio-theme] body:not(.calm-mode) .lesson-area,html[data-studio-theme] body.slide-editor-active:not(.calm-mode){background:var(--studio-bg)}
  html[data-studio-theme] body:not(.calm-mode) .primary-btn,html[data-studio-theme] body:not(.calm-mode) .studio-primary-actions .primary-btn{background:var(--studio-accent);color:#fff;border-color:var(--studio-accent)}
  html[data-studio-theme] body:not(.calm-mode) .studio-navigation .quiet-btn,html[data-studio-theme] body:not(.calm-mode) .top-actions .quiet-btn,html[data-studio-theme] body:not(.calm-mode) .editor-workspace-bar{background:var(--studio-soft);color:#16324f;border-color:var(--studio-line)}
  html[data-studio-theme] body:not(.calm-mode) .setup-section,html[data-studio-theme] body:not(.calm-mode) .site-credit{border-color:var(--studio-line)}
  .studio-actions button,.editor-tabs button,.workbench-card button{line-height:1.4;min-height:42px}
  .studio-actions button:focus-visible,.editor-panel button:focus-visible,.workbench-card button:focus-visible,.workbench-card input:focus-visible,.workbench-card select:focus-visible{outline:3px solid #b16900;outline-offset:3px}
  .editor-section>h3{margin:.1rem 0 .7rem;font-size:1.05rem}.editor-section fieldset{min-width:0;border-radius:12px}.editor-section input,.editor-section select,.editor-section textarea{max-width:100%;min-width:0}
  #editMathTool{display:none!important}#editMathTool[aria-hidden="true"]{visibility:hidden}
  .math-studio-controls{padding:.75rem;margin:.7rem 0;background:#f5f8fb;border:1px solid #c9d8e3;border-radius:10px;min-width:0}
  .math-studio-controls[hidden],.math-studio-controls [hidden]{display:none!important}
  .math-example-actions{display:flex;align-items:end;gap:.65rem;flex-wrap:wrap}.math-example-actions label{flex:1;min-width:140px}.math-example-actions button{flex:none;margin-bottom:.4rem}
  .math-setting-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.math-studio-controls .field-note{font-size:.8rem;line-height:1.45}.math-studio-controls input,.math-studio-controls select{width:100%;box-sizing:border-box}
  .math-required-value{display:block!important;font-size:.98rem!important;font-weight:800;color:#173552!important;white-space:normal}
  .number-bond{width:min(330px,100%);height:210px;min-width:230px}
  .number-bond :is(button,.bond-whole,.bond-part){position:absolute;display:grid;place-items:center;width:74px;height:74px;border:3px solid #4e83a8;border-radius:50%;background:#fff;color:#16324f;font-size:1.5rem;font-weight:800;z-index:2;line-height:1}
  .number-bond .bond-whole{left:calc(50% - 37px);top:0}.number-bond .bond-part{left:7%;bottom:0}.number-bond .bond-part.missing{left:auto;right:7%;border-style:dashed}.number-bond .bond-line{top:100px;width:42%}.number-bond .bond-line.left{left:14%}.number-bond .bond-line.right{right:14%}
  .algebra-balance{grid-template-columns:minmax(0,1fr) 45px minmax(0,1fr);gap:.45rem}.algebra-balance .balance-pan{min-width:0;overflow-wrap:anywhere;padding:.75rem .5rem}
  body.slide-editor-active .counter-equation{padding:.4rem 0;gap:.25rem}body.slide-editor-active .counter-equation strong{font-size:1.15rem}body.slide-editor-active .counter-equation span,body.slide-editor-active .counter-action-help{font-size:.85rem;line-height:1.4;margin:.4rem 0}
  body.slide-editor-active .counter-basket{padding:.6rem;gap:.4rem}body.slide-editor-active .counter-basket h4{font-size:.9rem;margin:0 0 .4rem}body.slide-editor-active .counter-tray{gap:.3rem;min-height:48px}body.slide-editor-active .counter-object{min-width:44px;min-height:48px;padding:3px}body.slide-editor-active .counter-picture{width:30px;height:30px}body.slide-editor-active .counter-picture>span{font-size:28px}body.slide-editor-active .counter-actions{gap:.4rem}
  body.slide-editor-active .creative-activity-title{gap:.4rem}body.slide-editor-active .creative-activity-title small{display:none}body.slide-editor-active .creative-practice-card{grid-template-columns:44px minmax(0,1fr);min-height:66px}body.slide-editor-active .creative-practice-picture{width:44px;height:44px}
  .studio-theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;border:0;padding:0;margin:1rem 0 1.3rem}.studio-theme-options legend{font-weight:700;margin-bottom:.7rem}.studio-theme-options label{display:flex;align-items:center;gap:.65rem;border:1px solid #bfd0dc;border-left:7px solid #245a7a;border-radius:10px;padding:.8rem;background:#f4f8fb;cursor:pointer}.studio-theme-options input{width:20px!important;min-height:20px!important;margin:0!important;accent-color:#16324f;flex:none}.studio-theme-options b,.studio-theme-options small{display:block}.studio-theme-options small{font-size:.8rem;color:#3d566a;line-height:1.4}.studio-theme-options [data-theme-swatch="spring"]{border-left-color:#256b50;background:#edf6ee}.studio-theme-options [data-theme-swatch="summer"]{border-left-color:#806015;background:#fff5d9}.studio-theme-options [data-theme-swatch="fall"]{border-left-color:#8a4829;background:#fff0e5}.studio-theme-options [data-theme-swatch="winter"]{border-left-color:#315b84;background:#edf3fb}.studio-theme-options label:has(input:checked){outline:2px solid #16324f;outline-offset:2px}
  @media(max-width:550px){.math-setting-grid{grid-template-columns:1fr}.studio-theme-options{grid-template-columns:1fr}.math-example-actions>*{width:100%;flex:1}}
}
@media(prefers-reduced-motion:reduce){html[data-studio-theme] body:not(.calm-mode) .topbar,html[data-studio-theme] body:not(.calm-mode) .studio-actions,html[data-studio-theme] body:not(.calm-mode) .setup-panel{transition:none!important}}
@media print{.math-studio-controls,.studio-theme-options{display:none!important}.number-bond :is(.bond-whole,.bond-part){position:absolute;display:grid;place-items:center;width:.7in;height:.7in;border:2px solid #4e83a8;border-radius:50%;background:#fff;z-index:2}.number-bond .bond-whole{left:calc(50% - .35in);top:0}.number-bond .bond-part{left:7%;bottom:0}.number-bond .bond-part.missing{left:auto;right:7%}}

.math-problem-picture{display:block;width:min(100%,380px);height:200px;object-fit:contain;margin:.6rem auto}

#editorSettings [hidden],.studio-menu [hidden]{display:none!important}

.counter-how-to{font-size:.85rem;margin:.25rem 0}.counter-how-to summary{cursor:pointer;font-weight:700;min-height:30px;padding:4px 0}.counter-how-to p{margin:.35rem 0}
