#shapes{display:grid;gap:6px;grid-template-columns:repeat(3,1fr)}
#shapes button{aspect-ratio:1;width:100%;min-width:0;padding:0;min-height:0;background:#252529;border:1px solid transparent}
#shapes button:hover{background:#313135}
#shapes button[aria-pressed=true]{color:var(--hi);border-color:var(--hi);background:#2a3223}
#shapes svg{fill:currentColor;stroke:none;width:66%;height:66%;overflow:visible}
#ops{gap:5px;margin-top:12px}
#ops button{flex:1;background:#232327;color:#dedee3;border:1px solid #343438}
#ops button:hover:enabled{background:#38383d}
#flipY svg{transform:rotate(90deg)}
#background{gap:10px}
#background button,#background label{position:relative;border:1px solid #ffffff2b;min-width:0;width:27px;height:27px;min-height:0;border-radius:50%;padding:0;cursor:pointer}
#background [aria-pressed=true]{outline:1.5px solid var(--hi);outline-offset:3px}
#background label{background:conic-gradient(#f68994,#ffdc94,#b6f594,#74daff,#968bff,#f68994);display:grid;place-items:center}
#background label input{opacity:0;position:absolute;inset:0;width:100%;height:100%;margin:0}
#background label i{font-style:normal;font-size:16px;color:#141417}
.palette{margin-top:13px;gap:4px}
.palette label{border:1px solid #37373c;justify-content:center;flex:1;min-height:34px;min-width:0;border-radius:5px;font-size:11px;gap:6px;cursor:pointer}
.palette input{width:21px;height:23px;flex:none}
#stage{position:relative;width:min(92cqw,93cqh);aspect-ratio:1;isolation:isolate}
#surface,#output,#overlay{position:absolute;inset:0;width:100%;height:100%;display:block}
#surface{background:#101012}
#overlay{touch-action:none;user-select:none;outline:none;overflow:hidden}
#overlay *{pointer-events:none}
#selection rect,#line{fill:none;stroke:var(--hi);vector-effect:non-scaling-stroke;stroke-width:1.25}
#line{stroke-dasharray:4 3}
#selection rect.handle{fill:var(--hi);stroke:#101012}
#hint,#empty{pointer-events:none;position:absolute;font-size:11px;text-align:center;color:#ccc}
#hint{bottom:5px;background:#24242a;padding:6px 12px;border:1px solid #39393d;border-radius:6px}
#empty{background:#101012d6;padding:8px;border-radius:5px}
body.full #overlay,body.full #hint{display:none}
body.full #stage{width:min(99cqw,99cqh)}
body.dropping #viewport:after{content:"Drop SVG here";position:absolute;inset:8px;background:#191b18ed;display:grid;place-items:center;color:var(--hi);border:1px dashed var(--hi);font-size:15px}
@media(max-height:810px) and (min-width:861px){
 #shapes button{aspect-ratio:auto;height:clamp(46px,8.8vh,78px)}
 #shapes svg{width:48px;height:75%}
}
@media(max-width:860px){
 #shapes{grid-template-columns:repeat(5,1fr)}
 #shapes button{aspect-ratio:1.2}
 #stage{width:min(92cqw,94cqh)}
 #hint{font-size:10px;bottom:3px}
 .palette label{flex:none;padding-inline:14px}
 #background{gap:14px}
}
@media(max-width:380px){
 #shapes{grid-template-columns:repeat(3,1fr)}#shapes button{aspect-ratio:1.55}
}
