/* The photo is the working surface; secondary tools unfold around it. */
:root{--muted:#60685f;--line:#dfe3da;--panel:#fafbf8}
.app-header{height:72px;padding:0 24px;gap:24px;background:#f6f5f2}
.brand small{font-size:10px;letter-spacing:1.3px}
.document-heading strong{font-size:14px}.document-heading span{font-size:12px}
.button{font-size:14px;min-height:44px;border-radius:8px}
.icon-button{min-width:40px;height:40px}
.workspace-button{color:#596251;padding:10px;background:transparent}
.workspace-button:hover:not(:disabled){background:#e9ede4}
.workspace-button svg{width:18px;height:18px}
.header-actions{gap:8px}.history-buttons{padding-left:8px}
.editor{height:calc(100dvh - 72px);min-height:0;grid-template-columns:minmax(0,1fr) 372px}
.preview-toolbar{height:52px;padding:0 24px}.workspace-label{font-size:12px;letter-spacing:0}
.workspace-label i{display:none}.view-switch button{font-size:13px;min-height:36px;padding:5px 12px}
.canvas-footer{min-height:52px;font-size:12px;padding:8px 20px}
.canvas-button{font-size:12px;min-height:36px;padding:7px 10px}
.preview-badge,.compare-label{font-size:12px}
.tool-tabs{height:66px;padding:0 14px;gap:4px}
.tool-tabs button{font-size:14px;color:#697263;gap:6px}
.tool-tabs button.active{font-weight:650}.tool-tabs button.active:after{height:3px;border-radius:2px}
.tool-tabs button svg{width:20px;height:20px}
.tool-panel{padding:20px 24px}
.panel-heading{margin-bottom:18px}.panel-heading .eyebrow{display:none}
.panel-heading h2{font-size:18px;letter-spacing:-.4px;margin:0 0 8px}.panel-heading p{font-size:14px}
.quick-actions{display:grid;gap:8px}
.auto-button{padding:13px 14px;min-height:52px;border-radius:8px}
.auto-button>span{font-size:14px}.auto-button small{font-size:12px;color:#63765b}
.reference-shortcut{padding:10px 12px;border:1px solid #dfd9cc;background:#f5f1e9;border-radius:8px;gap:10px}
.reference-shortcut img{width:36px;height:38px;border-radius:5px}
.reference-shortcut span{font-size:12px;color:#70644f}
.reference-shortcut strong{font-size:14px;color:#584e3b;margin-top:3px}
.section-title{margin:22px 0 12px}.section-title h3{font-size:14px}
.text-button{font-size:14px;min-height:36px}.control{margin-bottom:14px}
.control-label{font-size:14px;margin-bottom:4px}.control-label output{font-size:14px}
.number-value{font-size:14px;min-height:32px;width:56px;border-color:#e2e6dc}
.range{padding:14px 0}.range::-webkit-slider-thumb{width:17px;height:17px}.range::-moz-range-thumb{width:17px;height:17px}
.range-labels{font-size:12px;color:#68765e;margin-top:4px}
.fine-tuning{margin:16px 0}.fine-tuning summary{font-size:14px;min-height:32px;color:#59694f;gap:8px}
.advanced-tool{margin:14px 0}.advanced-tool>summary{font-size:14px;min-height:48px;padding:10px 0}
.advanced-tool>summary>span{font-size:12px;color:#69765f}
.favorite-star{min-width:30px;min-height:36px}.favorite-tools button{font-size:13px;min-height:36px}
.hint,.check-label,.select-label{font-size:14px;color:#68755e}
.check-label{min-height:36px}.check-label input{width:18px;height:18px}
.select-label input,select,.curve-numbers input,.curve-numbers select{font-size:14px}
.curve-numbers label{font-size:13px}.hue-bands button{min-height:30px}
.reference-drop{height:160px}.reference-drop>span#reference-empty{font-size:14px;color:#596b4e}
.reference-drop small,.reference-info{font-size:12px;color:#667459}.replace-label{font-size:12px}
.reference-controls{margin-top:18px}.reference-controls .section-title{margin-top:14px}
.tip p{font-size:13px;color:#637256}.palette{margin-bottom:12px}
.toggle{width:42px;height:26px;padding:3px}.toggle i{width:20px;height:20px}
.toggle[aria-pressed=true] i{transform:translateX(16px)}
.crop-actions{position:sticky;top:0;z-index:10;background:var(--panel);padding:8px 0;margin:0 0 12px;border-bottom:1px solid var(--line)}
.ratio-grid button,.geometry-buttons button,.mask-add button,.mask-list button{font-size:14px;min-height:44px}
.history-section{margin:0 24px 16px}.history-section summary,.history-section li button{font-size:13px;min-height:40px}
.history-section summary>span{font-size:12px}
.panel-footer{min-height:44px;padding:4px 16px;gap:10px}
.panel-footer>span{font-size:12px;margin:0;flex:1;color:#647457}
.panel-footer .text-button{font-size:12px}.panel-footer .icon-button{min-width:32px;width:32px;height:32px;font-size:14px}
dialog{max-height:calc(100dvh - 32px);overflow:auto;padding:28px;color:#35412f}
dialog h2{font-size:22px;line-height:1.4;margin:12px 0 22px}
dialog h3,dialog p,.guide,.guide p,.export-options label,.select-label,.batch-options label{font-size:14px}
dialog p{color:#606e56}.dialog-note{font-size:13px!important;color:#606e56}
dialog .eyebrow{font-size:11px}.dialog-close{min-width:44px;min-height:44px}
.export-options{gap:16px}.export-options select{font-size:14px;width:100%;min-width:0}
#export-dimensions{font-variant-numeric:tabular-nums;color:#3e5132;margin-bottom:8px}
#export-advanced{margin:16px 0 8px}#export-advanced .export-options{padding:4px 0 12px}
.workspace-actions .button,.saved-list button:first-child{font-size:14px}.saved-list button:last-child{font-size:13px}
.output-tools .button{font-size:14px}.busy-card p{font-size:14px}.busy-card strong{font-size:16px}
.toast{font-size:14px;max-width:calc(100vw - 32px)}

/* Import is the single first step. Saved work remains accessible in the header. */
.editor:not(.has-photo){grid-template-columns:1fr}
.editor:not(.has-photo) .tools-panel,.editor:not(.has-photo) .preview-toolbar,.editor:not(.has-photo) .canvas-footer{display:none}
.editor:not(.has-photo) .preview-panel{flex:1;min-height:0}
.editor:not(.has-photo) .stage{overflow:auto;padding:40px}
.welcome{max-width:920px;width:100%;grid-template-columns:1.1fr 1fr;gap:56px;padding:28px}
.welcome .eyebrow{font-size:12px;letter-spacing:1.4px}
.welcome h1{font-size:clamp(32px,3.3vw,48px);font-weight:550;letter-spacing:-1.5px;margin:18px 0;line-height:1.38;word-break:keep-all}
.welcome p{font-size:16px;line-height:1.8;color:#c0c9c1;margin:0 0 26px}
.welcome .button{font-size:16px;min-height:50px;padding:13px 24px}
.welcome-demo{font-size:14px;margin-top:14px;min-height:40px}
.welcome-formats{font-size:12px;line-height:1.9;color:#a5b3a8;margin-top:22px}
.welcome-art{display:block;margin:0 12px 65px 0}.welcome-art>img{height:300px}
.photo-note{font-size:13px}.look-card{display:flex;left:-16px;right:8px}
.look-card small{font-size:10px}.look-card span{font-size:13px}

@media(min-width:1500px){.editor.has-photo{grid-template-columns:minmax(0,1fr) 392px}.tool-panel{padding:24px 28px}}
@media(max-width:1050px) and (min-width:741px){
  .app-header{gap:16px;padding:0 16px}.brand{font-size:23px}.document-heading{padding-left:16px}
  .document-heading span{display:none}.workspace-button span{display:none}
  .editor.has-photo{grid-template-columns:minmax(0,1fr) 340px}
  .canvas-footer>span{display:none}.canvas-footer>div{margin-left:auto}
  .welcome{gap:32px;padding:12px}.welcome-art>img{height:270px}
}
@media(max-width:740px){
  .app-header{height:60px;padding:0 10px;gap:8px}.brand>span:last-child{display:none}.brand-symbol{width:30px;height:32px}
  .header-actions{gap:3px}.history-buttons{padding:0;border:0;gap:0}
  .header-actions .button{font-size:14px;min-height:44px;padding:8px 10px}
  .header-actions #source-drop,.header-actions #workspace-open{min-width:44px;padding:10px}
  .workspace-button span{display:none}.header-actions .button svg{width:19px;height:19px}
  .history-buttons .icon-button{min-width:44px;width:44px;height:44px}.history-buttons svg{width:20px;height:20px}
  .editor{height:calc(100dvh - 60px);min-height:0;display:flex}
  .editor.has-photo .preview-panel{flex:0 0 48%;min-height:180px}
  .preview-toolbar{height:38px;padding:0 12px}.workspace-label{font-size:12px;max-width:none}
  .view-switch button{font-size:12px;min-height:30px;padding:3px 9px}
  .stage{padding:8px 14px}.canvas-footer{min-height:40px;padding:3px 10px}
  .canvas-footer>span{display:none}.canvas-footer>div{width:100%;justify-content:center;gap:6px}
  .canvas-button{font-size:12px;min-height:34px;padding:6px 10px}.canvas-button svg{width:16px;height:16px}
  .preview-badge,.compare-label{font-size:11px}
  .tool-tabs{height:48px;padding:0 10px;gap:0}.tool-tabs button{font-size:13px;gap:5px;flex-direction:row}
  .tool-tabs button svg{width:17px;height:17px}
  .tool-panel{padding:12px 16px 18px}.has-photo .panel-heading{display:none}
  .has-photo .auto-button{padding:9px 12px;min-height:44px}.auto-button>span{font-size:14px}
  .quick-actions{grid-template-columns:1fr 1fr;gap:8px}.reference-shortcut{padding:8px;gap:6px;min-height:44px}
  .reference-shortcut img,.reference-shortcut span>strong svg{display:none}.reference-shortcut span{font-size:0}
  .reference-shortcut strong{font-size:13px;line-height:1.5;margin:0;word-break:keep-all}
  .has-photo .section-title{margin:10px 0 4px}.section-title h3{font-size:14px}
  .control-label{font-size:14px;margin-bottom:0}.has-photo .control{margin-bottom:10px}
  .number-value{font-size:16px;min-height:32px}.range{padding:16px 0}
  .fine-tuning summary,.advanced-tool>summary{font-size:14px}
  .reference-drop{height:92px}.reference-drop>span#reference-empty{gap:4px}.reference-drop small{font-size:12px}
  .reference-info{margin:3px 0}.reference-info .icon-button{height:32px;min-width:36px}.palette{margin-bottom:8px}
  #match{min-height:44px}.reference-controls{margin-top:12px}.hint{font-size:13px;margin:8px 0}
  .crop-actions{top:0;padding:8px 0;margin-bottom:8px}.geometry-buttons button,.ratio-grid button{font-size:13px}
  .history-section{margin:0 16px 12px}.panel-footer{min-height:40px;padding:2px 14px}
  .panel-footer>span{font-size:11px;display:flex}.panel-footer .text-button{font-size:12px}.panel-footer #help{margin-left:0}
  .favorite-tools{margin:0 0 10px}.favorite-tools button{font-size:12px}
  .toast{top:68px;bottom:auto;font-size:13px;padding:10px 14px}.error-message{top:68px}
  dialog{padding:24px;max-height:calc(100dvh - 24px)}dialog h2{font-size:20px;padding-right:15px}
  .export-options select,.select-label input,.select-label select,.curve-numbers input,.curve-numbers select{font-size:16px}
  .editor:not(.has-photo) .stage{padding:24px;align-items:center}
  .welcome{display:block;max-width:440px;padding:0}.welcome h1{font-size:34px;line-height:1.4;margin:16px 0}
  .welcome h1 br{display:block}.welcome p{display:block;font-size:15px;margin-bottom:22px}
  .welcome .eyebrow{font-size:11px;letter-spacing:1.4px}.welcome .button{min-height:48px;font-size:16px}
  .welcome-demo{display:flex;font-size:14px;margin-top:12px;min-height:40px}.welcome-formats{display:block;margin-top:18px;font-size:12px}
  .welcome-art{display:none}
}
@media(max-width:359px){
  .app-header{padding:0 8px;gap:4px}.brand-symbol{width:26px;height:30px}.header-actions{gap:0}
  .header-actions #download{padding:8px;font-size:13px;gap:5px}
  .tool-tabs{padding:0 6px}.tool-tabs button{font-size:12px;gap:4px}.tool-tabs button svg{width:15px;height:15px}
  .tool-panel{padding-left:12px;padding-right:12px}.quick-actions{gap:6px}.auto-button>span{font-size:13px}.auto-button>span svg{margin-right:4px}
  .welcome h1{font-size:30px}.panel-footer>span{font-size:10px}
}
.lut-filename{font-size:14px;font-weight:600;overflow-wrap:anywhere;margin:16px 0 6px}
#lut-info{overflow-wrap:anywhere}

/* Clear entry choices share the same editor; no separate beginner/pro modes. */
.welcome-choices{display:grid;gap:10px;max-width:400px}
.welcome-choice{display:flex;align-items:center;gap:14px;width:100%;min-height:76px;padding:14px 16px;border:1px solid #697b70;border-radius:12px;background:#35463c;text-align:left;color:#f5f6f0}
.welcome-choice>svg{width:22px;height:22px;flex:none;color:#c2d3be}
.welcome-choice>svg:last-child{width:18px;height:18px;margin-left:auto}
.welcome-choice>span{min-width:0}.welcome-choice strong{display:block;font-size:16px;font-weight:600;line-height:1.5}
.welcome-choice small{display:block;font-size:12px;line-height:1.6;color:#c2cdc2;margin-top:3px;word-break:keep-all}
.welcome-choice:hover:not(:disabled){background:#42554a;border-color:#9fb1a1}
.reference-choice{background:#493e34;border-color:#8c725b}.reference-choice>svg{color:#e4ba97}.reference-choice small{color:#d8c8b9}
.reference-choice:hover:not(:disabled){background:#5a483b;border-color:#c59b79}
.welcome-formats{margin-top:14px}.welcome p{margin-bottom:20px}

/* After matching, the selected image becomes a compact, editable look card. */
.reference-compact .reference-chooser{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px;border:1px solid #dde3d6;background:#f0f3eb;border-radius:9px}
.reference-compact .reference-drop{width:54px;height:54px;grid-column:1;border:0;border-radius:5px}
.reference-compact .replace-label{font-size:10px;inset:auto 0 0;padding:3px;text-align:center;border-radius:0;background:#26352cd9}
.reference-compact .reference-info{min-width:0;display:block;margin:0;font-size:12px}
.reference-compact .reference-info>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.reference-compact #reference-expand{height:30px;width:auto;min-width:30px}
.reference-compact #match{width:auto;min-height:44px;font-size:12px;padding:8px 10px;background:transparent;color:#52634a;border:1px solid #cbd6c1}
.reference-compact #match svg,.reference-compact #palette,.reference-compact #match-hint,.reference-compact>.tip{display:none}
.reference-compact .reference-controls{border:0;margin-top:14px}
.reference-compact .reference-controls .section-title{margin:0 0 4px}
.reference-compact #applied-reference{font-size:12px;margin:4px 0 12px;line-height:1.5}
.reference-compact .reference-controls>.check-label{margin-top:4px}
.reference-compact .reference-controls>.hint:not(#applied-reference){font-size:12px;line-height:1.6;margin:4px 0 12px}
.reference-controls[hidden]{display:none!important}
.panel-footer.has-return>span{display:none}.panel-footer #tools-top{margin-right:auto;min-height:36px;font-size:13px;font-weight:600}
.tool-scroll{scroll-padding-top:12px}

@media(max-width:740px){
  .welcome h1{font-size:30px;margin:12px 0;line-height:1.3}
  .welcome p{font-size:14px;line-height:1.6;margin-bottom:16px}
  .welcome-choice{min-height:68px;padding:10px 12px;gap:10px;border-radius:10px}
  .welcome-choice strong{font-size:15px}.welcome-choice small{font-size:12px;margin-top:2px}
  .welcome-choice>svg{width:20px;height:20px}.welcome-choice>svg:last-child{width:16px;height:16px}
  .welcome-demo{margin-top:10px;min-height:36px}.welcome-formats{margin-top:10px;font-size:11px;line-height:1.7}
  .reference-compact .reference-chooser{grid-template-columns:44px minmax(0,1fr) auto;gap:8px;padding:4px}
  .reference-compact .reference-drop{width:44px;height:44px}
  .reference-compact .reference-controls{margin-top:6px}
  .reference-compact #applied-reference{margin:2px 0 8px;font-size:11px}
  .reference-compact.reference-effect-on #applied-reference{display:none}
  .reference-compact .reference-controls .control{margin-bottom:6px}
  .reference-compact .range-labels{margin-top:0;font-size:11px}
  .reference-compact .reference-controls>.check-label{min-height:36px;margin:0}
}
@media(max-width:740px) and (max-height:640px){
  .reference-selected:not(.reference-compact) .reference-drop{height:60px}
  .reference-selected:not(.reference-compact) #palette{display:none}
}
@media(max-width:359px){
  .welcome h1{font-size:28px;margin:10px 0}.welcome p{font-size:13px;margin-bottom:12px}
  .welcome-choice{padding:10px;gap:8px}.welcome-choice strong{font-size:14px}.welcome-choice small{font-size:11px}
  .welcome-choice>svg:last-child{display:none}
}
/* Short screens retain a useful canvas while tools scroll independently. */
@media(pointer:coarse) and (max-width:539px) and (max-height:520px){
  .editor.has-photo .preview-panel{flex-basis:38%;min-height:120px}
  .preview-toolbar{height:32px}.view-switch button{min-height:26px}.canvas-footer{min-height:34px}.canvas-button{min-height:30px;padding:4px 8px}
  .tool-tabs{height:42px}.panel-footer{min-height:36px}.tool-panel{padding-top:10px}
  .welcome h1{font-size:28px;margin:8px 0}.welcome p{font-size:14px;margin-bottom:12px}.welcome .eyebrow{display:none}.welcome-formats{margin-top:8px}.welcome-demo{margin-top:5px}
}
@media(pointer:coarse) and (min-width:540px) and (max-height:500px){
  .app-header{height:56px}.editor.has-photo{height:calc(100dvh - 56px);display:grid;grid-template-columns:minmax(0,1fr) min(340px,47vw)}
  .editor.has-photo .preview-panel{min-height:0}.tool-tabs{height:44px}.tool-tabs button{font-size:12px;gap:3px;flex-direction:row}.tool-tabs button svg{display:none}
  .preview-toolbar{height:36px;padding:0 8px}.workspace-label{display:none}.view-switch{margin-left:auto}
  .canvas-footer{min-height:38px;padding:3px 8px}.canvas-footer>span{display:none}.canvas-button{font-size:11px;min-height:30px;padding:5px 7px}
  .panel-footer{min-height:36px;padding:2px 10px}.panel-footer>span{display:none}.panel-footer #help{margin-left:auto}
  .tool-panel{padding:10px 14px}.has-photo .panel-heading{display:none}.crop-actions{top:0}
  .quick-actions{grid-template-columns:1fr}.reference-shortcut img,.auto-button small,.reference-shortcut>span{display:none}
  .reference-shortcut>span{display:block;font-size:0}.reference-shortcut strong{font-size:13px}
  .editor:not(.has-photo){height:calc(100dvh - 56px);display:flex}.editor:not(.has-photo) .stage{padding:20px 32px;align-items:flex-start}
  .welcome{display:block;width:100%;max-width:600px;padding:0}.welcome-art,.welcome .eyebrow,.welcome-formats{display:none}
  .welcome h1{font-size:28px;line-height:1.3;margin:0 0 10px}.welcome h1 br{display:none}.welcome p{display:none}
  .welcome .button{min-height:44px;font-size:15px}.welcome-demo{display:inline-flex;margin:0 0 0 16px;font-size:14px;min-height:44px}
  .toast{top:62px}
  .welcome-choices{max-width:none;grid-template-columns:1fr 1fr;gap:10px}
  .welcome-choice{min-height:62px;padding:8px 12px;gap:8px}.welcome-choice strong{font-size:14px}.welcome-choice small{font-size:11px}
  .welcome-choice>svg:last-child{display:none}.welcome-demo{margin:8px 0 0;min-height:32px}
}
