:root{
  --sb-bg:#fffdf8;
  --sb-card:#ffffff;
  --sb-ink:#251532;
  --sb-muted:#776a80;
  --sb-purple:#7a2dbb;
  --sb-purple-2:#9c64ca;
  --sb-purple-soft:#f3eafb;
  --sb-orange:#f2a900;
  --sb-orange-soft:#fff2cf;
  --sb-line:#e5d8ed;
  --sb-blue:#4e85c5;
  --sb-shadow:0 18px 48px rgba(84,43,110,.12);
  --sb-section-color:#7a2dbb;
  --sb-helper-color:#f2a900;
  --sb-point-color:#f2a900;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--sb-bg);color:var(--sb-ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
button,select{font:inherit}
button{color:inherit}
.section-builder-page{min-height:100vh;background:radial-gradient(circle at 88% 3%,rgba(122,45,187,.07),transparent 34%),linear-gradient(180deg,#fff,#fffaf1 130%)}
.sb-shell{min-height:100vh;display:grid;grid-template-columns:280px minmax(0,1fr)}
.sb-sidebar{position:relative;z-index:5;display:flex;flex-direction:column;min-height:100vh;padding:26px 20px 18px;background:rgba(255,255,255,.92);border-right:3px solid var(--sb-orange);box-shadow:8px 0 32px rgba(62,31,82,.05)}
.sb-brand{display:flex;align-items:center;gap:12px;padding:0 6px 22px;border-bottom:1px solid var(--sb-line)}
.sb-brand__logo{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:linear-gradient(145deg,var(--sb-purple),#9d5bd1);color:#fff;text-decoration:none;font-weight:900;font-size:13px;box-shadow:0 9px 20px rgba(122,45,187,.23)}
.sb-brand h1{margin:0;font-size:22px;line-height:1.05}
.sb-brand p{margin:4px 0 0;color:var(--sb-muted);font-size:13px}
.sb-panel{padding:20px 4px 0}
.sb-panel__heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;font-size:13px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:#67576f}
.sb-badge{padding:3px 7px;border-radius:999px;background:var(--sb-purple-soft);color:var(--sb-purple);font-size:10px}
.sb-shape-list{display:grid;gap:8px}
.sb-shape-btn{width:100%;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;padding:9px 10px;border:1px solid transparent;border-radius:14px;background:transparent;text-align:left;cursor:pointer;transition:.16s ease}
.sb-shape-btn:hover{background:#fff9ec;border-color:#f5d68b}
.sb-shape-btn.is-active{background:linear-gradient(90deg,var(--sb-orange-soft),#fff);border-color:#f2c65b;box-shadow:0 7px 18px rgba(190,129,0,.08)}
.sb-shape-btn__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#fff;border:1px solid #eee5f2}
.sb-shape-btn__icon svg{width:34px;height:34px;fill:none;stroke:var(--sb-purple);stroke-width:1.45;stroke-linejoin:round;stroke-linecap:round}
.sb-shape-btn__name{font-size:14px;font-weight:740}
.sb-shape-btn__check{opacity:0;color:var(--sb-purple);font-size:16px;font-weight:900}
.sb-shape-btn.is-active .sb-shape-btn__check{opacity:1}
.sb-panel--mode{margin-top:auto;padding-top:22px}
.sb-segmented{display:grid;grid-template-columns:1fr 1fr;padding:3px;border:1px solid #e8ddeb;border-radius:12px;background:#f9f6fb}
.sb-segmented__btn{border:0;border-radius:9px;padding:9px 6px;background:transparent;color:var(--sb-muted);font-size:12px;font-weight:750;cursor:pointer}
.sb-segmented__btn.is-active{background:#fff;color:var(--sb-purple);box-shadow:0 4px 12px rgba(72,40,92,.1)}
.sb-segmented--three{grid-template-columns:1fr 1.25fr 1fr}
.sb-hint{margin:10px 2px 0;color:var(--sb-muted);font-size:11.5px;line-height:1.45}
.sb-panel--points{padding-top:18px}
.sb-counter{font-variant-numeric:tabular-nums;color:var(--sb-purple)}
.sb-point-list{display:grid;gap:7px;margin-bottom:10px;min-height:38px}
.sb-empty-points{padding:10px 0;color:#96899f;font-size:11.5px;line-height:1.4}
.sb-point-row{display:flex;align-items:center;gap:9px;padding:7px 8px;border:1px solid #eee5f2;background:#fff;border-radius:10px;font-size:12px}
.sb-point-row__mark{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--sb-orange);color:#fff;font-weight:900}
.sb-point-row__text{min-width:0;flex:1;color:#57465f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-point-row__remove{width:25px;height:25px;border:0;border-radius:8px;background:transparent;color:#9a8ca1;font-size:18px;line-height:1;cursor:pointer}
.sb-point-row__remove:hover{background:#f8eefb;color:var(--sb-purple)}
.sb-btn{border:0;border-radius:11px;padding:9px 12px;font-size:12px;font-weight:780;cursor:pointer}
.sb-btn:disabled{opacity:.42;cursor:not-allowed}
.sb-btn--ghost{border:1px solid #e6d8ec;background:#fff;color:#6b5974}
.sb-btn--wide{width:100%}
.sb-sidebar__footer{padding:15px 6px 0;color:#9a8da2;font-size:11px;line-height:1.4}

.sb-workspace{min-width:0;padding:24px 30px 32px;display:flex;flex-direction:column}
.sb-topbar{width:min(1180px,100%);margin:0 auto 14px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.sb-kicker{margin-bottom:2px;color:var(--sb-purple);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.sb-topbar h2{margin:0;font-size:24px}
.sb-topbar__actions{display:flex;gap:8px}
.sb-icon-btn{display:grid;place-items:center;width:40px;height:40px;border:1px solid #e5d7eb;border-radius:12px;background:rgba(255,255,255,.86);cursor:pointer;box-shadow:0 6px 16px rgba(70,35,90,.06)}
.sb-icon-btn:hover{border-color:#c9a9dc;background:#fff}
.sb-icon-btn svg{width:20px;height:20px;fill:none;stroke:var(--sb-purple);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sb-view-card{width:min(1180px,100%);min-height:0;flex:1;margin:0 auto;display:grid;grid-template-rows:auto minmax(460px,1fr) auto;background:rgba(255,255,255,.82);border:1px solid rgba(78,133,197,.78);border-radius:28px;overflow:hidden;box-shadow:var(--sb-shadow)}
.sb-view-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid #e7edf5;background:rgba(248,250,253,.8)}
.sb-status-pill{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:#fff;border:1px solid #e2e8f0;color:#665971;font-size:12px;font-weight:680}
.sb-status-pill__dot{width:8px;height:8px;border-radius:50%;background:var(--sb-orange);box-shadow:0 0 0 4px rgba(242,169,0,.13)}
.sb-status-pill.is-ready .sb-status-pill__dot{background:#36a766;box-shadow:0 0 0 4px rgba(54,167,102,.12)}
.sb-view-legend{display:flex;gap:13px;align-items:center;color:#82758b;font-size:11px}
.sb-view-legend span{display:flex;align-items:center;gap:5px}
.legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.legend-dot--point{background:var(--sb-point-color)}
.legend-line{display:inline-block;width:17px;height:2px;border-radius:3px}
.legend-line--section{background:var(--sb-section-color)}
.legend-line--helper{height:0;border-top:2px dashed var(--sb-helper-color)}
.sb-viewport{position:relative;min-height:460px;background:radial-gradient(circle at 48% 40%,#fff 0,#f8fafc 52%,#f1f4f8 100%);overflow:hidden;touch-action:none;user-select:none}
.sb-scene{display:block;width:100%;height:100%;min-height:460px;cursor:grab}
.sb-scene.is-dragging{cursor:grabbing}
.sb-scene{shape-rendering:geometricPrecision;text-rendering:geometricPrecision}
.sb-face{stroke:none;vector-effect:non-scaling-stroke;transition:fill .18s,opacity .18s;pointer-events:none}
.sb-face.is-front{fill:rgba(122,45,187,.055);opacity:.92}
.sb-face.is-back-face{fill:rgba(122,45,187,.018);opacity:.58}
.sb-face.is-highlighted{fill:rgba(242,169,0,.13)!important;opacity:1!important}
.sb-edge{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-edge.is-visible{stroke:#514858;stroke-width:2.35}
.sb-edge.is-back{stroke:#aaa0b0;stroke-dasharray:6 6;stroke-width:1.35;opacity:.82}
.sb-edge-extension-guide{fill:none;stroke:#9e91aa;stroke-width:1.25;stroke-dasharray:5 6;opacity:.4;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-edge-extension-guide.is-near{stroke:var(--sb-helper-color);opacity:.72;stroke-width:1.55}
.sb-section-fill{fill:rgba(122,45,187,.14);stroke:none;pointer-events:none}
.sb-section-edge,.sb-section-outline{fill:none;stroke:var(--sb-section-color);stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-section-edge--soft{stroke-width:3.4;opacity:.72}
.sb-section-outline{stroke-width:4.6}
.sb-source-triangle{fill:rgba(242,169,0,.06);stroke:rgba(242,169,0,.62);stroke-width:1.8;stroke-dasharray:7 7;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-helper-line,.sb-extension-line,.sb-support-line,.sb-trace-line{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-extension-line{stroke:var(--sb-helper-color);stroke-width:3.15}
.sb-support-line{stroke:#9a8fa1;stroke-width:1.55;stroke-dasharray:7 6;opacity:.9}
.sb-helper-line{stroke:var(--sb-helper-color);stroke-width:2.7}
.sb-trace-line{fill:none;stroke:var(--sb-section-color);stroke-width:2.7;stroke-linecap:round;vector-effect:non-scaling-stroke;pointer-events:none;opacity:.9}
.sb-section-edge.is-past{opacity:.96}
.sb-extension-line.is-past,.sb-helper-line.is-past,.sb-trace-line.is-past{opacity:.62}
.sb-support-line.is-past{opacity:.42}
.sb-section-edge.is-current,.sb-extension-line.is-current,.sb-support-line.is-current,.sb-trace-line.is-current{opacity:1}
.sb-section-edge.is-occluded,.sb-section-outline.is-occluded,.sb-extension-line.is-occluded,.sb-helper-line.is-occluded,.sb-trace-line.is-occluded{stroke-dasharray:7 6;opacity:.58}
.sb-section-edge--soft.is-occluded{opacity:.42}
.sb-support-line.is-occluded{stroke-dasharray:5 7;opacity:.38}
.sb-section-edge.is-past.is-occluded,.sb-extension-line.is-past.is-occluded,.sb-helper-line.is-past.is-occluded,.sb-trace-line.is-past.is-occluded{opacity:.34}
.sb-support-line.is-past.is-occluded{opacity:.22}
.sb-section-edge.is-revealed,.sb-section-outline.is-revealed,.sb-extension-line.is-revealed,.sb-helper-line.is-revealed,.sb-support-line.is-revealed,.sb-trace-line.is-revealed{animation:sbReveal .34s ease both;animation-delay:var(--sb-reveal-delay,0ms)}
.sb-section-edge.is-new,.sb-extension-line.is-new,.sb-support-line.is-new,.sb-trace-line.is-new,.sb-section-outline.is-new{
  stroke-dasharray:var(--sb-line-l);stroke-dashoffset:var(--sb-line-l);animation:drawLine .68s cubic-bezier(.22,.8,.26,1) forwards
}
.sb-parallel-arrow{fill:none;stroke:var(--sb-purple-2);stroke-width:2;stroke-dasharray:5 5;marker-end:url(#arrowPurple);vector-effect:non-scaling-stroke;pointer-events:none}
.sb-arrow-marker{fill:var(--sb-purple-2)}
.sb-scene-point{fill:var(--sb-point-color);stroke:#fff;stroke-width:2.7;vector-effect:non-scaling-stroke;filter:url(#pointShadow);cursor:pointer}
.sb-section-point{fill:#fff;stroke:var(--sb-section-color);stroke-width:2.3;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-section-point.is-past{opacity:.75}
.sb-aux-point{fill:#fff8e6;stroke:var(--sb-helper-color);stroke-width:2.3;vector-effect:non-scaling-stroke;pointer-events:none}
.sb-point-label,.sb-section-label,.sb-aux-label{font-size:17px;font-weight:850;paint-order:stroke;stroke:#fff;stroke-width:5.5;stroke-linejoin:round;pointer-events:none}
.sb-vertex-label{font-size:13px;font-weight:800;fill:#4f4858;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round;pointer-events:none;opacity:.82}
.sb-point-label{fill:color-mix(in srgb, var(--sb-point-color) 70%, #5d4300)}
.sb-section-label{fill:var(--sb-section-color)}
.sb-aux-label{fill:color-mix(in srgb, var(--sb-helper-color) 75%, #654400);font-size:15px}
.sb-grid-line{stroke:#dfe6ee;stroke-width:1;opacity:.34;vector-effect:non-scaling-stroke}
.sb-grid-axis{stroke:#c5d0db;stroke-width:1.3;opacity:.48;vector-effect:non-scaling-stroke}
@keyframes drawLine{to{stroke-dashoffset:0}}
@keyframes sbReveal{from{stroke-opacity:0}to{stroke-opacity:1}}
.sb-toast{position:absolute;left:50%;top:18px;transform:translate(-50%,-8px);padding:9px 13px;border-radius:11px;background:rgba(36,21,50,.9);color:#fff;font-size:12px;font-weight:650;opacity:0;pointer-events:none;transition:.18s ease;z-index:4;box-shadow:0 10px 25px rgba(0,0,0,.14)}
.sb-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.sb-orbit-tip{position:absolute;right:18px;bottom:16px;display:flex;align-items:center;gap:7px;padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.72);backdrop-filter:blur(8px);color:#8b7f92;font-size:10.5px;pointer-events:none}
.sb-orbit-tip svg{width:18px;height:18px;fill:none;stroke:#8b7f92;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

.sb-construction{display:grid;grid-template-columns:minmax(260px,1.25fr) minmax(250px,.9fr) auto;gap:18px;align-items:center;padding:15px 18px 17px;border-top:1px solid #e4eaf1;background:linear-gradient(180deg,#fff,#fbf8fd)}
.sb-construction.is-disabled{opacity:.58}
.sb-construction__eyebrow{margin-bottom:3px;color:var(--sb-purple);font-size:10px;text-transform:uppercase;font-weight:850;letter-spacing:.07em}
.sb-construction__meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:3px}
.sb-method-badge{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#f1e7f8;color:var(--sb-purple);font-size:9px;font-weight:850;letter-spacing:.03em;text-transform:none}
.sb-method-badge[data-method="trace"]{background:#edf8f1;color:#26784a}
.sb-method-badge[data-method="parallel"]{background:#fff3d8;color:#996600}
.sb-method-badge[data-method="direct"]{background:#eef3f8;color:#55718b}
.sb-construction__title{font-size:14px;font-weight:830;line-height:1.25}
.sb-construction__description{margin-top:4px;color:var(--sb-muted);font-size:11.5px;line-height:1.4;max-width:58ch}
.sb-timeline{display:flex;align-items:center;gap:0;width:100%}
.sb-timeline__item{position:relative;flex:1;height:20px;border:0;background:transparent;padding:0;cursor:pointer}
.sb-timeline__item::before{content:"";position:absolute;left:0;right:0;top:9px;height:2px;background:#e6dbea}
.sb-timeline__item:first-child::before{left:50%}
.sb-timeline__item:last-child::before{right:50%}
.sb-timeline__dot{position:absolute;left:50%;top:4px;transform:translateX(-50%);width:12px;height:12px;border-radius:50%;background:#e0d3e7;border:2px solid #fff;box-shadow:0 0 0 1px #dbcce3;transition:.15s}
.sb-timeline__item.is-past .sb-timeline__dot{background:#b58bcf;box-shadow:0 0 0 1px #b58bcf}
.sb-timeline__item.is-current .sb-timeline__dot{width:16px;height:16px;top:2px;background:var(--sb-purple);box-shadow:0 0 0 4px rgba(122,45,187,.11)}
.sb-player{display:flex;align-items:center;gap:6px;justify-self:end}
.sb-player__btn{display:grid;place-items:center;width:34px;height:34px;border:1px solid #e2d5e8;border-radius:10px;background:#fff;cursor:pointer}
.sb-player__btn:disabled{opacity:.38;cursor:not-allowed}
.sb-player__btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sb-player__btn--primary{width:40px;height:40px;background:var(--sb-purple);color:#fff;border-color:var(--sb-purple);box-shadow:0 7px 16px rgba(122,45,187,.22)}
.sb-player__btn--primary svg path{fill:currentColor;stroke:currentColor}
.sb-player__step{padding:0 7px;color:#7a6a82;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.sb-speed{display:flex;align-items:center;gap:6px;margin-left:2px;color:#8b7c92;font-size:10px}
.sb-speed select{padding:6px 7px;border:1px solid #e0d4e5;border-radius:9px;background:#fff;color:#665771;font-size:11px}
.sb-speed select:disabled{opacity:.55}

.sb-dialog{width:min(470px,calc(100vw - 30px));border:0;border-radius:22px;padding:28px;color:var(--sb-ink);box-shadow:0 24px 70px rgba(41,21,55,.25)}
.sb-dialog::backdrop{background:rgba(35,20,46,.32);backdrop-filter:blur(3px)}
.sb-dialog__close{position:absolute;top:12px;right:12px;width:34px;height:34px;border:0;border-radius:10px;background:#f5eff8;color:#765d80;font-size:24px;cursor:pointer}
.sb-dialog__icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--sb-orange-soft);color:#a86d00;font-size:25px;font-weight:900}
.sb-dialog h2{margin:14px 0 10px;font-size:22px}
.sb-dialog ol{padding-left:20px;color:#605169;font-size:13px;line-height:1.55}
.sb-dialog p{margin:14px 0 0;padding-top:13px;border-top:1px solid #eee4f1;color:#83748b;font-size:12px;line-height:1.5}

@media (max-width:1000px){
  .sb-shell{grid-template-columns:235px minmax(0,1fr)}
  .sb-sidebar{padding-left:14px;padding-right:14px}
  .sb-workspace{padding:18px}
  .sb-construction{grid-template-columns:1fr auto}
  .sb-timeline-wrap{grid-column:1/-1;grid-row:2}
  .sb-player{grid-column:2;grid-row:1}
  .sb-shape-btn{grid-template-columns:42px 1fr auto;padding-left:7px;padding-right:7px}
}
@media (max-width:760px){
  .sb-shell{display:block}
  .sb-sidebar{min-height:auto;border-right:0;border-bottom:3px solid var(--sb-orange);padding:14px}
  .sb-brand{padding-bottom:12px}
  .sb-panel--figures{padding-top:12px}
  .sb-shape-list{grid-template-columns:repeat(5,minmax(74px,1fr));overflow-x:auto;padding-bottom:4px}
  .sb-shape-btn{display:flex;flex-direction:column;gap:5px;justify-content:center;padding:7px;text-align:center}
  .sb-shape-btn__check{display:none}
  .sb-shape-btn__name{font-size:10.5px}
  .sb-panel--mode{margin-top:0;padding-top:12px}
  .sb-panel--points{padding-top:12px}
  .sb-sidebar__footer{display:none}
  .sb-workspace{padding:13px 10px 18px}
  .sb-topbar{margin-bottom:10px}
  .sb-view-card{border-radius:20px;grid-template-rows:auto minmax(420px,65vh) auto}
  .sb-view-legend{display:none}
  .sb-viewport,.sb-scene{min-height:420px}
  .sb-construction{grid-template-columns:1fr;padding:13px}
  .sb-player{grid-column:1;grid-row:auto;justify-self:stretch;justify-content:center}
  .sb-timeline-wrap{grid-column:1;grid-row:auto}
  .sb-speed{margin-left:auto}
}


/* v7 layout and customization */
.sb-panel--colors{padding-top:18px}
.sb-color-list{display:grid;gap:8px}
.sb-color-field{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid #eee5f2;background:#fff;border-radius:11px;color:#5f5368;font-size:12px;font-weight:650}
.sb-color-field input[type="color"]{width:36px;height:28px;border:0;padding:0;background:transparent;cursor:pointer}
.sb-color-field input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
.sb-color-field input[type="color"]::-webkit-color-swatch{border:1px solid #dccfe5;border-radius:8px}

.sb-view-card{grid-template-rows:auto minmax(540px,1fr)}
.sb-stage{display:grid;grid-template-columns:minmax(0,1fr) 308px;min-height:540px}
.sb-viewport{min-height:540px;border-right:1px solid #e4eaf1}
.sb-construction{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto 1fr;gap:14px;align-items:start;padding:16px 16px 18px;border-top:0;background:linear-gradient(180deg,#fff,#fbf8fd);overflow:hidden}
.sb-construction__copy{min-width:0}
.sb-construction__title{font-size:22px;line-height:1.14}
.sb-construction__description{font-size:12px;line-height:1.52;max-width:none}
.sb-timeline-wrap{display:flex;align-items:stretch;justify-content:flex-start;min-height:0}
.sb-timeline{display:flex;flex-direction:column;align-items:center;gap:0;width:22px;padding:4px 0;margin-right:2px}
.sb-timeline__item{width:20px;height:26px;flex:none}
.sb-timeline__item::before{left:9px;right:auto;top:0;bottom:0;width:2px;height:auto;background:#e6dbea}
.sb-timeline__item:first-child::before{top:50%}
.sb-timeline__item:last-child::before{bottom:50%}
.sb-timeline__dot{left:4px;top:50%;transform:translateY(-50%);width:12px;height:12px}
.sb-timeline__item.is-current .sb-timeline__dot{left:2px;top:50%;transform:translateY(-50%);width:16px;height:16px}
.sb-player{display:grid;grid-template-columns:auto auto auto;grid-template-areas:"prev play next" "step speed speed";justify-content:start;gap:10px 8px;align-items:center}
.sb-player__btn{width:38px;height:38px;border-radius:12px}
.sb-player__btn--primary{width:46px;height:46px}
.sb-player__step{grid-area:step;padding:0;font-size:12px}
.sb-speed{grid-area:speed;margin-left:0;justify-self:start;font-size:11px}

.sb-scene-point,.sb-section-point,.sb-aux-point{filter:url(#pointShadow)}
.sb-point-label,.sb-section-label,.sb-aux-label{font-size:15px;stroke-width:5px}

@media (max-width:1180px){
  .sb-stage{grid-template-columns:minmax(0,1fr) 280px}
}
@media (max-width:1000px){
  .sb-view-card{grid-template-rows:auto minmax(520px,1fr)}
  .sb-stage{grid-template-columns:1fr}
  .sb-viewport{border-right:0;border-bottom:1px solid #e4eaf1;min-height:460px}
  .sb-construction{grid-template-columns:minmax(220px,1fr) auto;grid-template-rows:auto 1fr;align-items:start}
  .sb-construction__copy{grid-column:1/-1}
  .sb-player{grid-column:2;grid-row:2;grid-template-columns:auto auto auto;grid-template-areas:"prev play next" "step speed speed";justify-self:end}
  .sb-timeline-wrap{grid-column:1;grid-row:2}
  .sb-timeline{flex-direction:row;width:100%;padding:0;margin-right:0}
  .sb-timeline__item{flex:1;height:20px;width:auto}
  .sb-timeline__item::before{left:0;right:0;top:9px;bottom:auto;width:auto;height:2px}
  .sb-timeline__item:first-child::before{left:50%;top:9px}
  .sb-timeline__item:last-child::before{right:50%;bottom:auto}
  .sb-timeline__dot{left:50%;top:4px;transform:translateX(-50%)}
  .sb-timeline__item.is-current .sb-timeline__dot{left:50%;top:2px;transform:translateX(-50%)}
}
@media (max-width:760px){
  .sb-viewport,.sb-scene{min-height:380px}
  .sb-construction{grid-template-columns:1fr;padding:13px}
  .sb-player{grid-column:1;grid-row:auto;justify-self:stretch;justify-content:center;grid-template-areas:"prev play next step" "speed speed speed speed";grid-template-columns:auto auto auto auto}
  .sb-timeline-wrap{grid-column:1;grid-row:auto}
}

/* v8 — compact desktop layout, fixed player, palette presets */
.sb-preset-list{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:7px}
.sb-preset-btn{border:1px solid #e8ddea;border-radius:8px;padding:5px 4px;background:#fff;color:#716379;font-size:9.5px;font-weight:750;cursor:pointer;line-height:1.15}
.sb-preset-btn:hover{border-color:#cdb7dc;background:#fbf7fd}
.sb-preset-btn.is-active{border-color:color-mix(in srgb,var(--sb-section-color) 45%,#d8c8df);background:color-mix(in srgb,var(--sb-section-color) 9%,#fff);color:var(--sb-section-color)}

@media (min-width:1001px){
  html,body,.section-builder-page{height:100%;overflow:hidden}
  .sb-shell{height:100vh;min-height:0;grid-template-columns:224px minmax(0,1fr)}
  .sb-sidebar{height:100vh;min-height:0;padding:12px 10px 10px;overflow:hidden;border-right-width:2px}
  .sb-brand{gap:8px;padding:0 3px 10px}
  .sb-brand__logo{width:34px;height:34px;border-radius:10px;font-size:10px}
  .sb-brand h1{font-size:17px}
  .sb-brand p{margin-top:2px;font-size:10px}
  .sb-panel{padding:10px 2px 0}
  .sb-panel__heading{margin-bottom:6px;font-size:10px}
  .sb-badge{padding:2px 5px;font-size:8px}
  .sb-shape-list{gap:4px}
  .sb-shape-btn{grid-template-columns:32px 1fr auto;gap:7px;padding:4px 6px;border-radius:10px;min-height:39px}
  .sb-shape-btn__icon{width:30px;height:30px;border-radius:8px}
  .sb-shape-btn__icon svg{width:23px;height:23px}
  .sb-shape-btn__name{font-size:11px;line-height:1.15}
  .sb-shape-btn__check{font-size:12px}
  .sb-panel--mode{margin-top:8px;padding-top:8px}
  .sb-segmented{padding:2px;border-radius:9px}
  .sb-segmented__btn{padding:6px 3px;border-radius:7px;font-size:9.5px}
  .sb-hint{margin:5px 1px 0;font-size:9px;line-height:1.25}
  .sb-panel--points{padding-top:9px}
  .sb-point-list{gap:4px;margin-bottom:5px;min-height:0}
  .sb-empty-points{padding:4px 0;font-size:9px;line-height:1.25}
  .sb-point-row{gap:6px;padding:4px 5px;border-radius:8px;font-size:9.5px}
  .sb-point-row__mark{width:19px;height:19px;font-size:9px}
  .sb-point-row__remove{width:20px;height:20px;font-size:15px}
  .sb-btn{padding:6px 8px;border-radius:8px;font-size:9.5px}
  .sb-panel--colors{padding-top:9px}
  .sb-preset-list{gap:4px;margin-bottom:5px}
  .sb-preset-btn{padding:4px 2px;font-size:8.5px;border-radius:7px}
  .sb-color-list{grid-template-columns:repeat(3,1fr);gap:4px}
  .sb-color-field{display:grid;justify-items:center;gap:3px;padding:4px 2px;border-radius:8px;font-size:8px;text-align:center}
  .sb-color-field input[type="color"]{width:30px;height:20px}
  .sb-sidebar__footer{display:none}

  .sb-workspace{height:100vh;min-height:0;padding:8px 12px 10px;overflow:hidden}
  .sb-topbar{flex:none;width:100%;margin:0 0 6px;min-height:38px}
  .sb-kicker{font-size:8.5px;margin-bottom:0}
  .sb-topbar h2{font-size:18px;line-height:1.05}
  .sb-topbar__actions{gap:5px}
  .sb-icon-btn{width:31px;height:31px;border-radius:9px}
  .sb-icon-btn svg{width:16px;height:16px}

  .sb-view-card{width:100%;height:auto;min-height:0;flex:1;grid-template-rows:38px minmax(0,1fr);border-radius:18px}
  .sb-view-head{padding:5px 10px;min-height:38px}
  .sb-status-pill{gap:5px;padding:4px 7px;font-size:9px}
  .sb-status-pill__dot{width:6px;height:6px}
  .sb-view-legend{gap:8px;font-size:8.5px}
  .legend-line{width:14px}
  .sb-stage{height:100%;min-height:0;grid-template-columns:minmax(0,1fr) 282px}
  .sb-viewport{height:100%;min-height:0}
  .sb-scene{height:100%;min-height:0}
  .sb-orbit-tip{right:10px;bottom:9px;padding:5px 7px;font-size:8.5px}
  .sb-orbit-tip svg{width:15px;height:15px}

  .sb-construction{height:100%;min-height:0;grid-template-rows:minmax(132px,34%) minmax(0,1fr) auto;gap:8px;padding:10px 10px 9px;overflow:hidden}
  .sb-construction__copy{min-height:0;overflow:auto;padding-right:4px;scrollbar-width:thin}
  .sb-construction__meta{gap:5px;margin-bottom:4px}
  .sb-construction__eyebrow{font-size:8px;margin-bottom:0}
  .sb-method-badge{padding:2px 5px;font-size:7.5px}
  .sb-construction__title{font-size:14px;line-height:1.18}
  .sb-construction__description{margin-top:5px;font-size:9.5px;line-height:1.36}
  .sb-timeline-wrap{min-height:0;overflow:auto;align-items:flex-start;padding:1px 0}
  .sb-timeline{width:20px;padding:0}
  .sb-timeline__item{height:21px;width:18px}
  .sb-timeline__item::before{left:8px}
  .sb-timeline__dot{left:3px;width:11px;height:11px}
  .sb-timeline__item.is-current .sb-timeline__dot{left:1px;width:15px;height:15px}

  /* Player occupies a fixed bottom row; description height can no longer move it. */
  .sb-player{align-self:end;display:grid;grid-template-columns:32px 40px 32px 1fr;grid-template-areas:"prev play next step" "speed speed speed speed";gap:5px 6px;width:100%;padding-top:7px;border-top:1px solid #eee5f2}
  .sb-player__btn{width:32px;height:32px;border-radius:9px}
  .sb-player__btn--primary{width:40px;height:40px;border-radius:10px}
  .sb-player__btn svg{width:15px;height:15px}
  .sb-player__step{grid-area:step;justify-self:end;align-self:center;padding:0;font-size:9.5px}
  .sb-speed{grid-area:speed;width:100%;display:grid;grid-template-columns:auto 1fr;gap:5px;font-size:8.5px}
  .sb-speed select{width:100%;padding:4px 6px;border-radius:7px;font-size:9px}
}

/* Short laptop screens: keep every tool reachable without page scrolling. */
@media (min-width:1001px) and (max-height:760px){
  .sb-sidebar{padding-top:8px}
  .sb-brand{padding-bottom:7px}
  .sb-brand__logo{width:30px;height:30px}
  .sb-brand h1{font-size:15px}
  .sb-panel{padding-top:7px}
  .sb-shape-btn{min-height:34px;padding-top:2px;padding-bottom:2px}
  .sb-shape-btn__icon{width:27px;height:27px}
  .sb-shape-btn__icon svg{width:21px;height:21px}
  .sb-hint{display:none}
  .sb-point-row{padding-top:3px;padding-bottom:3px}
  .sb-color-field{padding-top:2px;padding-bottom:2px}
  .sb-workspace{padding-top:5px;padding-bottom:6px}
  .sb-topbar{min-height:32px;margin-bottom:4px}
  .sb-topbar h2{font-size:16px}
  .sb-view-card{grid-template-rows:34px minmax(0,1fr)}
  .sb-view-head{min-height:34px;padding-top:3px;padding-bottom:3px}
  .sb-stage{grid-template-columns:minmax(0,1fr) 266px}
  .sb-construction{grid-template-rows:minmax(112px,32%) minmax(0,1fr) auto;padding:8px;gap:6px}
  .sb-construction__title{font-size:12.5px}
  .sb-construction__description{font-size:8.8px;line-height:1.3}
  .sb-timeline__item{height:18px}
  .sb-player{padding-top:5px}
}

/* v9 — edge-extension placement mode */
@media (min-width:1001px){
  .sb-segmented--three .sb-segmented__btn{font-size:8.7px;padding-left:2px;padding-right:2px}
}

/* v10 — textbook-weight geometry and printable variants */
.sb-section-edge,.sb-section-outline{stroke-width:2.75}
.sb-section-edge--soft{stroke-width:2.15}
.sb-section-outline{stroke-width:3}
.sb-extension-line{stroke-width:1.9}
.sb-helper-line,.sb-trace-line{stroke-width:1.75}
.sb-support-line{stroke-width:1.15}
.sb-source-triangle{stroke-width:1.2}
.sb-scene-point{stroke-width:1.8;filter:none}
.sb-section-point{stroke-width:1.7;filter:none}
.sb-aux-point{stroke-width:1.65;filter:none}
.sb-point-label,.sb-section-label,.sb-aux-label{
  font-size:13.5px;
  font-weight:650;
  paint-order:normal;
  stroke:none;
  stroke-width:0;
}
.sb-aux-label{font-size:13px}
.sb-vertex-label{
  font-size:11.5px;
  font-weight:600;
  paint-order:normal;
  stroke:none;
  stroke-width:0;
  opacity:.88;
}

/* The print palette also previews a calmer, textbook-like drawing on screen. */
.sb-print-preset .sb-face{fill-opacity:.035}
.sb-print-preset .sb-section-fill{fill:rgba(17,24,39,.055)}
.sb-print-preset .sb-section-edge,
.sb-print-preset .sb-section-outline{stroke-width:2.15}
.sb-print-preset .sb-extension-line,
.sb-print-preset .sb-helper-line,
.sb-print-preset .sb-trace-line{stroke-width:1.45}
.sb-print-preset .sb-support-line{stroke-width:1}
.sb-print-preset .sb-edge.is-visible{stroke-width:1.7}
.sb-print-preset .sb-edge.is-back{stroke-width:1.05}
.sb-print-preset .sb-point-label,
.sb-print-preset .sb-section-label,
.sb-print-preset .sb-aux-label,
.sb-print-preset .sb-vertex-label{font-weight:550}

.sb-panel--variant{padding-top:9px}
.sb-variant-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:5px}
.sb-btn--variant{background:var(--sb-section-color);color:#fff;border:1px solid var(--sb-section-color)}
.sb-btn--variant:disabled{opacity:.38}

.sb-variant-dialog{
  width:min(1080px,calc(100vw - 24px));
  max-width:none;
  height:min(90vh,900px);
  max-height:90vh;
  padding:0;
  overflow:hidden;
  border-radius:18px;
}
.sb-variant-dialog__head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px 10px;border-bottom:1px solid #eee5f2}
.sb-variant-dialog__head h2{margin:2px 0 0;font-size:22px}
.sb-variant-dialog__head .sb-dialog__close{position:static;flex:none}
.sb-variant-toolbar{display:flex;gap:8px;padding:10px 22px;border-bottom:1px solid #eee5f2;background:#fcfafc}
.sb-variant-print-area{height:calc(100% - 124px);overflow:auto;padding:16px 20px 22px;background:#f5f5f3}
.sb-variant-empty{padding:42px 20px;text-align:center;color:#8f8494;font-size:13px}
.sb-variant-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.sb-variant-task{position:relative;background:#fff;border:1px solid #d9d9d6;border-radius:10px;padding:12px;break-inside:avoid;box-shadow:0 5px 14px rgba(0,0,0,.045)}
.sb-variant-task__top{display:flex;align-items:flex-start;gap:8px}
.sb-variant-task__number{flex:none;font-weight:700;font-size:12px;line-height:1.45}
.sb-variant-task__statement{margin:0;min-width:0;font-family:"Times New Roman",Georgia,serif;font-size:14px;line-height:1.3;color:#111;font-weight:400}
.sb-variant-task__remove{position:absolute;right:6px;top:6px;width:24px;height:24px;border:0;border-radius:7px;background:rgba(255,255,255,.92);color:#8d838f;cursor:pointer;font-size:17px;line-height:1;z-index:2}
.sb-variant-task__remove:hover{background:#f5edf8;color:var(--sb-section-color)}
.sb-variant-figure{margin-top:7px;border-top:1px solid #ececeb;padding-top:5px}
.sb-variant-figure svg{display:block;width:100%;height:auto;max-height:250px;background:#fff}
.sb-variant-answer{margin-top:7px;padding-top:7px;border-top:1px dashed #bababa}
.sb-variant-answer__label{margin-bottom:3px;font-family:"Times New Roman",Georgia,serif;font-size:11px;font-weight:700;color:#333}
.sb-variant-answer .sb-variant-figure{margin-top:0;padding-top:0;border-top:0}

/* Snapshot drawings are intentionally cleaner than the interactive viewport. */
.sb-variant-figure .sb-grid-line,
.sb-variant-figure .sb-grid-axis{display:none}
.sb-variant-figure .sb-face{fill:#fff;fill-opacity:0;stroke:none}
.sb-variant-figure .sb-edge.is-visible{stroke:#1f1f1f;stroke-width:1.45}
.sb-variant-figure .sb-edge.is-back{stroke:#777;stroke-width:.9;stroke-dasharray:5 5;opacity:.82}
.sb-variant-figure .sb-scene-point{fill:#fff;stroke:#111;stroke-width:1.35;filter:none}
.sb-variant-figure .sb-section-fill{fill:rgba(0,0,0,.045)}
.sb-variant-figure .sb-section-outline{stroke:#111;stroke-width:1.8}
.sb-variant-figure .sb-point-label,
.sb-variant-figure .sb-section-label,
.sb-variant-figure .sb-aux-label,
.sb-variant-figure .sb-vertex-label{
  fill:#111;
  font-family:"Times New Roman",Georgia,serif;
  font-size:12.5px;
  font-weight:400;
  stroke:none;
  paint-order:normal;
}
.sb-variant-figure .sb-point-label{font-weight:600}
.sb-variant-figure .sb-orbit-tip{display:none}

@media (min-width:1001px){
  .sb-panel--variant{padding-top:7px}
  .sb-panel--variant .sb-panel__heading{margin-bottom:4px}
  .sb-variant-actions{gap:4px;margin-bottom:4px}
  .sb-panel--variant .sb-btn{padding:5px 3px;font-size:8.6px}
}
@media (min-width:1001px) and (max-height:760px){
  .sb-panel--variant{padding-top:5px}
  .sb-panel--variant .sb-btn{padding-top:4px;padding-bottom:4px;font-size:8px}
}
@media (max-width:760px){
  .sb-variant-list{grid-template-columns:1fr}
  .sb-variant-dialog{height:94vh;max-height:94vh;width:calc(100vw - 12px)}
  .sb-variant-print-area{padding:10px}
}

@page{size:A4 portrait;margin:10mm}
@media print{
  html,body{height:auto!important;overflow:visible!important;background:#fff!important}
  body>.sb-shell,#helpDialog{display:none!important}
  #variantDialog{
    display:block!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    background:#fff!important;
  }
  #variantDialog::backdrop{display:none!important}
  .sb-variant-dialog__head,.sb-variant-toolbar,.sb-variant-empty,.sb-variant-task__remove{display:none!important}
  .sb-variant-print-area{height:auto!important;overflow:visible!important;padding:0!important;background:#fff!important}
  .sb-variant-list{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5mm 6mm!important}
  .sb-variant-task{padding:3.2mm!important;border:.35mm solid #aaa!important;border-radius:0!important;box-shadow:none!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .sb-variant-task__number{font-size:9pt!important}
  .sb-variant-task__statement{font-size:9.5pt!important;line-height:1.22!important}
  .sb-variant-figure{margin-top:2mm!important;padding-top:1mm!important;border-top:.2mm solid #ddd!important}
  .sb-variant-figure svg{max-height:55mm!important}
  .sb-variant-answer{margin-top:2mm!important;padding-top:2mm!important;border-top:.25mm dashed #999!important}
  .sb-variant-answer__label{font-size:8pt!important}
  .sb-variant-figure .sb-edge.is-visible{stroke-width:.8!important}
  .sb-variant-figure .sb-edge.is-back{stroke-width:.55!important;stroke-dasharray:4 4!important}
  .sb-variant-figure .sb-scene-point{stroke-width:.85!important}
  .sb-variant-figure .sb-section-outline{stroke-width:1.15!important}
  .sb-variant-figure .sb-point-label,
  .sb-variant-figure .sb-section-label,
  .sb-variant-figure .sb-aux-label,
  .sb-variant-figure .sb-vertex-label{font-size:8.2pt!important;font-weight:400!important;stroke:none!important}
  .sb-variant-figure .sb-point-label{font-weight:600!important}
}


/* v11 – stronger labels in printable variant and calmer textbook lines */
.sb-variant-figure .sb-point-label,
.sb-variant-figure .sb-section-label,
.sb-variant-figure .sb-aux-label,
.sb-variant-figure .sb-vertex-label{
  font-size:13.4px;
  font-weight:600;
  letter-spacing:0;
}
.sb-variant-figure .sb-point-label,
.sb-variant-figure .sb-section-label{font-weight:700}

@media print{
  .sb-variant-figure .sb-point-label,
  .sb-variant-figure .sb-section-label,
  .sb-variant-figure .sb-aux-label,
  .sb-variant-figure .sb-vertex-label{font-size:8.7pt!important;font-weight:600!important;stroke:none!important}
  .sb-variant-figure .sb-point-label,
  .sb-variant-figure .sb-section-label{font-weight:700!important}
}


/* v12 */
.sb-scene-point{cursor:grab}
.sb-scene.is-point-dragging .sb-scene-point{cursor:grabbing}

.sb-point-label,.sb-section-label,.sb-aux-label{font-size:14.5px;font-weight:700}
.sb-vertex-label{font-size:14px;font-weight:800;opacity:.96}

.sb-variant-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.sb-variant-toolbar__main{display:flex;gap:8px;flex-wrap:wrap}
.sb-variant-palette{display:grid;gap:7px;padding:10px 12px;border:1px solid #ede2f5;border-radius:12px;background:#fff}
.sb-variant-palette__label{font-size:12px;font-weight:700;color:#6d5f78}
.sb-preset-list--compact{gap:5px}
.sb-preset-list--compact .sb-preset-btn{padding:6px 8px;font-size:11px}
.sb-color-list--compact{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.sb-color-list--compact .sb-color-field{padding:6px 8px;font-size:11px}
.sb-color-list--compact .sb-color-field input[type="color"]{width:30px;height:24px}

#variantPrintArea{
  --sb-variant-section-color:#111111;
  --sb-variant-helper-color:#666666;
  --sb-variant-point-color:#111111;
  --sb-variant-label-color:#111111;
  --sb-variant-hidden-edge:#777777;
}
#variantPrintArea.is-color{
  --sb-variant-label-color:#1f1725;
  --sb-variant-hidden-edge:#8a87a4;
}

.sb-variant-figure .sb-edge.is-visible{stroke:#1f1f1f;stroke-width:1.45}
.sb-variant-figure .sb-edge.is-back{stroke:var(--sb-variant-hidden-edge);stroke-width:.9;stroke-dasharray:5 5;opacity:.82}
.sb-variant-figure .sb-scene-point{fill:#fff;stroke:var(--sb-variant-point-color);stroke-width:1.35;filter:none}
.sb-variant-figure .sb-section-fill{fill:color-mix(in srgb,var(--sb-variant-section-color) 10%, transparent)}
.sb-variant-figure .sb-section-outline{stroke:var(--sb-variant-section-color);stroke-width:1.8}
.sb-variant-figure .sb-point-label,
.sb-variant-figure .sb-section-label,
.sb-variant-figure .sb-aux-label,
.sb-variant-figure .sb-vertex-label{
  font-family:"Times New Roman",Georgia,serif;
  font-size:13.4px;
  stroke:none;
  paint-order:normal;
}
.sb-variant-figure .sb-point-label{fill:var(--sb-variant-point-color);font-weight:700}
.sb-variant-figure .sb-section-label{fill:var(--sb-variant-section-color);font-weight:700}
.sb-variant-figure .sb-aux-label{fill:var(--sb-variant-helper-color);font-weight:600}
.sb-variant-figure .sb-vertex-label{fill:var(--sb-variant-label-color);font-weight:800}

@media print{
  .sb-variant-toolbar{display:none!important}
  .sb-variant-figure .sb-edge.is-back{stroke:var(--sb-variant-hidden-edge)!important}
  .sb-variant-figure .sb-scene-point{stroke:var(--sb-variant-point-color)!important}
  .sb-variant-figure .sb-section-fill{fill:color-mix(in srgb,var(--sb-variant-section-color) 10%, transparent)!important}
  .sb-variant-figure .sb-section-outline{stroke:var(--sb-variant-section-color)!important}
  .sb-variant-figure .sb-point-label{fill:var(--sb-variant-point-color)!important;font-size:9.1pt!important;font-weight:700!important}
  .sb-variant-figure .sb-section-label{fill:var(--sb-variant-section-color)!important;font-size:9.1pt!important;font-weight:700!important}
  .sb-variant-figure .sb-aux-label{fill:var(--sb-variant-helper-color)!important;font-size:8.8pt!important;font-weight:600!important}
  .sb-variant-figure .sb-vertex-label{fill:var(--sb-variant-label-color)!important;font-size:9pt!important;font-weight:800!important}
}

/* v15 — keep the native dialog closed state. Author display:flex must not override dialog:not([open]). */
.sb-variant-dialog:not([open]){display:none}

/* v14 — compact variant controls */
.sb-variant-dialog[open]{display:flex;flex-direction:column}
.sb-variant-dialog__head{flex:none}
.sb-variant-toolbar{position:relative;display:flex;align-items:center;gap:8px;flex:none;padding:9px 22px}
.sb-variant-toolbar__main{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sb-variant-palette-menu{position:relative;margin-left:0}
.sb-variant-palette-menu>summary{list-style:none;cursor:pointer;user-select:none}
.sb-variant-palette-menu>summary::-webkit-details-marker{display:none}
.sb-variant-palette-menu[open]>summary{background:#f4ecfa;border-color:#cba9df}
.sb-variant-palette-menu .sb-variant-palette{position:absolute;z-index:12;top:calc(100% + 8px);left:0;width:min(390px,calc(100vw - 48px));padding:10px;border:1px solid #e3d5ec;border-radius:14px;background:#fff;box-shadow:0 18px 42px rgba(52,31,67,.18)}
.sb-variant-print-area{flex:1;min-height:0;height:auto;overflow:auto;padding:14px 20px 22px}
.sb-variant-answer{display:block!important}
.sb-variant-answer .sb-variant-figure svg{max-height:220px}
@media (max-width:760px){
  .sb-variant-toolbar{padding:8px 12px;align-items:flex-start}
  .sb-variant-toolbar__main{gap:6px}
  .sb-variant-palette-menu .sb-variant-palette{left:auto;right:0;width:min(340px,calc(100vw - 24px))}
}
@media print{
  .sb-variant-palette-menu{display:none!important}
}


/* v97 — graphical MathLav mark in the builder header */
.sb-brand__logo{
  padding:4px;
  overflow:hidden;
  border:1px solid rgba(122,45,187,.14);
  background:#fff;
  box-shadow:0 8px 18px rgba(72,39,88,.10);
}
.sb-brand__logo img{display:block;width:100%;height:100%;object-fit:contain}
