/* CSS 3D box (from boxs/style.css) */
#css-stage{position:absolute;inset:0;display:none;place-items:center;overflow:hidden;background:radial-gradient(ellipse at center,#fff,#eff7fb 75%)}
#stage.css-preview #css-stage{display:grid}
#three-view{position:absolute;inset:0;width:100%;height:100%;}
#three-view canvas{display:block;width:100%;height:100%;}
#css-stage .box3d{--length:300px;--depth:230px;--height:180px;--flap:122px;position:absolute;left:50%;top:49%;width:0;height:0;--rx:-55deg;--ry:-24deg;--rz:-3deg;--scale:1;transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)) scale(var(--scale));cursor:grab;touch-action:none;user-select:none}
#css-stage .box3d:active{cursor:grabbing}
#css-stage .wall,#css-stage .inner,#css-stage .floor,#css-stage .rim,#css-stage .flap{position:absolute;transform-style:preserve-3d}
#css-stage .wall{background:#b99a7e;border:1px solid rgba(92,67,48,.28)}
#css-stage .wall-front,#css-stage .wall-back{width:var(--length);height:var(--height);left:calc(var(--length)/-2);top:calc(var(--height)/-2)}
#css-stage .wall-front{transform:translateZ(calc(var(--depth)/2));background:#b99a7e}
#css-stage .wall-back{transform:translateZ(calc(var(--depth)/-2)) rotateY(180deg);background:#aa8b70}
#css-stage .wall-left,#css-stage .wall-right{width:var(--depth);height:var(--height);left:calc(var(--depth)/-2);top:calc(var(--height)/-2)}
#css-stage .wall-left{transform:translateX(calc(var(--length)/-2)) rotateY(-90deg);background:#9a7b62}
#css-stage .wall-right{transform:translateX(calc(var(--length)/2)) rotateY(90deg);background:#8e7058}
#css-stage .floor{width:var(--length);height:var(--depth);left:calc(var(--length)/-2);top:calc(var(--depth)/-2);transform:translateY(calc(var(--height)/2)) rotateX(90deg);background:#9c8067;border:1px solid #896d55}
#css-stage .inner{background:#a4886f;opacity:.94}
#css-stage .inner-front,#css-stage .inner-back{width:calc(var(--length)-8px);height:var(--height);left:calc((var(--length)-8px)/-2);top:calc(var(--height)/-2)}
#css-stage .inner-front{transform:translateZ(calc(var(--depth)/2 - 2px)) rotateY(180deg)}
#css-stage .inner-back{transform:translateZ(calc(var(--depth)/-2 + 2px))}
#css-stage .inner-left,#css-stage .inner-right{width:calc(var(--depth)-8px);height:var(--height);left:calc((var(--depth)-8px)/-2);top:calc(var(--height)/-2)}
#css-stage .inner-left{transform:translateX(calc(var(--length)/-2 + 2px)) rotateY(90deg)}
#css-stage .inner-right{transform:translateX(calc(var(--length)/2 - 2px)) rotateY(-90deg)}
#css-stage .rim{height:4px;background:#d0b296}
#css-stage .rim-front,#css-stage .rim-back{width:var(--length);left:calc(var(--length)/-2)}
#css-stage .rim-front{top:calc(var(--height)/-2);transform:translateZ(calc(var(--depth)/2))}
#css-stage .rim-back{top:calc(var(--height)/-2);transform:translateZ(calc(var(--depth)/-2)) rotateY(180deg)}
#css-stage .rim-left,#css-stage .rim-right{width:var(--depth);left:calc(var(--depth)/-2)}
#css-stage .rim-left{top:calc(var(--height)/-2);transform:translateX(calc(var(--length)/-2)) rotateY(-90deg)}
#css-stage .rim-right{top:calc(var(--height)/-2);transform:translateX(calc(var(--length)/2)) rotateY(90deg)}
#css-stage .flap{background:#c8aa8d;border:1px solid rgba(104,77,56,.32)}
#css-stage .flap-front,#css-stage .flap-back{width:var(--length);height:var(--flap);left:calc(var(--length)/-2);top:calc(var(--flap)/-2)}
#css-stage .flap-front{transform:translateY(calc(var(--height)/-2)) translateZ(calc(var(--depth)/2 + var(--flap)/2)) rotateX(90deg);background:#c8aa8d}
#css-stage .flap-back{transform:translateY(calc(var(--height)/-2)) translateZ(calc(var(--depth)/-2 - var(--flap)/2)) rotateX(-90deg);background:#cfb194}
#css-stage .flap-left,#css-stage .flap-right{width:var(--depth);height:var(--flap);left:calc(var(--depth)/-2);top:calc(var(--flap)/-2)}
#css-stage .flap-left{transform:translateY(calc(var(--height)/-2)) translateX(calc(var(--length)/-2 - var(--flap)/2)) rotateX(90deg) rotateZ(-90deg);background:#c1a285}
#css-stage .flap-right{transform:translateY(calc(var(--height)/-2)) translateX(calc(var(--length)/2 + var(--flap)/2)) rotateX(90deg) rotateZ(90deg);background:#d0b295}
/* Dimension lines (technical view) */
#css-stage .dim{position:absolute;transform-style:preserve-3d;pointer-events:none}
#css-stage .dim .dim-line{display:block;height:2px;background:#118acb;position:relative}
#css-stage .dim .dim-line::before,#css-stage .dim .dim-line::after{content:"";position:absolute;top:-3px;width:8px;height:8px;border-top:2px solid #118acb;border-left:2px solid #118acb}
#css-stage .dim .dim-line::before{left:0;transform:rotate(-45deg)}
#css-stage .dim .dim-line::after{right:0;transform:rotate(135deg)}
#css-stage .dim .dim-label{position:absolute;top:-16px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:700;color:#118acb;background:rgba(255,255,255,.85);padding:1px 4px;border-radius:4px;white-space:nowrap}
#css-stage .dim-l{left:calc(var(--length)/-2);top:calc(var(--height)/2 + 12px);transform:translateZ(calc(var(--depth)/2 + 12px))}
#css-stage .dim-l .dim-line{width:var(--length)}
#css-stage .dim-w{left:calc(var(--length)/2 + 12px);top:calc(var(--height)/2 + 12px);transform:rotateY(90deg)}
#css-stage .dim-w .dim-line{width:var(--depth)}
#css-stage .dim-w .dim-label{color:#fbb017}
#css-stage .dim-w .dim-line{background:#fbb017}
#css-stage .dim-w .dim-line::before,#css-stage .dim-w .dim-line::after{border-color:#fbb017}
#css-stage .dim-h{left:calc(var(--length)/2 + 12px);top:calc(var(--height)/-2);transform:translateZ(calc(var(--depth)/2 + 12px))}
#css-stage .dim-h .dim-line{width:2px;height:var(--height);background:#6c8290}
#css-stage .dim-h .dim-label{color:#6c8290;top:50%;left:8px;transform:translateY(-50%)}
#css-stage .dim-h .dim-line::before,#css-stage .dim-h .dim-line::after{border-color:#6c8290;width:6px;height:6px}
/* hide dims unless technical view */
#css-stage .dim{display:none}
#css-stage.technical .dim{display:block}
.tech-overlay{position:absolute;bottom:12px;right:12px;background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:11px;box-shadow:0 2px 8px rgba(0,0,0,.06);z-index:6;display:flex;gap:12px;align-items:center}
.tech-overlay[hidden]{display:none}
.tech-svg{width:120px;height:70px}
.tech-info{display:flex;flex-direction:column;gap:2px;font-size:11px}
.tech-info b{color:var(--blue2)}
/* Tray (open, no flaps, shorter) */
#css-stage .tray{--height:105px}
/* Die-Cut (box + lid + lip) */
#css-stage .diecut{--height:88px;--lid-height:185px;--lip-depth:42px}
#css-stage .diecut-lid{position:absolute;width:var(--length);height:var(--lid-height);left:calc(var(--length)/-2);top:calc(var(--height)/-2 - var(--lid-height));transform:translateZ(calc(var(--depth)/-2));background:#b99a7e;border:1px solid rgba(92,67,48,.28);transform-style:preserve-3d}
#css-stage .diecut-lip{position:absolute;width:var(--length);height:var(--lip-depth);left:calc(var(--length)/-2);top:calc(var(--lip-depth)/-2);background:#cfb194;border:1px solid rgba(104,77,56,.32);transform:translateY(calc(var(--height)/-2 - var(--lid-height))) translateZ(calc(var(--depth)/-2 + var(--lip-depth)/2)) rotateX(90deg)}
/* Telescope (base + cap) */
#css-stage .telescope{--total-height:190px;--base-height:100px;--cap-height:78px;--cap-overhang:7px}
#css-stage .telescope-part{position:absolute;left:0;top:0;width:0;height:0;transform-style:preserve-3d}
#css-stage .telescope-base{--height:var(--base-height);transform:translateY(calc(var(--total-height)/2 - var(--base-height)/2))}
#css-stage .telescope-cap{--height:var(--cap-height);--length:calc(300px + 2*var(--cap-overhang));--depth:calc(230px + 2*var(--cap-overhang));transform:translateY(calc((var(--cap-height) - var(--total-height))/2))}
#css-stage .telescope-cap .wall{background:#c8aa8d}
#css-stage .telescope-cap .wall-back{background:#b99a7e}
#css-stage .telescope-top{position:absolute;width:var(--length);height:var(--depth);left:calc(var(--length)/-2);top:calc(var(--depth)/-2);transform:translateY(calc(var(--height)/-2)) rotateX(90deg);background:#cfb194;border:1px solid rgba(104,77,56,.32)}
/* FOL (long flaps) */
#css-stage .fol .flap-front,#css-stage .fol .flap-back{height:calc(var(--flap)*1.4)}
/* Other (closed box) */
#css-stage .other-top{position:absolute;width:var(--length);height:var(--depth);left:calc(var(--length)/-2);top:calc(var(--depth)/-2);transform:translateY(calc(var(--height)/-2)) rotateX(90deg);background:#b99a7e;border:1px solid rgba(92,67,48,.28)}
/* show/hide boxes */
#css-stage .box3d{display:none!important}
#css-stage .box3d.active{display:block!important}
@media(max-width:650px){#css-stage .box3d{--length:230px;--depth:180px;--scale:.82};#css-stage .diecut{--lid-height:155px;--lip-depth:34px};#css-stage .telescope{--total-height:160px;--base-height:82px;--cap-height:66px};#css-stage .telescope-cap{--length:calc(230px + 2*var(--cap-overhang));--depth:calc(180px + 2*var(--cap-overhang))}}
