/* 只套用於數位教具操作箱。材料本身的位值、長度及數量配色維持教學意義。 */
#tab-sandbox { --s-ink:#161616; --s-paper:#fffef8; --s-blue:#164aad; --s-red:#c72c25; --s-yellow:#f6d234; color:var(--s-ink); }
#tab-sandbox .sandbox-mondrian-heading { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,1.25fr); gap:5px; border:5px solid var(--s-ink); background:var(--s-ink); margin-bottom:18px; }
#tab-sandbox .sandbox-title-block { padding:18px 22px; background:var(--s-yellow); }
#tab-sandbox .sandbox-eyebrow { display:block; font-size:14px; font-weight:800; letter-spacing:.06em; }
#tab-sandbox .sandbox-title-block h2 { margin:6px 0 8px; color:var(--s-ink); font:900 clamp(1.65rem,2.9vw,2.5rem)/1.25 var(--font-base); letter-spacing:-.03em; }
#tab-sandbox .sandbox-title-block p { margin:0; max-width:44em; color:var(--s-ink); font-size:16px; line-height:1.6; }
#tab-sandbox .sandbox-picker-block { display:flex; flex-direction:column; justify-content:center; gap:8px; padding:18px; background:var(--s-paper); min-width:0; }
#tab-sandbox .sandbox-picker-block label { font-size:17px; font-weight:900; }
#tab-sandbox #sandbox-unit-select { width:100%; min-width:0; min-height:56px; padding:12px; font-size:18px; font-weight:750; color:var(--s-ink); background:white; border:2px solid var(--s-ink); border-radius:0; cursor:pointer; }
#tab-sandbox .sandbox-picker-block p { margin:0; font-size:14px; line-height:1.5; color:#3d3d38; }
#tab-sandbox .sandbox-stage-heading { display:flex; align-items:center; gap:12px; border:4px solid var(--s-ink); border-bottom:0; background:var(--s-paper); }
#tab-sandbox .sandbox-stage-heading > span { align-self:stretch; display:grid; place-items:center; min-width:52px; padding:8px; border-right:4px solid var(--s-ink); background:var(--s-blue); color:#fff; font:900 22px/1 var(--font-base); }
#tab-sandbox .sandbox-stage-heading strong { padding:8px 0; font-size:18px; font-weight:900; }
#tab-sandbox .sandbox-stage-heading small { margin-left:auto; padding:8px 14px; color:#3d3d38; font-size:14px; font-weight:700; }
#tab-sandbox #sandbox-stage { min-width:0; padding:18px; border:4px solid var(--s-ink); background:var(--s-paper); }
#tab-sandbox #sandbox-stage :is(.manipulative-card,.card,.ho-tool,.pv-lab,.number-line-tool) { border:0; border-radius:0; box-shadow:none; margin:0; padding:0; background:var(--s-paper); }
#tab-sandbox #sandbox-stage :is(.ho-heading,.pv-heading) { padding-bottom:14px; border-bottom:3px solid var(--s-ink); }
#tab-sandbox #sandbox-stage :is(.ho-heading > span,.pv-kicker) { color:#41413c; }
#tab-sandbox #sandbox-stage :is(h4,h5) { color:var(--s-ink); }
#tab-sandbox #sandbox-stage :is(button,select) { border-radius:0; }
#tab-sandbox #sandbox-stage :is(.ho-tool,.pv-lab) :is(button,select) { border-color:var(--s-ink); box-shadow:none; }
#tab-sandbox #sandbox-stage :is(.ho-tool button,.pv-lab button):hover:not(:disabled) { border-color:var(--s-blue); outline:1px solid var(--s-blue); }
#tab-sandbox #sandbox-stage :is(.ho-guide,.pv-guide) { border:3px solid var(--s-ink); border-radius:0; background:#fffdf0; color:var(--s-ink); }
#tab-sandbox #sandbox-stage :is(.ho-guide > ol,.pv-progress) { gap:5px; }
#tab-sandbox #sandbox-stage :is(.ho-guide > ol .current,.pv-progress .is-current) { color:#fff; background:var(--s-blue); border-color:var(--s-ink); border-radius:0; }
#tab-sandbox #sandbox-stage .pv-progress .is-current > span { color:var(--s-ink); background:var(--s-yellow); }
#tab-sandbox #sandbox-stage :is(.ho-guide [data-ho-action="next"],.pv-new-question,.pv-next) { background:var(--s-blue); color:#fff; border-color:var(--s-ink); box-shadow:3px 3px 0 var(--s-ink); }
#tab-sandbox #sandbox-stage :is(.ho-guide [data-ho-action="next"],.pv-new-question,.pv-next):hover:not(:disabled) { background:#103780; }
#tab-sandbox #sandbox-stage .pv-activity-switch [aria-pressed="true"] { background:var(--s-blue); color:white; border-color:var(--s-ink); box-shadow:none; }
#tab-sandbox #sandbox-stage :is(.ho-result,.pv-question) { background:#fff7cd; border:3px solid var(--s-ink); border-left:8px solid var(--s-red); border-radius:0; }
#tab-sandbox #sandbox-stage :is(.pv-material-switch,.pv-reference-pieces,.ho-visual) { border-radius:0; }
#tab-sandbox #sandbox-stage :is(button,select):disabled { opacity:.45; box-shadow:none; }
#tab-sandbox :is(button,select):focus-visible { outline:3px solid var(--s-ink); outline-offset:3px; box-shadow:0 0 0 6px var(--s-yellow); }
#tab-sandbox .lesson-focus-button { background:var(--s-blue); color:#fff; border-color:var(--s-ink); border-radius:0; box-shadow:3px 3px 0 var(--s-ink); }
.lesson-focus #tab-sandbox .sandbox-title-block { display:flex; align-items:center; padding:12px 18px; }
.lesson-focus #tab-sandbox .sandbox-title-block h2 { font-size:1.5rem; margin:0; }
.lesson-focus #tab-sandbox :is(.sandbox-eyebrow,.sandbox-title-block p,.sandbox-picker-block p) { display:none; }
.lesson-focus #tab-sandbox .sandbox-picker-block { padding:12px 16px; gap:4px; }
.calm-focus-mode #tab-sandbox { --s-yellow:#ebe7cf; --s-blue:#34596d; --s-red:#8a4639; }
.high-contrast-mode #tab-sandbox { --s-paper:#111; --s-ink:#fff; --s-yellow:#222; --s-blue:#164aad; --s-red:#c72c25; }
.high-contrast-mode #tab-sandbox :is(.sandbox-picker-block p,.sandbox-stage-heading small,.ho-heading > span,.pv-kicker) { color:#fff !important; }
.high-contrast-mode #tab-sandbox #sandbox-stage :is(.ho-guide,.pv-guide,.ho-result,.pv-question) { background:#18181b; color:#fff; }
.high-contrast-mode #tab-sandbox #sandbox-unit-select { background:#111; color:#fff; }
@media (max-width:1000px) { #tab-sandbox .sandbox-mondrian-heading { grid-template-columns:minmax(0,1fr) minmax(280px,1.2fr); } }
@media (max-width:700px) {
  #tab-sandbox .sandbox-mondrian-heading { grid-template-columns:minmax(0,1fr); margin-bottom:14px; }
  #tab-sandbox .sandbox-title-block { padding:14px; }
  #tab-sandbox .sandbox-picker-block { grid-column:1 / -1; grid-row:2; padding:14px; }
  #tab-sandbox .sandbox-stage-heading small { display:none; }
  #tab-sandbox #sandbox-stage { padding:12px; }
}
