:root { color-scheme: light dark; font: 16px/1.5 system-ui, sans-serif; --fg: #213133; --detail: #4e605e; --paper: #f7f9f6; --panel: #fff; --edge: #c8d4cc; --accent: #176b57; }
@media (prefers-color-scheme: dark) { :root { --fg: #e5efea; --detail: #b0c8bf; --paper: #18231f; --panel: #202d27; --edge: #41594e; --accent: #8ed7bc; } }
body { background: var(--paper); color: var(--fg); margin: 0; }
main { max-width: 58rem; padding: clamp(1rem, 4vw, 2rem); margin: auto; }
h1 { font-size: clamp(1.75rem, 5vw, 2.65rem); margin: 0; line-height: 1.12; letter-spacing: -.04em; }
h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
p { margin: .4rem 0; }
header p, #limits, #dimensions { color: var(--detail); }
section { border: 1px solid var(--edge); background: var(--panel); padding: clamp(.7rem, 3vw, 1.1rem); border-radius: .8rem; margin-top: .85rem; }
.controls label { display: block; font-weight: 650; margin-bottom: .3rem; }
input, button, select { font: inherit; color: inherit; max-width: 100%; }
input::file-selector-button, select, button { font: inherit; background: var(--panel); color: var(--fg); border: 1px solid var(--edge); border-radius: .45rem; padding: .5rem .65rem; min-height: 2.45rem; }
button { color: var(--accent); border-color: var(--accent); font-weight: 650; cursor: pointer; }
button.secondary { color: var(--fg); border-color: var(--edge); }
button:disabled { opacity: .65; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#limits, #dimensions, #status { font-size: .9rem; }
#status:empty { display: none; }
.toolbar { display: flex; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.toolbar label { display: grid; gap: .22rem; font-size: .9rem; font-weight: 650; }
.preview { display: grid; place-items: center; min-width: 0; }
canvas { display: block; max-width: 100%; max-height: 650px; width: auto; height: auto; object-fit: contain; background: repeating-linear-gradient(135deg, #2b3d34 0 8px, #3e5147 8px 16px); }
canvas[hidden] { display: none; }
#download { margin-top: .75rem; }
footer { display: flex; flex-wrap: wrap; gap: .6rem 1rem; padding-top: .8rem; font-size: .88rem; }
a { color: var(--accent); text-underline-offset: .15em; }
