:root { color-scheme: light; --bg:#f5f5f5; --panel:#fff; --ink:#000; --muted:#595959; --line:#d9d9d9; font-family:Arial,Helvetica,sans-serif; color:var(--ink); background:var(--bg); font-synthesis:none; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; min-width:300px; }
button,input { font:inherit; color:inherit; }
button { cursor:pointer; border:1px solid var(--line); border-radius:3px; background:var(--panel); }
button:hover { border-color:#999; background:#f1f1f1; }
button:disabled,fieldset:disabled button { opacity:.5; cursor:default; }
:focus-visible { outline:2px solid #000; outline-offset:3px; }
.top { min-height:60px; padding:0 32px; display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid var(--line); background:#fff; }
.identity { display:flex; align-items:center; gap:13px; font-size:.875rem; }
.identity strong { font-weight:700; letter-spacing:-.025em; }
.identity > span:last-child,.header-note { color:var(--muted); }
.header-note { font-size:.875rem; }
.divider { width:1px; height:15px; background:var(--line); }
main { display:grid; grid-template-columns:minmax(0,1fr) 360px; min-height:calc(100dvh - 60px); }
.workspace { padding:22px 32px 20px; min-width:0; display:flex; flex-direction:column; align-self:start; }
.workspace-top,.workspace-foot { display:flex; justify-content:space-between; align-items:center; gap:16px; }
h1 { font-size:2.25rem; letter-spacing:-.065em; font-weight:500; margin:0; }
.view-switch { display:flex; padding:3px; border:1px solid var(--line); border-radius:4px; background:#ebebeb; flex-shrink:0; }
.view-switch button { border-color:transparent; background:transparent; padding:5px 12px; font-size:.875rem; color:var(--muted); }
.view-switch button[aria-pressed="true"] { border-color:var(--line); background:#fff; color:#000; }
.stage { --aspect:1; position:relative; display:grid; place-items:center; padding:22px; margin:20px 0 12px; min-width:0; min-height:max(380px,calc(76dvh - 120px)); border:1px solid var(--line); background:#ededed; }
.stage canvas { display:block; width:min(100%,calc(var(--aspect) * 90dvh)); height:auto; background:#fff; image-rendering:pixelated; }
.crop-mark { position:absolute; width:10px; height:10px; pointer-events:none; border:0 solid #999; }
.tl { top:8px;left:8px;border-top-width:1px;border-left-width:1px; }.tr {top:8px;right:8px;border-top-width:1px;border-right-width:1px;}.bl {bottom:8px;left:8px;border-bottom-width:1px;border-left-width:1px;}.br {bottom:8px;right:8px;border-bottom-width:1px;border-right-width:1px;}
.empty-state { text-align:center; padding:60px 20px; max-width:440px; }
.empty-icon { width:56px; height:56px; margin:0 auto 24px; border:1px solid #b8b8b8; display:grid;place-items:center; }
.empty-icon span { width:24px;height:24px;background:linear-gradient(135deg,#000 50%,#fff 50%);border:1px solid #000; }
.empty-state h2 { font-size:1.25rem;font-weight:500;letter-spacing:-.03em; }
.empty-state p { font-size:1rem;color:var(--muted);line-height:1.5;margin:12px 0 22px; }
.empty-state button { padding:10px 18px; }
.empty-state small { display:block;margin-top:16px;font-size:.8125rem;line-height:1.5;color:var(--muted); }
.drop-message { display:none;position:absolute;inset:0;place-items:center;background:#fffffff2;color:#000;font-weight:600;pointer-events:none;z-index:1; }
.dragging .drop-message { display:grid; }
.workspace-foot { color:var(--muted);min-height:23px;font-size:.875rem; }
#source-caption { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#size-caption { white-space:nowrap;font-variant-numeric:tabular-nums; }
.sidebar { border-left:1px solid var(--line);background:#fff;padding:0 23px 14px;min-width:0; }
fieldset { border:0;padding:0;margin:0;min-inline-size:0; }
.panel { padding:17px 0;border-bottom:1px solid var(--line); }
h2 { margin:0;font-size:1rem;font-weight:600;letter-spacing:-.015em; }
.section-heading { display:flex;justify-content:space-between;align-items:center;margin-bottom:4px; }
.text-button { background:none;border-color:transparent;color:var(--muted);font-size:.875rem;padding:4px 0 4px 8px; }
.text-button:hover { background:none;border-color:transparent;text-decoration:underline;color:#000; }
.upload { width:100%;padding:11px;margin-top:10px;text-align:left;display:flex;align-items:center;gap:11px;border-style:dashed; }
.upload .plus { display:grid;place-items:center;flex:0 0 32px;height:32px;font-size:1.35rem;border:1px solid var(--line);border-radius:2px; }
.upload strong,.upload small { display:block; }.upload strong { font-size:.875rem;font-weight:600; }.upload small { font-size:.8125rem;margin-top:4px;color:var(--muted); }
.slider-row { display:grid;grid-template-columns:1fr 76px;align-items:center;gap:0 9px;margin:12px 0 16px;font-size:.875rem; }
.slider-row label { grid-column:1/-1;margin-bottom:5px; }
input[type=range] { accent-color:#000;cursor:ew-resize;margin:0;min-width:0;width:100%;height:20px; }
.number,.color-field { display:flex;align-items:center;border:1px solid var(--line);background:#fff;min-width:0;height:32px; }
.number input { width:100%;min-width:0;appearance:textfield;border:0;outline:0;background:none;padding:5px 7px;text-align:right;font-size:.875rem;font-variant-numeric:tabular-nums; }
input::-webkit-inner-spin-button,input::-webkit-outer-spin-button { appearance:none;margin:0; }
.suffix span { padding-right:7px;color:var(--muted);font-size:.8125rem; }
.line { display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:46px;font-size:.875rem; }
.line .number { width:94px; }
.color-field { gap:5px;padding:3px 6px; }
.color-field input[type=color] { background:none;border:0;width:23px;height:24px;padding:0;cursor:pointer; }
.color-field input[type=text] { width:8ch;font: .875rem ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;border:0;padding:0;outline:none; }
.help,.status,.local-note { color:var(--muted);font-size:.875rem;line-height:1.45;margin:9px 0 0; }
.status.error { color:#b42318; }
.export-panel { border:0; }.export-panel h2 {margin-bottom:5px;}
button.primary { background:#000;color:#fff;border-color:#000; }button.primary:hover {background:#333;border-color:#333;}
.download {width:100%;padding:11px 8px;font-size:.875rem;font-weight:600;margin-top:12px;}
.local-note {border-top:1px solid var(--line);padding:14px 0;font-size:.8125rem;}
@media(max-width:1000px) {.top{padding-inline:20px}.workspace{padding-inline:20px}main{grid-template-columns:minmax(0,1fr) 316px}.sidebar{padding-inline:16px}.workspace-top{align-items:flex-start;flex-direction:column;gap:12px}h1{font-size:2rem}}
@media(max-width:680px) {main{display:block}.top{padding-inline:14px;min-height:54px}.header-note{display:none}.workspace{padding:16px 14px 15px}h1{font-size:1.875rem}.workspace-top{flex-direction:row;align-items:center;flex-wrap:wrap}.stage{padding:14px;min-height:360px;margin-top:12px}.empty-state{padding:40px 8px}.sidebar{border-left:0;border-top:1px solid var(--line);padding-inline:15px}.workspace-foot{font-size:.8125rem;gap:8px}}

input[type=range] { appearance:none; -webkit-appearance:none; background:transparent; }
input[type=range]::-webkit-slider-runnable-track { height:2px; background:linear-gradient(to right,#000 var(--filled,50%),#d9d9d9 var(--filled,50%)); }
input[type=range]::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:11px; height:11px; border-radius:50%; background:#000; margin-top:-4.5px; }
input[type=range]::-moz-range-track { height:2px; background:#d9d9d9; }
input[type=range]::-moz-range-progress { height:2px; background:#000; }
input[type=range]::-moz-range-thumb { border:0; width:11px; height:11px; border-radius:50%; background:#000; }
