@font-face{font-family:Roboto;src:url('/assets/Roboto.ttf')}@font-face{font-family:Roboto;src:url('/assets/Roboto-Medium.ttf');font-weight:500}@font-face{font-family:Bebas;src:url('/assets/Bebas.ttf')}
:root{font-family:Roboto,Arial,sans-serif;color:#272727;background:#ebebeb;font-synthesis:none;--gray:#8f9498;--red:#ed1c29;--line:#dedede}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.32}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8f9498;outline-offset:3px}button{border:0;color:inherit}a{color:inherit}h1,h2,h3,p{margin:0}h1,h2{font-family:Bebas,Arial,sans-serif;font-weight:400}h1{font-size:42px;line-height:1.05}h2{font-size:32px}h3{font-size:17px;font-weight:500}.muted{color:#666;line-height:1.55;font-size:14px}.small{font-size:12px;color:#666}svg.icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.shell{max-width:1480px;margin:auto;padding:28px 48px 32px}.header{display:flex;align-items:center;gap:14px;margin-bottom:30px}.logo{width:180px;height:62px;background:var(--gray);border-radius:12px;display:flex;align-items:center;justify-content:center}.logo img{width:146px;height:43px;object-fit:contain}.header .right{margin-left:auto;display:flex;align-items:center;gap:10px}.sync{font-size:12px;color:#666;display:flex;align-items:center;gap:7px;margin-right:12px}.sync:before{content:'';width:6px;height:6px;background:#8f9498;border-radius:50%}.icon-btn{width:46px;height:46px;display:inline-flex;align-items:center;justify-content:center;background:white;border:1px solid transparent;border-radius:12px}.icon-btn:hover,.secondary:hover{background:#f7f7f7}.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:30px}.step{height:52px;border-radius:12px;background:white;text-align:left;padding:0 20px;font-weight:500;display:flex;align-items:center;gap:12px}.step .num{color:#888;font-variant-numeric:tabular-nums}.step.active{background:#272727;color:white}.step.active .num{color:#aaa}.heading{display:flex;align-items:center;gap:14px;justify-content:space-between;margin:0 0 20px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#777;margin-bottom:9px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 304px;gap:32px;align-items:start}.visual-column{min-width:0}.viewport{height:clamp(340px,54vh,650px);position:relative;overflow:hidden;isolation:isolate;border-radius:16px;background:#e1e2e2;display:flex;align-items:center;justify-content:center;touch-action:none}.viewport .photo-layer{position:absolute;transform-origin:50% 50%;will-change:transform;overflow:visible}.photo-layer>img{width:100%;height:100%;display:block;pointer-events:none;border-radius:12px}.photo-layer svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;touch-action:none}.selection-path{fill:#8f94985c;stroke:white;stroke-width:2;vector-effect:non-scaling-stroke}.selection-path.no-stroke{stroke:none;fill:#8f949854}.marker{fill:#272727;stroke:white;stroke-width:2;vector-effect:non-scaling-stroke;cursor:grab}.marker.selected{fill:#ed1c29}.processing .selection-path{animation:breathe 1.6s ease-in-out infinite alternate;stroke:none}.magic{mix-blend-mode:screen;pointer-events:none}.processing .magic{animation:sweep 1.9s linear infinite}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 8px}.toolbar .group{display:flex;gap:7px}.toolbar .spacer{flex:1}.hint{text-align:center;font-size:13px;color:#666;line-height:1.5;margin:12px 0 0}.zoom{position:absolute;right:14px;bottom:14px;display:flex;gap:5px;z-index:4}.zoom button{width:38px;height:38px;border-radius:10px;background:white;box-shadow:0 2px 10px #0000000b}.side{display:flex;flex-direction:column;gap:18px;padding-top:3px}.card{padding:22px;border-radius:16px;background:white}.side .card p{margin-top:8px}.material-summary{display:flex;gap:13px;align-items:center}.material-summary img{width:64px;height:64px;object-fit:cover;border-radius:10px}.button{min-height:52px;display:inline-flex;justify-content:center;align-items:center;gap:9px;padding:13px 20px;border-radius:12px;font-weight:500;background:#272727;color:white;text-decoration:none}.button:hover{background:#3d3d3d}.button.secondary{background:white;color:#272727;border:1px solid #ddd}.button.red{background:var(--red);color:white}.full{width:100%}.side-actions{display:flex;flex-direction:column;gap:10px;margin-top:6px}.text-button{background:none;padding:12px 8px;text-decoration:underline;text-underline-offset:4px;font-size:14px;color:#555}.photo-actions{display:flex;gap:10px;margin-top:14px}.photo-actions>*{flex:1}.dropzone{height:100%;width:100%;border:1.5px dashed #b3b6b8;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#e5e6e6;cursor:pointer;padding:30px;text-align:center}.dropzone .icon{width:48px;height:48px;color:#8f9498;stroke-width:1}.dropzone strong{font-weight:500;font-size:18px}.dropzone.drag-over{background:#d9dcdd;border-color:#555}.mode{background:white;border-radius:12px;padding:13px 20px;min-height:46px;font-weight:500;display:flex;align-items:center;gap:8px}.mode.active{background:#272727;color:white}.delete-wrap{display:flex;align-items:center;background:var(--red);border-radius:12px;isolation:isolate}.delete-wrap>.mode{border-radius:12px;position:relative;z-index:1}.delete-wrap>.delete{width:33px;min-height:46px;background:none;color:white;padding:0;display:grid;place-items:center}.delete svg{width:17px}.toolbar .history-actions{display:flex;gap:7px}.catalog{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.material{background:white;border-radius:16px;overflow:hidden;padding:0;text-align:left;border:2px solid transparent;position:relative}.material.active{border-color:#272727}.material>img{width:100%;height:210px;object-fit:cover;display:block}.material .caption{padding:18px;display:flex;justify-content:space-between;align-items:center}.material .selected-badge{position:absolute;top:13px;right:13px;background:#272727;color:white;width:30px;height:30px;border-radius:9px;display:grid;place-items:center}.catalog-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:32px}.catalog-layout .side{position:sticky;top:24px}.add-material{border:1px dashed #b3b6b8;border-radius:16px;min-height:280px;background:transparent;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px}.add-material .icon{width:30px;height:30px}.cost{text-align:center;font-variant-numeric:tabular-nums;font-size:14px;color:#666;margin-top:12px}.result-options{display:flex;flex-direction:column;gap:12px}.comparison{padding:4px;border-radius:12px;background:#dfe0e1;display:flex;gap:4px}.comparison button{flex:1;min-height:42px;border-radius:9px;background:none}.comparison button.active{background:white}.save-row{display:flex;gap:8px}.save-row .button{flex:1}.save-row .icon-btn{width:52px;height:52px}.expand{position:absolute;right:14px;top:14px;z-index:5}.empty-panel{padding:48px 24px;text-align:center;background:#e2e3e3;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;min-height:320px}.empty-panel svg{width:40px;height:40px;color:#8f9498}.progress{display:flex;flex-direction:column;align-items:center;text-align:center;gap:13px}.progress img{width:78px;height:78px}.timer{font-size:26px;font-variant-numeric:tabular-nums;font-weight:500}.progress p{font-size:14px;line-height:1.5;min-height:45px}.page{max-width:900px;margin:0 auto}.page-header{display:flex;align-items:center;gap:18px;margin-bottom:28px}.page-header h1{flex:1}.menu-list{display:flex;flex-direction:column;gap:10px}.menu-row{width:100%;display:flex;gap:16px;align-items:center;text-align:left;background:white;min-height:76px;border-radius:14px;padding:20px}.menu-row .label{flex:1}.menu-row .small{margin-top:4px}.version{margin:40px auto;text-align:center}.version .logo{margin:auto auto 10px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:flex;flex-direction:column;gap:8px;margin:14px 0;font-size:14px}.field input,.field select{width:100%;border:1px solid #d3d3d3;border-radius:10px;background:#f7f7f7;padding:13px;color:#272727;min-height:46px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.settings .card{margin-bottom:18px}.key-status{font-size:12px;color:#666;margin:10px 0}.library-row,.history-row{display:flex;align-items:center;gap:18px;border-radius:14px;background:white;min-height:94px;padding:12px;margin-bottom:12px;overflow:hidden;position:relative}.history-row .open,.library-row .open{display:flex;align-items:center;gap:18px;flex:1;min-width:0;text-align:left;background:none;padding:0}.history-row img,.library-row img{width:108px;height:72px;object-fit:cover;border-radius:9px}.history-row .caption{flex:1;min-width:0}.history-row .caption h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-row .small{margin-top:7px}.history-row .delete,.library-row .edit{background:#272727;color:white;width:44px;height:44px;border-radius:11px;flex-shrink:0;display:grid;place-items:center}.history-row .delete{background:var(--red)}.inline-confirm{display:flex;align-items:center;gap:8px;animation:confirm-in .18s ease-out;position:absolute;inset:0;background:#272727;color:white;padding:12px 16px;border-radius:14px;justify-content:flex-end}.inline-confirm span{margin-right:auto;font-size:15px}.inline-confirm button{height:44px;border-radius:10px;padding:0 16px;font-weight:500;background:white;color:#272727}.inline-confirm button.danger{background:var(--red);color:white}.modal{position:fixed;inset:0;z-index:30;background:#ebebeb;overflow:auto;padding:28px 40px}.modal .modal-inner{max-width:1100px;margin:auto}.viewer .viewport{height:calc(100dvh - 200px);min-height:260px;background:#dedfe0}.viewer .caption-row{display:flex;justify-content:space-between;align-items:center;margin-top:18px}.viewer .nav{display:flex;gap:8px;align-items:center}.viewer .nav span{font-size:13px;padding:0 12px;color:#666}.material-editor{max-width:580px;margin:auto}.material-editor>img{width:100%;max-height:320px;object-fit:contain;border-radius:12px;background:#ddd}.connect{max-width:480px;margin:10vh auto;display:flex;flex-direction:column;gap:25px}.connect .logo{margin-bottom:15px}.connect h1{font-size:46px}.connect p{line-height:1.6;color:#666}.offline-banner{background:#e0e1e2;border-radius:10px;padding:14px;margin-bottom:18px;font-size:14px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%) translateY(20px);background:#272727;color:white;border-radius:12px;padding:15px 22px;max-width:calc(100% - 32px);z-index:100;opacity:0;pointer-events:none;font-size:14px;transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.hidden{display:none!important}.footer-note{margin-top:26px;font-size:11px;color:#858585;display:flex;justify-content:space-between}.privacy-note{font-size:12px;line-height:1.6;color:#666;margin-top:16px}.error{color:#b21822;font-size:14px;line-height:1.5}.conflict{background:white;border-left:4px solid #ed1c29;padding:18px;margin-bottom:20px;border-radius:12px}.conflict .actions{display:flex;gap:8px;margin-top:12px}input[type=file]{display:none}
@keyframes breathe{from{fill-opacity:.18}to{fill-opacity:.85}}@keyframes sweep{from{transform:translateX(-110%)}to{transform:translateX(210%)}}@keyframes confirm-in{from{clip-path:inset(0 0 0 85% round 14px)}to{clip-path:inset(0 round 14px)}}
@media(min-width:1600px){.shell{padding-top:38px}.header{margin-bottom:34px}.viewport{height:60vh}}
@media(max-width:1100px){.shell{padding:24px}.workspace{grid-template-columns:minmax(0,1fr) 270px;gap:24px}.catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-layout{grid-template-columns:minmax(0,1fr) 250px;gap:24px}.toolbar{flex-wrap:wrap}.mode{padding:12px 15px}.heading h1{font-size:36px}}
@media(max-width:760px){.shell{padding:16px 16px max(20px,env(safe-area-inset-bottom))}.header{margin-bottom:20px}.logo{width:148px;height:52px}.logo img{width:119px;height:35px}.header .right{gap:7px}.sync{display:none}.icon-btn{width:42px;height:42px}.steps{gap:5px;margin-bottom:23px}.step{font-size:12px;padding:0 8px;gap:5px;justify-content:center;height:46px;white-space:nowrap}.heading{margin-bottom:14px}.heading h1{font-size:34px}.workspace,.catalog-layout{grid-template-columns:1fr;gap:22px}.viewport{height:clamp(270px,44dvh,560px);border-radius:12px}.side{gap:13px}.side .card{padding:18px}.side-actions{margin-top:0}.photo-actions{gap:8px}.button{font-size:14px;padding:13px 15px}.toolbar{gap:8px}.mode{font-size:13px;padding:12px 14px;min-height:44px}.toolbar .group{gap:5px}.toolbar .spacer{display:none}.toolbar .history-actions{margin:auto}.toolbar .delete-wrap{margin-left:auto}.hint{font-size:12px;margin-top:8px}.catalog{gap:12px}.material>img{height:160px}.material .caption{padding:13px;font-size:14px}.material h3{font-size:14px}.add-material{min-height:218px}.catalog-layout .side{position:static}.settings-grid{grid-template-columns:1fr}.page-header h1{font-size:32px}.modal{padding:18px 16px}.viewer .viewport{height:calc(100dvh - 230px)}.history-row{gap:10px;padding:10px}.history-row img,.library-row img{width:80px;height:60px}.history-row .open,.library-row .open{gap:12px}.inline-confirm{padding:10px}.inline-confirm span{font-size:13px}.inline-confirm button{padding:0 12px;font-size:13px}.page .card{padding:18px}.footer-note{margin-top:24px}.photo-layer>img{border-radius:9px}.progress{padding:12px 0}.progress img{width:64px;height:64px}.timer{font-size:24px}.viewer .caption-row{gap:12px}.viewer h3{font-size:15px}.sync-mobile{display:block}.connect{margin:7vh auto;padding:0 24px}.material-editor>img{max-height:250px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.magic{display:none}}

.zoom button[data-zoom-label]{width:64px;min-width:64px;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums;padding:0 5px}.magic{display:none}.processing .magic{display:block}
/* Desktop is a compact, bounded editing workspace; mobile retains the app flow. */
@media(min-width:761px){
 .shell{max-width:1360px;position:relative;padding:30px 40px 36px}.header{height:52px;margin-bottom:32px}.header .logo{width:155px;height:52px}.header .logo img{width:125px;height:37px}.header .right{gap:8px}.header .icon-btn{width:44px;height:44px}
 .steps{position:absolute;top:34px;left:50%;transform:translateX(-50%);width:600px;gap:5px;margin:0}.step{height:44px;justify-content:center;padding:0 13px;font-size:13px;gap:7px;background:#f6f6f6}.step.active{background:#272727}.step .num{color:#777}
 .heading{min-height:42px;margin-bottom:18px}.heading h1{font-size:36px}.heading .icon-btn{width:40px;height:40px}
 .workspace{grid-template-columns:minmax(0,1fr) 290px;gap:28px}.viewport{height:clamp(350px,65vh,690px)}.side{padding:0;gap:16px}.side>.card{padding:20px}.side .button{font-size:14px;min-height:48px}.side .icon-btn{height:48px;width:48px}.side .comparison button{min-height:40px}.toolbar{margin-top:12px}.mode{font-size:13px;min-height:42px;padding:11px 16px}.toolbar .icon-btn{width:42px;height:42px}.delete-wrap>.delete{min-height:42px}.hint{font-size:12px}.catalog-layout{grid-template-columns:minmax(0,1fr) 290px;gap:28px}.catalog{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.material>img{height:190px}.material .caption{padding:16px}.material h3{font-size:15px}.add-material{min-height:252px}.page{max-width:960px}.page-header h1{font-size:36px}.settings-grid{grid-template-columns:1fr 1fr}.viewer .viewport{height:calc(100dvh - 185px)}
}
@media(min-width:761px) and (max-width:1100px){.shell{padding:24px}.header{margin-bottom:26px}.steps{top:28px;width:490px}.step{padding:0 8px;font-size:12px}.header .logo{width:135px}.header .logo img{width:110px}.workspace,.catalog-layout{grid-template-columns:minmax(0,1fr) 250px;gap:22px}.catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.viewport{height:clamp(330px,61vh,620px)}}
@media(max-width:760px){
 .shell{max-width:480px;padding:14px 20px 20px}.header{height:52px;margin-bottom:18px}.header .logo{width:150px;height:52px}.header .right{gap:10px}.header .icon-btn{width:44px;height:44px}.steps{margin:0 -3px 17px;gap:6px}.step{height:46px;font-size:12px;background:white;border-radius:12px;padding:0 7px;gap:4px}.heading{min-height:44px;margin:0 2px 5px}.heading h1{font-size:30px;line-height:1.12}.heading .icon-btn{height:40px;width:40px}.viewport{height:clamp(270px,44dvh,470px);margin:0 -4px;border-radius:12px}.workspace{gap:12px}.workspace[data-editor-step="0"] .side>.card,.workspace[data-editor-step="1"] .side>.card{display:none}.photo-actions{margin:12px 0 0;gap:10px}.photo-actions .button{min-height:52px}.side-actions{gap:6px;margin-top:4px}.side .button{min-height:54px;font-size:15px}.text-button{padding:12px 6px}.mode{padding:12px 15px}.toolbar .history-actions{order:3;flex-basis:100%;justify-content:center;margin-top:2px}.toolbar .delete-wrap{margin-left:auto}.toolbar{margin-top:12px;row-gap:8px}.hint{margin-top:10px}.side{gap:14px}.side .card{padding:16px}.side .material-summary{background:transparent;padding:4px 0}.side .material-summary img{width:56px;height:56px}.result-options{gap:12px}.catalog-layout{gap:20px}.catalog{gap:12px}.material>img{height:142px}.material .caption{padding:12px}.material h3{font-size:14px}.add-material{min-height:204px}.page-header{gap:12px;margin-bottom:22px}.page-header h1{font-size:30px}.menu-row{min-height:70px;padding:16px}.settings-grid{gap:0}.viewer .viewport{height:calc(100dvh - 215px);margin:0}.viewer .caption-row{flex-wrap:wrap}.viewer .caption-row h3{flex:1}.viewer .comparison{width:100%;order:3}.zoom{right:9px;bottom:9px}.zoom button[data-zoom-label]{width:62px;min-width:62px}.zoom button{height:38px}.connect{padding:0 20px}.modal{padding:16px 20px}
}
@media(max-width:370px){.shell{padding-left:14px;padding-right:14px}.step{font-size:11px;padding:0 4px}.mode{padding:11px 12px}.toolbar .delete-wrap .mode{padding:11px 10px}}
.photo-drop-target{position:relative}.drop-scrim{position:absolute;inset:0;background:#ebebebe8;border:2px dashed #8f9498;border-radius:16px;display:none;align-items:center;justify-content:center;flex-direction:column;gap:14px;pointer-events:none;z-index:8}.drop-scrim .icon{width:40px;height:40px;color:#8f9498}.photo-drop-target.drag-over .drop-scrim{display:flex}.desktop-drop-hint{display:block;text-align:center;color:#777;font-size:12px;padding-top:12px}.dropzone.drag-over{outline:2px dashed #8f9498;outline-offset:-5px;background:#dfe1e2}.dropzone>strong{font-size:20px}.dropzone .icon{width:45px;height:45px}
@media(max-width:760px){.desktop-drop-hint{display:none}.dropzone>strong{font-size:17px}}

@media(min-width:761px) and (max-width:1000px){.steps{position:static;transform:none;width:100%;margin-bottom:24px}.header{margin-bottom:20px}}

.qr-connect{max-width:960px;margin:12vh auto 7vh;padding:0 32px;display:grid;grid-template-columns:minmax(0,1fr) 340px;align-items:center;gap:80px}.qr-connect .logo{margin-bottom:36px}.qr-connect h1{font-size:48px;margin-bottom:26px}.qr-connect ol{padding-left:22px;margin:0 0 20px;color:#555;font-size:16px;line-height:1.65}.qr-connect li+li{margin-top:14px}.qr-connect>section>p{font-size:14px}.qr-panel{background:white;min-height:340px;padding:24px;border-radius:18px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;text-align:center}.qr-panel p{font-size:14px;line-height:1.5}.login-qr{width:280px;height:280px;max-width:100%;object-fit:contain}.qr-loading{height:34px;width:34px;border:3px solid #e3e4e4;border-top-color:#8f9498;border-radius:50%;animation:qr-spin .8s linear infinite}.logout{display:block;margin:20px auto 0}.qr-panel h2{font-size:30px}@keyframes qr-spin{to{transform:rotate(360deg)}}@media(max-width:760px){.qr-connect{display:flex;max-width:440px;flex-direction:column;margin:28px auto;padding:0 24px;gap:28px;align-items:stretch}.qr-connect .logo{margin-bottom:28px}.qr-connect h1{font-size:38px;margin-bottom:20px}.qr-connect ol{font-size:15px}.qr-connect li+li{margin-top:9px}.qr-panel{min-height:300px;padding:20px}.login-qr{width:260px;height:260px}}
