:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #17201d; background: #f3f1ea; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, #d7eadf 0, transparent 34rem), #f3f1ea; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 68px 0 96px; }
.hero { max-width: 800px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 12px; color: #32715b; font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(46px, 7vw, 84px); font-weight: 500; line-height: .96; letter-spacing: -.04em; }
h1 span { color: #397760; }
.hero > p:last-child { max-width: 690px; margin: 24px 0 0; color: #5e6965; font-size: 18px; line-height: 1.6; }
.panel { border: 1px solid rgba(31, 60, 49, .13); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: 0 18px 60px rgba(42, 60, 50, .08); }
.workspace { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(320px, .85fr); gap: 28px; padding: 28px; }
.upload { position: relative; display: grid; min-height: 560px; place-items: center; overflow: hidden; border: 2px dashed #9eb7aa; border-radius: 16px; background: #e9eee9; cursor: pointer; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload span { display: grid; gap: 7px; text-align: center; }
.upload strong { font-size: 20px; }.upload small { color: #6b7772; }
.upload img { width: 100%; height: 100%; object-fit: contain; }
.controls { display: flex; flex-direction: column; gap: 18px; }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { color: #4f5d57; font-size: 13px; font-weight: 700; }
select { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #cbd6d1; border-radius: 10px; background: white; color: #17201d; }
.range { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.range output { color: #397760; }.range input { grid-column: 1 / -1; width: 100%; accent-color: #397760; }
.color-control { display: grid; gap: 12px; }
.color-control .range.muted { opacity: .45; }
.auto-colors { display: grid; grid-template-columns: 36px auto 1fr; align-items: center; gap: 0 9px; cursor: pointer; }
.auto-colors input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.auto-colors > span { position: relative; grid-row: 1 / 3; width: 36px; height: 21px; border-radius: 999px; background: #bdc9c3; transition: background .15s ease; }
.auto-colors > span::after { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.2); content: ""; transition: transform .15s ease; }
.auto-colors input:checked + span { background: #397760; }
.auto-colors input:checked + span::after { transform: translateX(15px); }
.auto-colors input:focus-visible + span { outline: 3px solid rgba(57,119,96,.25); outline-offset: 2px; }
.auto-colors strong { color: #324039; font-size: 13px; }.auto-colors small { grid-column: 2 / -1; color: #7a8580; font-size: 11px; font-weight: 500; line-height: 1.35; }
button, .downloads a { border: 0; border-radius: 11px; background: #1f624b; color: white; font-weight: 800; text-decoration: none; }
button { margin-top: auto; padding: 15px 18px; font-size: 16px; cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.error { margin: 0; padding: 12px; border-radius: 10px; background: #fde4e1; color: #8f2923; }
.result { padding-top: 44px; scroll-margin-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stats div { display: grid; gap: 3px; padding: 18px; border-radius: 15px; background: #213f35; color: white; }
.stats strong { font-size: 26px; }.stats span { color: #c6d8d1; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.editor-panel { margin-bottom: 18px; padding: 22px; }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.editor-heading .eyebrow { margin-bottom: 5px; }.editor-heading h2 { margin: 0; font: 500 26px Georgia, serif; }
.editor-heading > p { max-width: 520px; margin: 0; color: #64706b; line-height: 1.5; }
.editor-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 680px; overflow: hidden; border: 1px solid #cbd5d0; border-radius: 15px; background: #d8ddda; }
.toolbox { display: flex; flex-direction: column; gap: 18px; padding: 18px; border-right: 1px solid #cbd5d0; background: #f7f8f6; }
.tool-group { display: grid; gap: 9px; }.tool-group > strong, .tool-size { color: #53615b; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: #e4e9e6; }
.segmented button, .tool-grid button, .zoom-controls button { margin: 0; padding: 9px; border-radius: 8px; background: transparent; color: #44514c; font-size: 12px; }
.segmented button.selected, .tool-grid button.selected { background: white; color: #1f624b; box-shadow: 0 2px 8px rgba(34, 58, 49, .12); }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }.tool-grid button { display: grid; gap: 5px; place-items: center; min-height: 64px; border: 1px solid #d7dfdb; background: white; }
.tool-icon { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eraser-modes { grid-template-columns: 1fr 1fr; }
#eraser-options small { color: #75807b; font-size: 11px; line-height: 1.4; }
.zoom-controls { display: grid; grid-template-columns: 35px 1fr 35px; gap: 5px; align-items: center; }.zoom-controls output { text-align: center; color: #1f624b; font-weight: 800; }.zoom-controls button { border: 1px solid #d4ddd8; background: white; font-size: 16px; }.zoom-controls button:last-child { grid-column: 1 / -1; font-size: 12px; }
.tool-size { display: grid; grid-template-columns: 1fr auto; gap: 7px; }.tool-size input { grid-column: 1 / -1; }.tool-size output { color: #1f624b; }
.editor-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.palette-choice { display: grid; width: 32px; height: 32px; margin: 0; padding: 0; place-items: center; border: 3px solid white; border-radius: 50%; outline: 1px solid #bdc9c3; background: var(--swatch); color: white; font-size: 10px; text-shadow: 0 1px 3px black; box-shadow: none; }
.palette-choice.selected { outline: 3px solid #1f624b; transform: scale(1.08); }
.tool-group.muted { opacity: .42; }.tool-help { margin: auto 0 0; color: #76817c; font-size: 12px; line-height: 1.5; }
.edit-actions { display: grid; gap: 7px; }
.edit-actions button { margin: 0; padding: 11px 10px; font-size: 12px; }
.edit-actions button:last-child { border: 1px solid #cbd5d0; background: white; color: #58645f; }
.edit-actions kbd { margin-left: 5px; padding: 2px 5px; border: 1px solid rgba(255,255,255,.42); border-radius: 4px; font: inherit; font-size: 9px; }
.edit-actions button:disabled { cursor: default; opacity: .45; }
#editor-status { color: #397760; font-size: 12px; font-weight: 700; }#editor-status.failed { color: #a23b32; }
.editor-stage { position: relative; overflow: auto; max-height: 760px; padding: 18px; background-color: #bac1bd; background-image: linear-gradient(45deg, #b2bab6 25%, transparent 25%), linear-gradient(-45deg, #b2bab6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #b2bab6 75%), linear-gradient(-45deg, transparent 75%, #b2bab6 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
#editor-canvas { display: block; max-width: none; margin: 0 auto; background: white; box-shadow: 0 8px 28px rgba(34, 48, 42, .24); touch-action: none; cursor: crosshair; }
#editor-canvas[data-tool="pan"] { cursor: grab; }#editor-canvas.grabbing { cursor: grabbing; }
#editor-canvas[data-tool="eyedropper"] { cursor: copy; }
#editor-canvas[data-tool="eraser"] { cursor: cell; }
#editor-loader { position: sticky; left: 50%; bottom: 24px; width: max-content; margin: -54px auto 12px; padding: 10px 15px; border-radius: 999px; background: rgba(25, 50, 42, .92); color: white; font-size: 13px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.palette-panel h2 { margin: 0 0 14px; font: 500 21px Georgia, serif; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0; }
.downloads a { padding: 11px 16px; }
.palette-panel { padding: 20px; }.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
.swatch { display: grid; grid-template-columns: 40px 24px 1fr; align-items: center; gap: 8px; padding: 8px; border: 1px solid #e3e7e5; border-radius: 10px; }
.swatch i { width: 40px; height: 40px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; }.swatch small { display: block; color: #7c8782; }
@media (max-width: 800px) { .shell { padding-top: 38px; }.workspace, .editor-workspace { grid-template-columns: 1fr; }.toolbox { border-right: 0; border-bottom: 1px solid #cbd5d0; }.editor-heading { display: block; }.editor-heading > p { margin-top: 12px; }.upload { min-height: 360px; }.stats { grid-template-columns: 1fr 1fr; }.editor-stage { min-height: 480px; } }
