:root { color-scheme: light; --ink: #172944; --muted: #57667c; --blue: #2344db; --line: #d5deea; --paper: #f1f4f9; font-family: 'Segoe UI Variable Text', 'Segoe UI', sans-serif; color: var(--ink); background: var(--paper); }
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
button, input { font: inherit; }
button, .choose { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, input:focus-visible, a:focus-visible, .choose:focus-within { outline: 3px solid #ef9b28; outline-offset: 4px; }
.masthead, main, footer { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 90px; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; display: flex; gap: 12px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: white; background: var(--blue); font-size: 1.7rem; line-height: 1; }
.local-note { color: var(--muted); font-size: .875rem; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding: 35px 0 28px; }
h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1.12; font-weight: 650; letter-spacing: -.035em; margin: 0; }
.intro p { color: var(--muted); margin: 0 0 3px; max-width: 450px; }
.workbench { background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 370px minmax(0, 1fr); overflow: hidden; }
.controls { padding: 24px; border-right: 1px solid var(--line); }
h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.section-heading, .preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.text-button { padding: 3px 0; background: none; border: 0; font-size: .875rem; font-weight: 600; color: var(--blue); }
.text-button:hover { text-decoration: underline; }
.dropzone { border: 1px dashed #92a5c1; border-radius: 7px; min-height: 205px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; background: #f7f9fd; }
.dropzone.dragging { border: 2px solid var(--blue); background: #e9efff; }
.upload-mark { color: var(--blue); font-size: 2rem; line-height: 1; margin-bottom: 9px; }
.muted, small, .hint { color: var(--muted); }
.dropzone .muted { font-size: .875rem; }
.choose { position: relative; overflow: hidden; margin: 15px 0 10px; padding: 8px 20px; background: #fff; border: 1px solid #a9b7ce; border-radius: 5px; font-weight: 600; font-size: .875rem; }
.choose input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
small { font-size: .75rem; }
.source-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 22px; min-height: 28px; font-size: .75rem; color: var(--muted); }
#source-name { overflow-wrap: anywhere; flex: 1; }
#sample { white-space: nowrap; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: .55; }
.segmented { display: flex; margin: 10px 0 19px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segmented label { flex: 1; text-align: center; font-size: .875rem; padding: 9px 3px; cursor: pointer; }
.segmented label:has(:checked) { color: var(--blue); background: #eef2ff; font-weight: 600; }
.segmented input { accent-color: var(--blue); margin-right: 3px; }
.range-label { display: flex; justify-content: space-between; font-size: .875rem; }
#padding { width: 100%; margin: 12px 0 20px; accent-color: var(--blue); }
.sizes-heading { margin-bottom: 10px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes label { font-size: .875rem; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.sizes input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.hint { font-size: .75rem; margin-bottom: 0; }
.preview { padding: 24px 28px 0; min-width: 0; display: flex; flex-direction: column; }
.stage { min-height: 306px; flex: 1; display: grid; place-items: center; background-color: #f8faff; background-image: conic-gradient(#e6ebf3 25%, transparent 0 50%, #e6ebf3 0 75%, transparent 0); background-size: 20px 20px; border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.stage.dark { background-color: #2a3548; background-image: conic-gradient(#354258 25%, transparent 0 50%, #354258 0 75%, transparent 0); }
#large-preview { width: 256px; height: auto; max-width: 100%; }
#empty-preview { text-align: center; color: #445877; padding: 20px; background: #f7f9fdeb; border-radius: 8px; }
#empty-preview p { font-weight: 600; margin: 14px 0 3px; }
#empty-preview span:last-child { font-size: .875rem; }
.empty-frame { display: inline-block; width: 48px; height: 48px; border: 2px solid #97a8c2; border-radius: 10px; box-shadow: 6px 6px 0 #dce4f0; }
.preview-caption { display: flex; justify-content: space-between; gap: 10px; font-size: .75rem; color: var(--muted); margin-top: 8px; }
.actual-sizes { display: flex; align-items: center; gap: 25px; min-height: 109px; }
.actual-sizes > span { font-size: .875rem; }
#mini-previews { display: flex; align-items: end; gap: 28px; }
.mini { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-size: .75rem; }
.mini canvas { background: #edf1f7; }
.export-bar { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; margin-top: auto; }
.export-bar strong { font-size: .875rem; }
.export-bar p { font-size: .75rem; margin: 3px 0 0; color: var(--muted); }
.primary { background: var(--blue); color: white; border: none; border-radius: 6px; padding: 12px 21px; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.primary:hover:not(:disabled) { background: #1831ac; }
.status { min-height: 25px; margin: 12px 0 28px; color: var(--muted); font-size: .875rem; }
.status.error { color: #ad2534; }
.guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 8px 0 30px; }
.guide p { margin: 9px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.7; }
footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 22px 0; gap: 20px; font-size: .75rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }
@media (max-width: 860px) { .workbench { grid-template-columns: 310px minmax(0, 1fr); } .controls { padding: 20px; } .preview { padding: 20px 20px 0; } .intro { align-items: start; } .intro p { max-width: 300px; } .export-bar { flex-direction: column; align-items: stretch; } .actual-sizes { gap: 15px; } #mini-previews { gap: 15px; } }
@media (max-width: 680px) { .masthead, main, footer { width: calc(100% - 32px); } .masthead { min-height: 70px; } .local-note { max-width: 135px; text-align: right; font-size: .75rem; } .intro { display: block; padding: 25px 0; } .intro p { margin-top: 16px; max-width: none; } .intro p br { display: none; } .workbench { grid-template-columns: 1fr; } .controls { border-right: 0; border-bottom: 1px solid var(--line); } .stage { min-height: 296px; } .guide { grid-template-columns: 1fr; gap: 24px; } footer { flex-direction: column; gap: 5px; } .preview-caption { flex-wrap: wrap; } }
