*{box-sizing: border-box; margin: 0; padding: 0}body{font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #1e1e24; color: #e0e0e6; overflow: hidden; height: 100vh; display: flex; flex-direction: column}::-webkit-scrollbar{width: 12px !important; height: 12px !important}::-webkit-scrollbar-track{background: #393e46 !important; border-radius: 6px !important}::-webkit-scrollbar-thumb{background-color: #636363 !important; border-radius: 6px !important; border: 3px solid #2d3542 !important}::-webkit-scrollbar-thumb:hover{background-color: #636363 !important}@supports not selector(::-webkit-scrollbar){html, body, *{scrollbar-width: thin !important; scrollbar-color: #0300ad #393e46 !important}} .hidden{ display: none !important}hr{ padding: 0; margin: 4px; border: 0px solid rgb(61, 61, 61)}label{display: block; font-size: 12px; color: #aaa}input[type="number"], select{background: #1e1e24; border: 1px solid var(--bg-line); color: #fff; padding: 6px; border-radius: 4px; margin-top: 4px}:root{--select-color: #007acc; --bg-color: #2a2a32; --bg-line: #3a3a45}.main-header{height: 50px; background: var(--bg-color); display: flex; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--bg-line)}.project-info{display: flex; align-items: center; gap: 10px}.project-info label{margin: 0; white-space: nowrap; color: #aaa}.project-info input{background: #1e1e24; border: 1px solid var(--bg-line); color: #fff; padding: 5px 10px; border-radius: 4px; height: 30px; margin: 0}.project-info button{background: #3e3e4a; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; height: 30px; font-size: 13px; white-space: nowrap}.project-info button:hover{background: #4e4e5a}.header-actions{display: flex; align-items: center; gap: 8px}.header-actions button{background: #3e3e4a; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; height: 30px; font-size: 13px; white-space: nowrap}.header-actions button:hover{background: #4e4e5a}.center-area{flex: 1; display: flex; flex-direction: column; background: #141416; position: relative}#canvas-container{flex: 1; position: relative; overflow: hidden}#viewport{position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block}.tool-group{display: flex; gap: 5px; justify-content: space-between; align-items: stretch; flex-wrap: nowrap; flex-direction: row; margin-bottom: 4px}.btn-action{cursor: pointer}.btn_t{ background-color: transparent; padding: 0; width: 100%; height: 40px; border: none; cursor: pointer; background-repeat: no-repeat; background-position: 16%; background-size: 16% auto; color: white}.btn_t:hover{ background-color: rgba(144, 144, 144, 0.466)}#tool-select{ background-image: url('/img/d_move.png')}.btn_c:hover{ background-color: rgba(144, 144, 144, 0.466)}.btn_e:hover{ filter: drop-shadow(1px 1px 2px rgba(255, 255, 255, 1))}.btn_t.active, .btn_c.active{background-color: var(--select-color); border-color: #0098ff}.btn_c, .btn_e{ background-image: url('/img/mega-sprite.png'); filter: blur(0.3px); background-size: 400px auto; background-color: transparent; padding: 0; width: 40px; height: 40px; border: none; cursor: pointer; background-repeat: no-repeat}#tool-line{ background-position: -40px 0} #tool-rect{ background-position: -160px 0} #tool-ark{ background-position: -80px 0} #tool-circle{ background-position: -120px 0} #tool-ngon{ background-position: -200px 0} #tool-cut{ background-position: -320px -80px} #tool-intersect{ background-position: -360px -80px} #tool-merge{ background-position: 0px -120px} #tool-mirror-x{ background-position: -240px 0px} #tool-mirror-y{ background-position: -280px 0px} #tool-explode{ background-position: 0px -80px} #tool-glue{ background-position: -40px -80px} #tool-group{ background-position: -80px -80px} #tool-center{ background-position: -320px 0px} #tool-raster{ background-position: -360px 00px} li{ margin-left: 20px}.btn-action.green{background: #00b740}.btn-action.green:hover{background: #04de66}.btn-action.blue{background: #2563eb}.btn-action.blue:hover{background: #1d6ffd}.project-info input{background: #1e1e24; border: 1px solid var(--bg-line); color: #fff; padding: 5px 10px; border-radius: 4px; margin-left: 10px}.header-actions button{background: #3e3e4a; color: #fff; border: none; padding: 6px 12px; margin-left: 8px; border-radius: 4px; cursor: pointer}.header-actions button:hover{background: #4e4e5a}.main-layout{display: flex; flex: 1; overflow: hidden}.sidebar-left{width: 280px; height: 100%; background: var(--bg-color); display: flex; flex-direction: column; gap: 15px; padding: 15px; border-right: 1px solid var(--bg-line); overflow-y: auto}.sidebar-right{width: 280px; background: var(--bg-color); display: flex; flex-direction: column; gap: 15px; padding: 15px; border-right: 1px solid var(--bg-line); overflow-y: auto; border-right: none; border-left: 1px solid var(--bg-line)}.block{border-radius: 6px}.block h4{margin-bottom: 10px; font-size: 13px; text-transform: uppercase; color: #aaa; letter-spacing: 0.5px}.btn{background: #3e3e4a; border: 1px solid #4e4e5a; color: #ccc; padding: 8px 4px; font-size: 11px; border-radius: 4px; cursor: pointer; text-align: center}.btn:hover{background: #4e4e5a; color: #fff}.btn-sm{width: 100%; padding: 6px; background: #2d3748; color: #a0aec0; border: 1px dashed #4a5568; border-radius: 4px; cursor: pointer; margin-top: 8px}.btn-sm:hover{color: #fff; border-color: #718096}.checkbox-label{display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer}.gcode-area{height: 160px; background: #1a1a1e; border-top: 1px solid var(--bg-line); padding: 10px; display: flex; flex-direction: column}.gcode-area textarea{flex: 1; background: #101012; border: 1px solid var(--bg-color); color: #00ff66; font-family: monospace; font-size: 12px; padding: 8px; resize: none; margin-top: 5px}.context-menu{display: none; position: absolute; background: var(--bg-color); border: 1px solid #4e4e5a; border-radius: 4px; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.5); min-width: 160px; padding: 4px 0}.menu-item{padding: 8px 12px; font-size: 13px; color: #e0e0e6; cursor: pointer; position: relative}.menu-item:hover{background: var(--select-color); color: #fff}.submenu-trigger:hover .submenu{display: block}.submenu{display: none; position: absolute; left: 100%; top: 0; background: var(--bg-color); border: 1px solid #4e4e5a; border-radius: 4px; min-width: 140px; box-shadow: 0 4px 12px rgba(0,0,0,0.5)}#machine-width{ width: 70px; color: crimson}#machine-height{ width: 70px; color: #00ff66}.header-grid{display: flex; width: 300px; align-items: center; gap: 10px}#grid-step{ width: 70px}.ml-15{margin-left: 15px !important}#prop-ark-container, #prop-radius-container, #prop-area-container{display: none}line, path{ vector-effect: non-scaling-stroke}#svg-layer{pointer-events: auto}#viewport{position:relative;width:100%;height:100%;background-color:#141416;overflow:hidden;font-family:monospace;user-select:none} #viewport-scene{position:absolute;top:0;left:0;transform-origin:0 0;will-change:transform} #machine-grid{position:absolute;top:0;left:0; background-image:linear-gradient(to right,#2d2d37 1px,transparent 1px),linear-gradient(to bottom,#2d2d37 1px,transparent 1px); background-size:var(--grid-step,10px) var(--grid-step,10px); z-index: 0}.machine-axis{position:absolute;background-color:currentColor} #axis-x{top:0;left:0;width:100%;height:2px;color:#00ff00} #axis-y{top:0;left:0;width:2px;height:100%;color:#ff0000} #svg-layer{position:absolute;top:0;left:0;overflow:visible} #selection-box{position:absolute;border:1px solid rgba(0,122,204,0.8);background-color:rgba(0,122,204,0.15);pointer-events:none} #selection-box.hidden{display:none} .scale-bar{position:absolute;background:var(--bg-color);z-index:10;overflow:hidden} #scale-top{top:0;left:25px;right:0;height:25px;border-bottom:1px solid #4e4e5a} #scale-left{top:25px;left:0;bottom:0;width:25px;border-right:1px solid #4e4e5a} #scale-corner{position:absolute;top:0;left:0;width:25px;height:25px;background:#222227;z-index:11} .scale-tick{position:absolute;background-color:#4e4e5a} #scale-top .scale-tick{top:0;width:1px;height:15px} #scale-left .scale-tick{left:0;height:1px;width:15px} .tick-label{position:absolute;color:#aaa;font-size:10px;font-family:monospace;white-space:nowrap} #scale-top .tick-label{left:2px;top:2px} #scale-left .tick-label{left:2px;top:-5px} #bg-layer{position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; display: none; background-repeat: no-repeat; background-position: top left; background-size: cover; transform: translate(0, 0) rotate(0deg) scale(1); will-change: transform}.control-group{ display: flex; gap: 5px; flex-direction: row; flex-wrap: nowrap; align-items: stretch; justify-content: space-evenly}.control-group.row{ flex-direction: row; flex-wrap: nowrap; justify-content: space-around; align-items: center}.control-group.row label{ width: 40%; text-align: right; padding: 0 5px}.control-group.row input{ width: 60%}#tool-text-input{ color: white; padding: 0 4px; background: #1e1e24; border: 1px solid var(--bg-line); width: 100%}#tool-text{ width: 30px}#btn-import-bg{ width: 70%}#btn-delete-bg{ width: 30%}#databases ul{ list-style-type: circle}#databases ul li::marker{color: rgb(77, 92, 255); font-size: 1.5em}#databases ul li a{ color: rgb(209, 210, 210); text-decoration: none}#databases ul li a:hover{ text-decoration: underline}.sidebar-right input[type="number"], .sidebar-right select{ width: 100%}.layer-item{display: flex; align-items: center; justify-content: space-between; background: #2d2d37; padding: 6px 8px; border-radius: 4px; margin-bottom: 6px; font-size: 12px; border-left: 0; cursor: pointer}.layer-item.selected{background: var(--select-color); border-left: 1px solid #c5c5c5; border-right: 1px solid #c5c5c5}.layer-item.selected input.text{ text-align: center; width: 100%; border: 1px solid var(--select-color); padding: 2px; font-size: inherit; font-family: inherit; display: inline-block; outline: none}.layer-controls{display: flex; align-items: center; gap: 5px}.layer-item .layer_num{ width: 20px; text-align: center; color: white; padding: 0 3px; text-shadow: 1px 1px black; margin-left: -26px; pointer-events: none; user-select: none}.layer-item .text{ padding: 0 6px}.layer-color{-webkit-appearance: none; appearance: none; width: 20px; height: 20px; border: none; cursor: pointer; padding: 0; margin: 0; background: none}.layer-color::-webkit-color-swatch-wrapper{padding: 0; margin: 0}.layer-color::-webkit-color-swatch{border: none !important; padding: 0; border-radius: 4px}.layer-color::-moz-color-swatch{border: none !important; padding: 0; border-radius: 4px}.layer-vis{background-image: url('/img/mega-sprite.png'); background-color: transparent; background-repeat:no-repeat; background-position: -371px -52px; width: 20px; height: 20px; font-size: 16px; cursor: pointer; opacity: 0.4}.layer-vis.active{background-position: -331px -48px; opacity: 1}.layer-del{margin-left: 4px}.layer-del:hover{cursor: pointer; color: #ef4444} .item-list-item{margin: 2px 0; color: #838383; position: relative; display: flex; justify-content: space-between; padding: 4px 6px 4px 6px; font-family: monospace; font-size: 11px; border-radius: 3px; outline: none}.item-list-item:hover{background-color: #5e5e5e; color: #ababab; cursor: pointer}.item-list-item.selected-item{background-color: var(--select-color); color: rgb(255, 255, 255); border-left: 1px solid #858585; border-right: 1px solid #858585; font-weight: bold}#items-tabs{display: flex; gap: 2px; margin-bottom: 8px; border-bottom: 1px solid #474747}#items-tabs .tab-btn{flex: 1; font-size: 10px; cursor: pointer; border: none; color: white; border-radius: 3px 3px 0 0; background-color: transparent; padding: 0; height: 33px; background-image: url('/img/mega-sprite.png'); background-size: 400px auto; background-repeat: no-repeat}#items-tabs .tab-btn.all{ background-image: none} #items-tabs .tab-btn.line{ background-position: -45px -44px} #items-tabs .tab-btn.circle{ background-position: -126px -44px} #items-tabs .tab-btn.object{ background-position: -246px -44px} #items-tabs .tab-btn.rect{ background-position: -166px -44px} #items-tabs .tab-btn.ngon{ background-position: -206px -44px} #items-tabs .tab-btn.ark{ background-position: -87px -44px} #items-tabs .tab-btn.group{ background-position: -286px -44px} #items-tabs .tab-btn.active{background-color: var(--select-color)} .shape-id-text{ flex: 0 0 40px}.class-badges-container{ font-size: 9px; font-weight: bold}.fig-badge{padding: 1px 4px; border-radius: 3px; color: white; pointer-events: none}.badge-a{background: #28a745}.badge-b{background: #ff8c00}.item-list-item .layer-num{ color: white; padding: 0 3px; text-shadow: 1px 1px black; border-radius: 3px}.item-list-item .layer-lock{ filter: grayscale(1) brightness(0.5)}.item-list-item .layer-lock.locked{ filter: none}#items-list{ min-height: 300px; max-height: 500px; overflow-y: auto}.item-list-item{display: flex; align-items: center; justify-content: flex-start; width: 100%}.item-list-item .layer-controls{flex: 0 0 auto}.item-list-item .shape-id-text{flex: 1 1 auto; text-align: left; padding: 0 10px}.item-list-item.disabled-item{opacity: 0.5}.item-list-item .layer-lock{cursor: pointer; display: inline-block; transition: filter 0.2s ease, opacity 0.2s ease; filter: grayscale(100%); opacity: 0.2}.item-list-item .layer-lock:hover{opacity: 0.8}.item-list-item .layer-lock.is-locked{filter: grayscale(0%) hue-rotate(315deg) saturate(250%); opacity: 1}.raster-modal-content{position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg-color); color: black; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); min-width: 250px; z-index: 201}.raster-modal-content h3{text-align: center; margin-top: 0; color: rgb(255, 255, 255)}.raster-figure-id{font-size: 12px; color: rgb(255, 255, 255)}.raster-modal-content .input-short{width: 60px}.raster-modal-content .input-medium{width: 160px}.raster-modal-actions{margin-top: 15px; border-top: 1px solid #eee; padding-top: 10px; display: flex; flex-direction: row; flex-wrap: nowrap; align-content: space-around; justify-content: space-evenly; align-items: stretch; gap:10px}.raster-modal-actions.checks label{ display: flex; flex-direction: row; flex-wrap: wrap; align-content: center; justify-content: space-evenly; align-items: center; gap: 3px}.raster-modal-actions button{border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; color: white}.raster-modal-actions .btn-save{background: var(--select-color)}.raster-modal-actions .btn-delete{background: #ff4444}.raster-modal-actions .btn-cancel{background: #555555}.raster-modal-actions .raster[type="radio"], .raster-modal-actions .raster[type="checkbox"]{ appearance: none; width: 40px; height: 40px; color: none; border: none; padding: 0; margin: 0; background-color: transparent; padding: 0; width: 40px; height: 40px; border: none; cursor: pointer; background-repeat: no-repeat; background-position: center; background-size: 90% auto}.raster-modal-actions .raster[type="radio"]:checked, #raster-negative:checked{background-color: var(--select-color)}#raster-negative{ background-image: url('/img/d_raster_negative.png')}.raster-modal-actions .raster[value="Y"]{ background-image: url('/img/d_raster_y.png')}.raster-modal-actions .raster[value="XY"]{ background-image: url('/img/d_raster_xy.png')}.raster-modal-actions .raster[value="YX"]{ background-image: url('/img/d_raster_yx.png')}.raster-modal-actions .raster[value="X"]{ background-image: url('/img/d_raster_x.png')}#raster-negative:checked ~ input[name="dir"]{display: none}#raster-negative:checked ~ #raster-settings, .raster-modal-actions:has(#raster-negative:checked) ~ #raster-settings{display: none}#vectorize-modal{display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 9999; justify-content: center; align-items: center}#vectorize-modal.active{display: flex}#v-offset, #v-smooth{ width: 200px; accent-color:var(--select-color); cursor:pointer}.v-modal-content{background: #1e1e1e; color: #e0e0e0; padding: 20px; border: 1px solid #333; border-radius: 6px; font-family: sans-serif; display: flex; flex-direction: column; gap: 14px; min-width: 280px; box-shadow: 0 8px 24px rgba(0,0,0,0.5)}.v-modal-title{font-size: 16px; font-weight: bold; border-bottom: 1px solid #333; padding-bottom: 8px}.v-modal-row{display: flex; justify-content: space-between; align-items: center; gap: 10px}.v-modal-row .title{ width:160px}.v-modal-row .block{ display:flex; align-items:center; gap:8px}.v-modal-radios{display: flex; gap: 15px}.v-modal-input{background: #2d2d2d; color: #fff; border: 1px solid #444; border-radius: 4px; padding: 4px 8px; width: 80px; outline: none}.v-modal-input:focus{border-color: var(--select-color)}.v-modal-actions{display: flex; gap: 10px; justify-content: center; margin-top: 5px}.v-modal-btn{padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold}.v-modal-btn.cancel{background: #3a3a3a; color: #fff}.v-modal-btn.confirm{background: var(--select-color); color: #fff}#v-offset-val, #v-smooth-val{ min-width:20px; text-align:right}.v-modal-content{background: #1e1e1e; color: #e0e0e0; padding: 20px; border: 1px solid #333; border-radius: 6px; font-family: sans-serif; display: flex; flex-direction: column; gap: 14px; width: 450px; box-shadow: 0 8px 24px rgba(0,0,0,0.5)}.v-modal-preview-box{width: 100%; height: 350px; background: #111; border: 1px solid #333; border-radius: 4px; display: flex; justify-content: center; align-items: center; overflow: hidden; margin-bottom: 5px}#v-preview-canvas{width: 100%; height: 100%; object-fit: contain}#test-cut-modal, #test-raster-modal{display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 9999; justify-content: center; align-items: center}#test-cut-modal.active, #test-raster-modal.active{display: flex}#c-modal-content, #r-modal-content{width: 450px; background: #1e1e1e; color: #e0e0e0; padding: 20px; border: 1px solid #333; border-radius: 6px; font-family: sans-serif; display: flex; flex-direction: row; min-width: 280px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); flex-wrap: wrap; gap: 20px; justify-content: space-evenly; align-items: center}#c-modal-content span, #r-modal-content span{ width: 290px}#c-modal-content .row, #r-modal-content .row{display: flex; flex-direction: row; gap: 14px; min-width: 280px; flex-wrap: wrap; justify-content: space-evenly; align-items: center; align-content: center; gap: 20px}#c-modal-content button, #r-modal-content button{ border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; color: white}#c-modal-content .btn-ok, #r-modal-content .btn-ok{background: var(--select-color)}#c-modal-content .btn-cancel, #r-modal-content .btn-cancel{background: #555555}#c-modal-content input, #r-modal-content input{ width: 70px}