:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#cdd6e0;background:#0e1117;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;overflow-x:hidden}button,input,select{font:inherit}button{border:1px solid #2a2e3a;background:#161a22;color:#cdd6e0;border-radius:7px;min-height:36px;padding:0 13px;cursor:pointer;transition:all .15s}button:disabled{cursor:not-allowed;opacity:.4}button:hover:not(:disabled){border-color:#00d4aa;background:#1a1f2b}.app{height:100vh;display:grid;grid-template-rows:auto auto 1fr auto;overflow:hidden}.topbar{position:relative;display:flex;gap:14px;align-items:center;padding:12px 18px;background:#11151c;border-bottom:1px solid #1e2330;flex-wrap:wrap}.brand{display:flex;flex-direction:column;align-items:flex-start;flex-shrink:0;width:195px;margin-right:0}.brand h1{margin:0;font-size:21px;line-height:1.1;white-space:nowrap;color:#e8ecf2;font-weight:800}.brand span{margin-top:4px;color:#7a8394;font-size:10.5px;line-height:1.25}.languageToggle{display:flex;align-items:center;gap:4px;flex-shrink:0}.languageToggle button{min-height:26px;padding:0 7px;border-radius:6px;font-size:11px;font-weight:700}.mobileHeaderActions,.mobileDrawerHeader,.drawerBackdrop{display:none}.iconButton{width:40px;min-width:40px;padding:0;font-size:20px;line-height:1}.statusbar,.footer,.editorHeader span,.name{color:#7a8394;font-size:12px}.toolbar{display:flex;flex-direction:column;gap:8px;flex:1;min-width:0}.toolbarRow{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}.toolbarTopRow{width:100%;flex-wrap:nowrap;justify-content:center;gap:18px;padding-right:138px}.toolbarSizeRow{gap:12px;justify-content:center}.toolbarPush{flex:1 1 auto}.topActionGroup,.exportGroup{display:flex;align-items:center;gap:8px}.donateTop{position:absolute;right:18px;margin-left:auto}.toolbarLeft{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 auto;flex-wrap:nowrap}.presetGroup{flex-wrap:nowrap}.toolbarRight{display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0;flex:0 1 auto;flex-wrap:nowrap}.toolbarSizeRow button,.toolbarTopRow button,.toolbarSizeRow .donateLink,.toolbarTopRow .donateLink,.toolbarSizeRow input,.toolbarTopRow input,.toolbarSizeRow .sizeInput span,.toolbarTopRow .sizeInput span{min-height:32px;font-size:13px}.primary{color:#0e1117;border-color:#00d4aa;background:#00d4aa;font-weight:700}.primary:hover:not(:disabled){background:#00bf9a;border-color:#00bf9a}.export{color:#0e1117;border-color:#00d4aa;background:#00d4aa;font-weight:700}.export:hover:not(:disabled){background:#00bf9a;border-color:#00bf9a}.hidden{display:none}.active{border-color:#00d4aa!important;color:#00d4aa!important;background:#00d4aa1a!important}.presetGroup{display:flex;gap:6px;flex-wrap:wrap}.sizeInput{display:flex;align-items:center;gap:0;overflow:hidden;border:1px solid #2a2e3a;border-radius:7px;background:#161a22}.sizeInput input{width:76px;border:0;border-radius:0;background:transparent;color:#cdd6e0;text-align:center}.sizeInput span{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 8px;border-left:1px solid #2a2e3a;border-right:1px solid #2a2e3a;color:#7a8394}.sizeInput button{border:0;border-left:1px solid #2a2e3a;border-radius:0;background:transparent}.sizeInput:focus-within{border-color:#00d4aa}input,select{min-height:36px;border:1px solid #2a2e3a;background:#161a22;color:#cdd6e0;border-radius:7px;padding:0 10px}.statusbar,.footer{display:flex;align-items:center;gap:18px;padding:8px 18px;background:#11151c;border-bottom:1px solid #1e2330}.footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);border-top:1px solid #1e2330;border-bottom:0}.footerStatus{display:flex;align-items:center;justify-content:flex-start;min-width:0}.footerExportState{justify-self:center;white-space:nowrap}.footerTools{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.donateLink{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border:1px solid rgba(255,107,157,.65);border-radius:7px;background:#ff6b9d1f;color:#ffd5e4;font-size:14px;font-weight:700;text-decoration:none;transition:border-color .15s,background .15s,color .15s}.donateLink:hover{border-color:#ff6b9d;background:#ff6b9d33;color:#fff}.helpButton{min-height:30px;padding:0 12px;font-size:12px}.helpOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:grid;place-items:center;padding:18px;background:#0000008c}.helpDialog{width:min(520px,100%);max-height:min(680px,92vh);overflow-y:auto;border:1px solid #2a2e3a;border-radius:8px;background:#11151c;box-shadow:0 24px 70px #00000073;padding:18px}.helpHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid #1e2330}.helpHeader h2{margin:0;color:#e8ecf2;font-size:18px}.helpDialog ol{margin:16px 0 0;padding-left:22px;color:#cdd6e0;line-height:1.55}.helpDialog li+li{margin-top:8px}.helpDialog p{margin:16px 0 0;color:#7a8394;font-size:13px;line-height:1.45}.detector.ready{color:#00d4aa}.detector.fallback{color:#f0a030}.workspace{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,330px);overflow:hidden}.gridPane{min-width:0;padding:16px;overflow-x:hidden;overflow-y:auto;border-right:1px solid #1e2330;background:#0e1117;display:grid;grid-template-rows:auto 1fr;gap:14px}.gridActions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.tabs,.photoActions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.tabs button,.photoActions button{min-height:28px;padding:0 10px;font-size:12px;border-radius:6px}.photoGrid{min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));grid-auto-rows:auto;align-content:start;gap:14px;padding-right:4px}.thumb{position:relative;padding:0 0 100%;height:0;overflow:hidden;background:#161a22;border:1px solid #252a38;border-radius:8px;width:100%;transition:border-color .15s,box-shadow .15s}.thumb:hover{border-color:#3a4055}.thumb.current{border-color:#00d4aa8c;box-shadow:0 0 24px #00d4aa38}.thumb:after{content:"";position:absolute;left:0;right:0;bottom:0;height:46px;z-index:4;pointer-events:none;background:linear-gradient(to top,#0000007f,#0000)}.check{position:absolute;bottom:8px;left:7px;width:18px;height:18px;z-index:6}.check input{min-height:auto;width:18px;height:18px;accent-color:#00d4aa;cursor:pointer}.badge{position:absolute;right:36px;bottom:7px;padding:3px 6px;border-radius:5px;background:#0009;color:#cdd6e0;font-size:11px;z-index:6}.deleteThumb{position:absolute;right:7px;bottom:7px;width:22px;height:22px;min-height:22px;padding:0;border:0;border-radius:5px;background:#00000080;color:#cdd6e0;font-size:14px;line-height:1;z-index:6}.deleteThumb:hover{background:#6b1a1a;color:#ff6b6b}.badge.face{color:#00d4aa}.badge.rotation{left:36px;bottom:7px;right:auto;color:#f0a030}.thumbMedia{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;background:#0a0c12;display:flex;align-items:center;justify-content:center;touch-action:pan-y}.thumbImageWrap{display:flex;align-items:center;justify-content:center;position:relative;line-height:0;width:100%;height:100%}.thumbImageWrap img{max-width:100%;max-height:100%;display:block;-webkit-user-select:none;user-select:none;pointer-events:none}.name{display:block;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.settingsPanel{min-width:0;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:18px;background:#11151c;display:flex;flex-direction:column;gap:14px}.settingsPanel.empty{display:grid;place-items:center;color:#5a6375}.editorHeader{display:flex;justify-content:space-between;gap:12px;align-items:start}.editorFileInfo{min-width:0;flex:1 1 auto}.editorHeader h2{margin:0 0 4px;max-width:100%;overflow:hidden;color:#e8ecf2;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.editorFileInfo span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selectedToggle{flex:0 0 auto;white-space:nowrap}.editorHeader label{display:flex;align-items:center;gap:7px;font-size:13px;color:#7a8394}.editorHeader label input{accent-color:#00d4aa}.cropFrame{position:absolute;z-index:4;border:2px solid rgba(255,255,255,.9);cursor:move;box-shadow:0 0 0 1px #0000004d,0 0 0 9999px #0000008c;touch-action:none}.handle{position:absolute;width:14px;height:14px;background:#fff;border-radius:3px;box-shadow:0 1px 4px #0006;touch-action:none}.nw{left:-7px;top:-7px;cursor:nwse-resize}.ne{right:-7px;top:-7px;cursor:nesw-resize}.sw{left:-7px;bottom:-7px;cursor:nesw-resize}.se{right:-7px;bottom:-7px;cursor:nwse-resize}.rule{position:absolute;background:#ffffff40;pointer-events:none}.v1,.v2{top:0;bottom:0;width:1px}.v1{left:33.333%}.v2{left:66.666%}.h1,.h2{left:0;right:0;height:1px}.h1{top:33.333%}.h2{top:66.666%}.controls,.adjustSettings,.exportSettings{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.adjustSettings{padding-top:12px;border-top:1px solid #1e2330;flex-direction:column;align-items:stretch;gap:10px}.panelTitle{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#cdd6e0;font-size:14px}.panelTitle button{min-height:30px;padding:0 10px;font-size:12px}.adjustSlider{display:flex;flex-direction:column;gap:6px;color:#7a8394;font-size:13px}.adjustSlider span{display:flex;align-items:center;justify-content:space-between;gap:12px}.adjustValue{display:inline-flex!important;align-items:center;justify-content:flex-end!important;gap:7px!important}.adjustSlider b{color:#00d4aa;font-weight:700}.resetParam{width:24px;height:24px;min-height:24px;padding:0;border-radius:6px;color:#7a8394;line-height:1}.resetParam:hover:not(:disabled){color:#00d4aa}.adjustSlider input{width:100%;accent-color:#00d4aa;padding:0;border:0;border-radius:0;min-height:auto}.exportSettings label{display:flex;align-items:flex-start;flex-direction:column;gap:8px;color:#7a8394;font-size:13px}.exportSettings{padding-top:12px;border-top:1px solid #1e2330;flex-direction:column;align-items:stretch}.exportSettings input,.exportSettings select{width:100%}.exportSettings input[type=range]{accent-color:#00d4aa;padding:0;border:0;border-radius:0;min-height:auto}.done{color:#00d4aa;font-weight:700}.error{color:#ff6b6b;font-weight:700}.dragging{cursor:grabbing}progress{width:180px;accent-color:#00d4aa}@media(max-width:980px){.app{height:100vh;min-height:100vh;overflow:hidden;grid-template-rows:auto auto 1fr auto}.workspace{grid-template-columns:1fr;min-height:0}.gridPane{border-right:0;padding:12px}.settingsPanel{position:fixed;top:0;right:0;bottom:0;z-index:30;width:min(92vw,390px);border-left:1px solid #1e2330;box-shadow:-18px 0 40px #00000059;transform:translate(105%);transition:transform .2s ease}.topbar{position:relative;z-index:20;align-items:center;flex-direction:row;gap:10px;padding:10px 12px;flex-wrap:nowrap}.brand h1{font-size:20px}.mobileHeaderActions{display:flex;gap:8px;margin-left:auto}.mobileDrawerHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #1e2330;color:#e8ecf2}.drawerBackdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:25;min-height:0;padding:0;border:0;border-radius:0;background:#0000007a;cursor:default}.toolbar{position:fixed;top:0;left:0;bottom:0;z-index:30;width:min(88vw,360px);padding:14px;overflow-x:hidden;overflow-y:auto;background:#11151c;border-right:1px solid #1e2330;box-shadow:18px 0 40px #00000059;transform:translate(-105%);transition:transform .2s ease}.toolbar.open,.settingsPanel.open{transform:translate(0)}.toolbarRow,.toolbarLeft,.toolbarRight,.presetGroup{align-items:stretch;flex-direction:column;width:100%}.toolbarTopRow{position:static;min-height:0;flex-wrap:wrap;padding-right:0}.topActionGroup{align-items:stretch;flex-direction:column;width:100%}.toolbarRight{margin-left:0}.toolbar button,.toolbar input,.sizeInput{width:100%}.sizeInput input,.sizeInput button{width:0;flex:1 1 0}.toolbarGap,.toolbarPush{display:none}.exportGroup{position:static;align-items:stretch;flex-direction:column;width:100%;margin-left:0}.donateTop{position:static;right:auto;margin-left:0}.statusbar{gap:10px;padding:8px 12px;overflow-x:auto;white-space:nowrap}.footer{grid-template-columns:1fr;align-items:stretch;gap:10px}.footerStatus,.footerExportState,.footerTools{justify-content:flex-start;justify-self:start}.helpButton,.donateLink{flex:0 0 auto}.photoGrid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding-right:0}.settingsPanel.empty{display:flex}}
