*{box-sizing:border-box}body{margin:0;background:#f5f4ef;color:#242c27;font-family:'Noto Sans KR',sans-serif;font-size:13px}button,.upload{cursor:pointer;font:inherit;border:1px solid #d7dad1;background:transparent;color:inherit;border-radius:6px;padding:10px 15px;transition:.15s}button:hover,.upload:hover{background:#e4e8db}button:disabled{opacity:.4;cursor:wait}header{height:85px;border-bottom:1px solid #dedfd5;display:flex;align-items:center;justify-content:space-between;padding:0 4vw}.brand{font-family:Georgia,serif;font-size:38px;letter-spacing:-2px}.brand span{font:11px 'Noto Sans KR';letter-spacing:0;margin-left:25px;color:#7a8076}header>div{display:flex;align-items:center;gap:24px}.local{font-size:11px;color:#69765c}#export,.primary{background:#344b37!important;color:white;border-color:#344b37!important}main{max-width:1600px;margin:auto;padding:38px 4vw 20px}.eyebrow{font-size:10px;letter-spacing:2px;color:#7c876b}h1{font-size:32px;letter-spacing:-1.3px;margin:9px 0}.intro>p:last-child{color:#85897f;margin-bottom:30px}.workspace{display:grid;grid-template-columns:250px minmax(330px,1fr) 330px;border:1px solid #d9dcd1;border-radius:12px;background:#fffefa;overflow:hidden;min-height:550px}aside,.editor,.preview{padding:20px}.editor{border-inline:1px solid #dedfd5}.sectionhead{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:20px}h2{font-size:13px;margin:0;font-weight:600}.small{padding:6px 10px;font-size:11px}.badge{font-size:10px;color:#738167;background:#edf0e7;padding:5px 9px;border-radius:20px}#drop{border:1px dashed #c9cfbe;border-radius:7px;text-align:center;padding:32px 10px;background:#f6f7f0}#drop p,.hint{font-size:11px;line-height:1.9;color:#8b9086}.upload{display:inline-block}.hint{text-align:center}#library{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:16px;max-height:290px;overflow:auto}.lib{padding:0;border:0}.lib img{width:100%;height:80px;object-fit:cover;border-radius:4px}.lib span{font-size:9px;display:block;overflow:hidden;white-space:nowrap}.mode{display:flex;gap:8px;justify-content:center;margin-bottom:14px}.mode button.active{border-color:#455c39;background:#edf1e5}.stage{display:flex;justify-content:center;background:#eeeee7;border-radius:6px;padding:15px;height:300px}canvas{max-width:100%;height:100%;object-fit:contain;box-shadow:0 4px 16px #0001}#info{text-align:center;font-size:10px;color:#7a8076}.controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.controls label{font-size:10px;color:#7b8075}input[type=range]{width:100%;accent-color:#526949;display:block}.editor .primary{display:block;margin:auto}#empty{height:420px;display:grid;place-content:center;text-align:center;color:#a1a694;font-size:17px;line-height:2}.phone{border:1px solid #dddfd6;border-radius:13px;overflow:hidden;background:white}.account{display:flex;gap:9px;align-items:center;padding:13px;font-size:11px}.account>span:last-child{margin-left:auto}.avatar{width:28px;height:28px;border-radius:50%;background:#e2e8d8;text-align:center;line-height:28px;font:italic 24px Georgia;color:#526949}.post{aspect-ratio:var(--post-ratio,4/5);background:#e9ecdf;position:relative;display:grid;place-items:center}.post img{width:100%;height:100%;object-fit:cover;position:absolute}.post img:not([src]){display:none}#placeholder{font:11px Georgia;letter-spacing:2px;color:#969e87}#page{position:absolute;right:10px;top:10px;background:#0008;color:#fff;border-radius:15px;padding:4px 9px;font-size:10px}.postbottom{display:flex;justify-content:space-between;padding:10px 15px;font-size:22px}.paging{display:flex;justify-content:center;align-items:center;gap:12px;padding-bottom:10px}.paging button{padding:2px 8px;border:0}#dots{display:flex;gap:4px}#dots i{width:4px;height:4px;border-radius:50%;background:#d9dece}#dots i.on{background:#415b33}.sequence{margin-top:25px;border:1px solid #d9dcd1;background:#fffefa;border-radius:10px;padding:20px}.sequence .sectionhead p{flex:1;font-size:11px;color:#909587}#total{margin-left:8px;color:#8b987a}#strip{display:flex;gap:14px;overflow:auto;min-height:160px}.card{flex:0 0 108px;position:relative;border:2px solid transparent;padding:4px;border-radius:7px;cursor:pointer}.card.selected{border-color:#6b8155}.card img{width:96px;height:120px;object-fit:cover;border-radius:3px}.card b{position:absolute;top:9px;left:9px;background:#fff;color:#354c2d;padding:2px 5px;font-size:10px;border-radius:3px}.card p{font-size:9px;overflow:hidden;white-space:nowrap;margin:5px 0}.card button{padding:1px 7px;font-size:11px}.card .remove{float:right}footer{padding:22px 0;font-size:10px;color:#989f90;display:flex;justify-content:space-between}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#293e2e;color:white;padding:13px 24px;border-radius:8px;display:none;z-index:9}@media(max-width:1100px){.workspace{grid-template-columns:210px 1fr}.preview{grid-column:1/-1;max-width:370px;margin:auto}.editor{border-right:0}.local{display:none}}@media(max-width:650px){header{padding:15px;height:auto}.brand span{display:none}h1{font-size:25px}.workspace{display:block}.editor{border:0;border-top:1px solid #ddd}#library{grid-template-columns:repeat(5,1fr)}#drop{padding:15px}.stage{height:310px}footer{display:block}.sequence .sectionhead p{display:none}}

.feedbar{display:flex;align-items:center;gap:10px;margin:0 0 20px;padding:15px;background:#e9eddf;border-radius:10px;flex-wrap:wrap}.feedbar label{font-size:11px;margin-right:10px}.feedbar select,.feedbar input{font:inherit;padding:10px;border:1px solid #cbd2bf;border-radius:6px;background:#fffefa;color:#344b37}.feedbar select{min-width:160px}.feedbar input{flex:1;min-width:190px}#resolution{font-size:11px;text-align:center;color:#68775b}#resolution.warning,.resolution-warning{color:#a65317!important}.card .resolution-warning{font-size:9px;white-space:normal}.feedbar button{white-space:nowrap}@media(max-width:650px){.feedbar>div,.feedbar select{width:100%}.feedbar input{width:100%}}

#import-status{font-size:10px;color:#6b795d}.card img{height:auto;aspect-ratio:var(--post-ratio,4/5)}
/* Shared library: the photographs lead the selection workflow. */
.intro{padding:0}.intro h1{font-size:26px}.intro>p:last-child{margin-bottom:20px;color:#5c6758}.workspace{grid-template-columns:minmax(340px,1fr) 360px;min-height:0}.editor{border-left:0}.preview{grid-column:auto;max-width:none}.library-panel{background:#fffefa;border:1px solid #d1d6c8;border-radius:12px;padding:22px;margin-bottom:16px}.library-panel h2{font-size:18px}.library-panel .sectionhead p{margin:8px 0 0;color:#56634f;font-size:13px}.import-actions{display:flex;gap:8px}.library-tools{display:flex;flex-wrap:wrap;gap:16px;margin:20px 0}.library-tools label{font-size:12px;color:#4d5b45;display:flex;flex-direction:column;gap:6px;min-width:140px}.library-tools input[type=search],.library-tools select{padding:10px;min-height:44px;border:1px solid #b6c1ab;border-radius:6px;font:inherit;background:#fff}.library-tools label:first-child{flex:1}.selectionbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:16px}.selectionbar span{margin-right:auto;font-size:13px}.selectionbar button{font-size:12px}#library{--thumb:180px;grid-template-columns:repeat(auto-fill,minmax(min(var(--thumb),100%),1fr));gap:18px;max-height:650px;margin:0;padding:3px;overflow:auto}.library-card{min-width:0}.photo-open{width:100%;padding:0;border:1px solid #d1d6c8;border-radius:6px;background:#eef0e8;display:block;overflow:hidden}.photo-open img{display:block;width:100%;height:220px;object-fit:contain}.library-card label{display:flex;gap:8px;align-items:flex-start;overflow-wrap:anywhere;font-size:12px;padding:10px 0;line-height:1.5}.library-card input{width:18px;height:18px;flex-shrink:0;accent-color:#344b37}.library-card p{font-size:12px;color:#5b6753;margin:0;overflow-wrap:anywhere}.library-card p.used-current{font-weight:600;color:#294b28}#drop{padding:30px 15px}#drop.compact{padding:12px;text-align:left}#drop span{color:#59654f;font-size:12px}#import-status{font-size:12px;color:#4d5b45;overflow-wrap:anywhere}.storagebar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:22px;padding:14px 0;border-bottom:1px solid #cdd4c3}.storagebar>span:last-child{font-size:12px;color:#59654f}#save-status{font-size:13px;color:#345730;margin-right:auto}.warning{color:#9b4310!important}dialog{width:min(1000px,94vw);max-height:92vh;border:1px solid #bec8b2;border-radius:12px;padding:22px;background:#fffefa;color:#243025}dialog::backdrop{background:#172118b3}#large-photo{display:block;width:100%;height:65vh;object-fit:contain;background:#eceee5}#photo-detail{overflow-wrap:anywhere}#photo-title{overflow-wrap:anywhere}.card button,.paging button{min-width:44px;min-height:44px}.card{flex-basis:160px}.card img{width:148px}.card p{font-size:12px;white-space:normal;overflow-wrap:anywhere}.card .remove{float:none}.hint,#info,.controls label,footer,.feedbar label{color:#5d6854;font-size:12px}.badge{color:#4d613e;font-size:12px}.brand span,.local,.sequence .sectionhead p{color:#5a6851}button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #536f36;outline-offset:3px}button:disabled{opacity:.65}::selection{background:#d1e3be;color:#1c341a}input{caret-color:#365a2b}*{scrollbar-color:#829575 #edf0e7}input::placeholder{color:#626c5b}button,input,select{min-height:44px}#thumb-size{min-height:20px}#library-empty:empty{display:none}#library-count{font-size:13px;font-weight:400;margin-left:8px}@media(max-width:900px){.workspace{grid-template-columns:1fr}.preview{width:min(380px,100%);margin:auto}.editor{border-right:0}.library-panel .sectionhead{align-items:flex-start;flex-direction:column}}@media(max-width:550px){.library-panel{padding:14px}#library{--thumb:140px;gap:12px}.photo-open img{height:180px}.selectionbar button{flex:1 1 45%}.library-tools label{flex:1 1 45%;min-width:120px}.storagebar>span{width:100%}.import-actions{flex-wrap:wrap}header .brand{font-size:30px}}
#empty,#total{color:#536348}#large-photo:not([src]){display:none}

.brand{color:inherit;text-decoration:none}#migration-notice{padding:16px;background:#e9eddf;border-radius:6px}#migration-notice a{color:inherit;font-weight:700}

.feed-help{width:100%;margin:0;color:#5d6854;font-size:12px}#photo-downloads{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px;margin-top:20px}#photo-downloads figure{margin:0;min-width:0}#photo-downloads img{width:100%;height:auto;display:block}#photo-downloads a{display:block;padding:12px 0;overflow-wrap:anywhere;color:#344b37}#share-help{line-height:1.7}#toast{max-width:calc(100vw - 32px);width:max-content}#delete-feed,#delete-project{color:#963d28}@media(max-width:550px){.import-actions{width:100%}.import-actions button{flex:1 1 auto}.feedbar input,.feedbar select,.library-tools input,.library-tools select{font-size:16px}.feedbar>input{min-width:0;flex-basis:100%}.controls{gap:8px}.controls input{min-height:44px}}

.mobile-steps{display:none}#export-size{max-width:230px;min-height:44px}header>div{flex-wrap:wrap}.export-label{font-size:12px}@media(max-width:650px){header{height:auto;flex-wrap:wrap;gap:12px}header>div{display:flex;gap:8px;width:100%}.export-label{align-self:center}.mobile-steps{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;gap:4px;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--paper,#f7f6f2);border-top:1px solid #bbb}.mobile-steps button{flex:1;min-height:44px}body{padding-bottom:80px}#photos-section,#crop-section,#order-section,#export-size{scroll-margin-top:16px}#toast{bottom:90px}}

#canvas{touch-action:none;cursor:grab}#canvas:active{cursor:grabbing}

.projectbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:16px 0;margin-bottom:12px;border-bottom:1px solid #cdd4c3}.projectbar>div{display:flex;align-items:center;gap:10px}.projectbar label{font-weight:600}.projectbar select,.projectbar input{font:inherit;padding:10px;border:1px solid #b6c1ab;border-radius:6px;background:#fffefa;color:#344b37;max-width:100%}.projectbar select{min-width:180px}.projectbar input{flex:1;min-width:190px}#project-summary{color:#5d6854;font-size:12px}.library-view{display:flex;gap:8px;margin-top:20px}.library-view button[aria-pressed=true]{background:#e9eddf;border-color:#526949;font-weight:600}#candidate-help{color:#4d5b45;line-height:1.7;margin:10px 0}.projectbar button{white-space:nowrap}@media(max-width:650px){.projectbar>div{width:100%}.projectbar select{flex:1;min-width:0}.projectbar input{flex-basis:100%;min-width:0}.projectbar input,.projectbar select{font-size:16px}.library-view button{flex:1}.library-view{gap:6px}}

/* Task navigation and progressive disclosure. */
.manage-menu{position:relative;margin-left:auto}.manage-menu>summary,.library-filter>summary,.backup-menu>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:10px 14px;border:1px solid #b6c1ab;border-radius:6px;list-style:none}.manage-menu>summary::after,.library-filter>summary::after,.backup-menu>summary::after{content:'+';margin-left:12px}.manage-menu[open]>summary::after,.library-filter[open]>summary::after,.backup-menu[open]>summary::after{content:'−'}.manage-menu>div{position:absolute;right:0;top:calc(100% + 8px);width:min(350px,86vw);z-index:40;background:#fffefa;border:1px solid #b6c1ab;border-radius:10px;padding:16px;display:grid;gap:10px}.manage-menu input{width:100%;min-width:0}.library-filter{margin:16px 0}.library-filter>summary{width:max-content}.library-tools{margin:12px 0}.export-panel{margin-top:24px;padding:24px;border:1px solid #d1d6c8;border-radius:12px;background:#fffefa}.export-panel h2{font-size:20px}.export-panel>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.export-panel .hint{text-align:left;max-width:65ch}.backup-menu{margin-top:28px}.backup-menu>summary{width:max-content}.edit-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:16px}.edit-toolbar select{font:inherit;min-height:44px;background:#fffefa;border:1px solid #b6c1ab;border-radius:6px;padding:8px}.edit-toolbar #edit-page{margin-left:auto;color:#4d5b45}.edit-toolbar button{padding:8px 10px}#more-photos{display:block;margin:18px auto 0}#more-photos[hidden]{display:none}#save-status{line-height:1.5;margin:8px 0 14px}.selectionbar[data-selected=false] #deselect,.selectionbar[data-selected=false] #add-candidates,.selectionbar[data-selected=false] #add-selected,.selectionbar[data-selected=false] #remove-candidates,.selectionbar[data-selected=false] #remove-library{display:none}.library-card{content-visibility:auto;contain-intrinsic-size:auto 290px}summary:focus-visible{outline:3px solid #536f36;outline-offset:3px}.projectbar input,.feedbar input{max-width:100%}
@media(min-width:768px){.library-filter:not([open])>.library-tools{display:flex}.library-filter>summary{display:none}.mobile-steps{display:none}header{height:auto;min-height:85px}}
@media(max-width:767px),(max-width:1100px) and (max-height:500px) and (orientation:landscape){body{padding-bottom:calc(80px + env(safe-area-inset-bottom))}header{height:auto;min-height:48px;padding:10px 16px;gap:10px}.brand{font-size:28px}.brand span,.local,.desktop-export,.intro,.feed-help,#project-summary{display:none}main{display:flex;flex-direction:column;padding:10px 12px 20px}.projectbar,.feedbar{padding:6px 0;margin:0;border:0;border-radius:0;background:transparent;gap:8px;flex-wrap:nowrap}.projectbar>div,.feedbar>div{flex:1;min-width:0;width:auto;display:flex;align-items:center;gap:8px}.projectbar label,.feedbar label{font-size:12px;flex:0 0 48px;margin:0}.projectbar select,.feedbar select{min-width:0;width:100%;font-size:16px;flex:1;padding:10px}.manage-menu{flex:0 0 auto}.manage-menu>summary{padding:10px;min-width:52px}.manage-menu>summary::after{margin-left:6px}#save-status{font-size:12px;margin:6px 0 10px}.library-panel{padding:12px;margin:0;border-radius:10px}.library-panel h2{font-size:17px}.library-panel .sectionhead{gap:10px;margin-bottom:12px;align-items:stretch}.library-panel .sectionhead p{display:none}.import-actions{width:100%;gap:6px;flex-wrap:wrap}.import-actions button{flex:1;padding:10px 8px}#drop{display:none}#connection-status{font-size:11px;color:#5d6854;margin:8px 0}.library-view{margin-top:12px}.library-view button{flex:1;font-size:13px;padding:10px 4px}#candidate-help{font-size:12px;margin:8px 0}.library-filter{margin:10px 0}.library-filter>summary{width:100%;justify-content:space-between}.library-tools label{flex:1 1 45%;min-width:110px}.library-tools input,.library-tools select{font-size:16px;max-width:100%}.selectionbar{position:sticky;top:0;z-index:10;background:#fffefa;padding:10px 0;gap:6px}.selectionbar span{flex:1}.selectionbar button{flex:0 1 auto;padding:10px;font-size:12px}#add-candidates,#add-selected{flex:1 1 40%}#remove-candidates,#remove-library{font-size:11px}#library{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;overflow:visible;gap:12px;margin-top:4px}.photo-open img{height:180px;max-height:48vw}.library-card label{min-height:44px;font-size:12px}.library-card p{font-size:11px}.workspace{display:contents}.editor,.preview,.sequence{padding:12px;background:#fffefa;border:1px solid #d1d6c8;border-radius:10px;margin:0;width:100%;max-width:none}.editor{order:1}.sequence{order:2}.preview{order:3;margin-top:12px}.preview .phone{max-width:360px;margin:auto}.sequence .sectionhead{flex-wrap:wrap;gap:8px}.sequence .sectionhead p{display:block;font-size:12px;flex-basis:100%;margin:0}#strip{gap:8px;scroll-snap-type:x proximity}.card{scroll-snap-align:start;flex:0 0 148px}.card img{width:136px}.card button{min-width:44px;min-height:44px}.stage{height:clamp(200px,38svh,360px);padding:8px}.controls{grid-template-columns:1fr;gap:2px}.controls label{display:grid;grid-template-columns:65px 1fr;align-items:center;font-size:13px}.controls input{min-height:44px;margin:0}.edit-toolbar{gap:6px;margin-bottom:10px}.edit-toolbar label{font-size:12px}.edit-toolbar select{max-width:170px;font-size:16px}.edit-toolbar #edit-page{flex:1;text-align:right;font-variant-numeric:tabular-nums}.edit-toolbar button{flex:1 1 40%}.mode button{flex:1}#resolution,#info{font-size:11px;overflow-wrap:anywhere;margin:8px 0}.export-panel{order:4;padding:16px;margin:0}.export-panel>div{display:grid;grid-template-columns:1fr;gap:10px}.export-panel #export-size{width:100%;max-width:none;font-size:16px}.export-panel #export{min-height:48px}.backup-menu{margin-top:24px}.storagebar{font-size:12px}.mobile-steps{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:30;padding:8px 12px calc(8px + env(safe-area-inset-bottom));gap:4px;background:#f5f4ef;border-top:1px solid #b6c1ab}.mobile-steps button{flex:1;min-height:48px;border:0;font-size:14px}.mobile-steps button[aria-current=page]{background:#344b37;color:white;font-weight:600}body:not([data-panel=photos]) .library-panel,body:not([data-panel=edit]) .editor,body:not([data-panel=order]) .sequence,body:not([data-panel=order]) .preview,body:not([data-panel=export]) .export-panel,body:not([data-panel=export]) footer{display:none}footer{order:5;line-height:1.8}#toast{bottom:calc(82px + env(safe-area-inset-bottom));font-size:13px}dialog{padding:14px;max-height:calc(100dvh - 24px)}#large-photo{height:58dvh}#photo-downloads{grid-template-columns:1fr}#photo-downloads img{max-height:55dvh;object-fit:contain}}
@media(prefers-reduced-motion:reduce){button,.upload{transition:none}}

/* Keep the portrait controls in their familiar order; landscape dedicates a pane to the photo. */
#edit:not([hidden]){display:flex;flex-direction:column}.edit-tools{display:contents}.edit-toolbar{order:1}.mode{order:2}.stage{order:3}#info{order:4}#resolution{order:5}.controls{order:6}#modehint{order:7}#apply{order:8}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape){
 body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .library-filter>summary{display:flex}.mobile-steps{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 body[data-panel=edit] header,body[data-panel=edit] .projectbar,body[data-panel=edit] .feedbar,body[data-panel=edit] .editor>.sectionhead{display:none}
 body[data-panel=edit] main{padding:4px 8px}body[data-panel=edit] #save-status{margin:0 0 4px;min-height:18px}
 body[data-panel=edit] .editor{padding:0;border:0;background:transparent}
 #edit:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,34%);gap:12px;height:calc(100dvh - 102px - env(safe-area-inset-bottom))}
 .edit-tools{display:block;grid-column:2;grid-row:1;overflow-y:auto;overscroll-behavior:contain;padding:0 4px 16px}
 .stage{grid-column:1;grid-row:1;height:100%;min-height:0;padding:4px;margin:0}.stage canvas{min-width:0;max-height:100%}
 .edit-toolbar{margin-bottom:6px}.mode{margin-bottom:8px}.mode button{padding:10px 6px;min-height:44px}.controls{gap:0}.edit-tools #apply{min-height:44px;width:100%}
 #empty{height:calc(100dvh - 110px - env(safe-area-inset-bottom))}
}
@media(max-width:767px) and (orientation:portrait){
 body[data-panel=edit] header,body[data-panel=edit] .projectbar,body[data-panel=edit] .feedbar,body[data-panel=edit] .editor>.sectionhead{display:none}
 body[data-panel=edit] main{padding:6px 8px 20px}
 body[data-panel=edit] #save-status{margin:0 0 6px}
 body[data-panel=edit] .editor{padding:6px;border:0;background:transparent}
 body[data-panel=edit] .stage{height:clamp(240px,58svh,560px);padding:4px}
 body[data-panel=edit] #edit-page{min-width:48px;white-space:nowrap}
}
