@import url('/components/image-editor/mode-navigation.css?v=20261112-mode-tap');
@import url('/components/image-editor/landing-skeleton.css?v=20261112-mode-tap');

/* Product controls use the shared SugarCube palette. Canvas colors represent transparency. */
.ld-shell { width:min(1440px, 100%); box-sizing:border-box; margin-inline:auto; padding:clamp(24px,4vw,60px) clamp(16px,4vw,56px) 64px; }
.ld-heading { margin-bottom:clamp(20px,3vw,36px); }
.ld-heading h1 { margin:0; font:650 clamp(32px,4.2vw,60px)/1.04 var(--sc-font-display,var(--sc-font-sans)); letter-spacing:-.055em; color:var(--sc-color-ink); }
.ld-heading p { margin:12px 0 0; color:var(--sc-color-text); font:400 clamp(15px,1.3vw,19px)/1.45 var(--sc-font-sans); }
.ld-workbench { display:grid; grid-template-columns:minmax(230px,.95fr) minmax(0,2.4fr) minmax(185px,.8fr); border:1px solid var(--sc-color-border-strong); border-radius:var(--sc-radius-lg); background:var(--sc-color-surface); overflow:clip; box-shadow:var(--sc-shadow-hairline); }
.ld-form { min-width:0; padding:var(--sc-space-5); border-inline-end:1px solid var(--sc-color-border); }
.ld-form fieldset { display:flex; flex-direction:column; margin:0; padding:0; border:0; min-width:0; }
.ld-label { display:block; margin:var(--sc-space-6) 0 var(--sc-space-2); color:var(--sc-color-ink); font:600 var(--sc-font-size-sm)/1.5 var(--sc-font-sans); }
.ld-form #ld-source-label { margin-top:0; }
.ld-label small { margin-inline-start:5px; color:var(--sc-color-muted); font-weight:400; }
.ld-form .ld-drop { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--sc-space-2); box-sizing:border-box; width:100%; min-height:160px; padding:var(--sc-space-5); border:1px dashed var(--sc-color-border-strong); border-radius:var(--sc-radius-md); background:var(--sc-color-well); color:var(--sc-color-ink); font:550 var(--sc-font-size-md)/1.5 var(--sc-font-sans); cursor:pointer; }
.ld-drop small { color:var(--sc-color-muted); font-size:12px; font-weight:400; }
.ld-upload-mark { display:grid; place-items:center; color:var(--sc-color-brand-700); font:400 32px/1 var(--sc-font-sans); }
.ld-form .ld-drop:is(:focus-visible,.is-dragging):not(:disabled) { border-color:var(--sc-color-brand-600); background:var(--sc-color-selected); }
@media (hover: hover) and (pointer: fine) {
  .ld-form .ld-drop:hover:not(:disabled) { border-color:var(--sc-color-brand-600); background:var(--sc-color-selected); }
}
.ld-drop:disabled { opacity:.5; cursor:not-allowed; }
#ld-file-label { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ld-form :is(textarea, select, input) { width:100%; min-width:0; box-sizing:border-box; color:var(--sc-color-ink); background:var(--sc-color-well); border:1px solid var(--sc-color-border-strong); border-radius:var(--sc-radius-sm); font:400 var(--sc-font-size-md)/1.5 var(--sc-font-sans); }
.ld-form textarea { resize:vertical; padding:var(--sc-space-4); min-height:144px; }
.ld-form :is(select,input) { min-height:48px; padding:var(--sc-space-3); }
.ld-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--sc-space-3); }
.ld-options .ld-label { display:flex; flex-direction:column; gap:var(--sc-space-2); }
.ld-options :is(select,input) { margin-block-start:auto; }
.ld-fineprint,.ld-quote,.ld-feedback,.ld-history p { color:var(--sc-color-muted); font:400 12px/1.5 var(--sc-font-sans); }
.ld-fineprint { margin:var(--sc-space-2) 0 var(--sc-space-5); }
.ld-quote { text-align:center; margin:8px 0 0; }
.ld-feedback:not(:empty) { margin-top:12px; }
.ld-feedback[data-error] { color:var(--sc-color-danger-ink); }
.ld-form [hidden],.ld-shell [hidden] { display:none!important; }
.ld-shell #ld-submit { min-height:48px; }
.ld-shell button, .ld-layer-row button, .ld-canvas-foot .sc-button { min-height:44px; }
#ld-retry { margin-top:8px; }
.ld-editor { min-width:0; display:flex; flex-direction:column; background:var(--sc-color-well); }
.ld-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:46px; padding:8px 16px; box-sizing:border-box; border-bottom:1px solid var(--sc-color-border); }
.ld-bar h2,.ld-history h2 { margin:0; color:var(--sc-color-ink); font:600 15px/1.3 var(--sc-font-sans); }
.ld-context,.ld-canvas-foot { color:var(--sc-color-muted); font:500 12px/1.4 var(--sc-font-sans); }
.ld-stage { min-width:0; flex:1; min-height:270px; display:flex; align-items:center; justify-content:center; padding:clamp(14px,2vw,34px); background:radial-gradient(var(--sc-color-border) 1px,transparent 1px) 0 0/12px 12px; overflow:hidden; }
.ld-frame,.ld-thumb { position:relative; background-color:#e3e0dc; background-image:repeating-conic-gradient(#cecac4 0 25%,transparent 0 50%); background-size:16px 16px; }
.ld-frame { isolation:isolate; width:100%; max-width:100%; overflow:hidden; aspect-ratio:1000 / 780; box-shadow:0 6px 22px #0004; }
.ld-static,.ld-layer-img { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.ld-layer-img { inset:auto; }
.ld-canvas-foot { flex-wrap:wrap; border-top:1px solid var(--sc-color-border); border-bottom:0; font-variant-numeric:tabular-nums; }
.ld-canvas-foot .sc-button { min-height:32px; }
.ld-inspector { display:flex; flex-direction:column; min-width:0; border-inline-start:1px solid var(--sc-color-border); }
#ld-layers { padding:7px; max-height:410px; overflow:auto; }
.ld-layer-row { display:flex; align-items:center; gap:2px; padding:3px; border:1px solid transparent; border-radius:var(--sc-radius-sm); }
.ld-layer-row.is-selected { background:var(--sc-color-selected); border-color:var(--sc-color-selected-border); }
.ld-layer-row button { min-width:0; border:0; border-radius:4px; background:transparent; color:var(--sc-color-text); font:500 12px/1.3 var(--sc-font-sans); cursor:pointer; }
@media (hover: hover) and (pointer: fine) {
  .ld-layer-row button:hover { color:var(--sc-color-ink); background:var(--sc-color-control-hover); }
}
.ld-layer-select { display:flex; align-items:center; text-align:start; gap:8px; flex:1; padding:4px 1px; }
.ld-layer-select span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ld-thumb { width:32px; height:32px; object-fit:contain; border:1px solid var(--sc-color-border); border-radius:4px; flex:none; background-size:8px 8px; }
.ld-icon { display:flex; align-items:center; justify-content:center; line-height:0; padding:0; width:27px; height:36px; flex:none; }
.ld-icon svg { display:block; flex:none; width:16px; height:16px; overflow:hidden; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.ld-icon[aria-pressed=false] { opacity:.65; }
.ld-export { margin:auto 12px 0; }
.ld-inspector-note { margin:8px 12px; }
.ld-history { margin-top:32px; }
.ld-history-skeleton { display:none; grid-template-columns:repeat(auto-fill,minmax(245px,1fr)); gap:var(--sc-space-2); margin-block:var(--sc-space-3); }
.ld-history-skeleton > div { height:58px; }
.ld-history[data-loading-state="loading"] .ld-history-skeleton { display:grid; }
.ld-history header { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--sc-color-border); padding-bottom:6px; }
.ld-history h2 { font-size:20px; }
#ld-history-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(245px,1fr)); gap:8px; margin-block:12px; }
.ld-history-item { display:flex; align-items:center; gap:10px; min-height:58px; min-width:0; padding:8px 12px; border:1px solid var(--sc-color-border); border-radius:var(--sc-radius-sm); background:var(--sc-color-surface); color:var(--sc-color-ink); text-align:start; font:500 13px/1.4 var(--sc-font-sans); cursor:pointer; }
.ld-history-item[aria-pressed=true] { border-color:var(--sc-color-selected-border); }
.ld-history-item span { min-width:0; overflow-wrap:anywhere; }
.ld-history-item small { display:block; color:var(--sc-color-muted); }
.ld-shell :is(button,input,textarea,select):focus-visible { outline:2px solid var(--sc-color-focus,var(--sc-color-brand-700)); outline-offset:2px; }
.ld-state { position:absolute; inset:0; display:grid; place-items:center; margin:0; padding:20px; text-align:center; background:var(--sc-color-well); color:var(--sc-color-muted); }
.ld-guide { max-width:78ch; margin:36px 0 8px; }
.ld-guide h2 { margin:0 0 8px; color:var(--sc-color-ink); font:600 19px/1.4 var(--sc-font-sans); }
.ld-guide p { color:var(--sc-color-text); font:400 14px/1.6 var(--sc-font-sans); }
@media(max-width:1090px) and (min-width:701px) {
 .ld-workbench { grid-template-columns:250px minmax(0,1fr); }
 .ld-form { grid-row:span 2; }
 .ld-inspector { border-inline-start:0; border-top:1px solid var(--sc-color-border); }
 #ld-layers { display:grid; grid-template-columns:repeat(auto-fill,minmax(165px,1fr)); }
 .ld-export { align-self:flex-start; }
}
@media(max-width:700px) {
 .ld-shell { padding:24px 14px 48px; }
 .ld-workbench { display:flex; flex-direction:column; }
 .ld-form { padding:var(--sc-space-5) var(--sc-space-4); border-inline-end:0; border-bottom:1px solid var(--sc-color-border); }
 .ld-stage { min-height:160px; padding:16px; }
 .ld-inspector { border-inline-start:0; border-top:1px solid var(--sc-color-border); }
 .ld-icon { width:44px; height:44px; }
 .ld-bar { min-height:40px; }
 .ld-export { margin-top:5px; }
}
