:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172b39; background: #f5f7f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
main { width: 100%; padding: 50px clamp(16px, 2vw, 32px) 24px; }
.intro { margin-bottom: 34px; }
h1 { font-size: clamp(27px, 3.4vw, 42px); letter-spacing: -1.4px; font-weight: 650; margin: 10px 0 12px; }
.intro > p:last-child { color: #657581; font-size: 15px; line-height: 1.6; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.upload-controls { display: flex; align-items: center; gap: 16px; min-width: 0; }
#image { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.upload-controls:focus-within label { outline: 3px solid #3b9e89; outline-offset: 3px; }
.button { font: inherit; font-size: 13px; font-weight: 650; border-radius: 7px; padding: 13px 19px; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 26px; white-space: nowrap; transition: background .15s; }
.secondary { background: white; border-color: #ccd6dc; }
.secondary:hover { background: #eef5f4; }
.primary { background: #156c58; color: #fff; }
.primary:hover:enabled { background: #0d5746; }
.primary:disabled { background: #dbe3e5; color: #79888f; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #3b9e89; outline-offset: 3px; }
#filename { font-size: 13px; color: #657581; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.remove-image { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: #c62828; cursor: pointer; }
.remove-image svg { stroke-width: 2.5; transform: translateY(2px); }
.remove-image:hover:enabled { color: #a31515; }
.remove-image:disabled { opacity: .5; cursor: default; }
.file-help { color: #74828c; font-size: 11px; margin: 12px 0 24px; }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.panel { background: #fff; border: 1px solid #dce3e7; border-radius: 10px; overflow: hidden; }
.panel-heading { height: 61px; border-bottom: 1px solid #e7ecef; display: flex; justify-content: space-between; align-items: center; padding: 0 21px; }
h2 { font-size: 13px; font-weight: 650; }
.badge { background: #f0f4f5; color: #73818c; font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 5px 7px; border-radius: 4px; }
.badge.ready { background: #e4f6ef; color: #156c58; }
.image-stage { min-height: 390px; background: #fcfdfd; display: flex; align-items: center; justify-content: center; }
.image-stage img { display: block; width: 100%; height: auto; }
.placeholder { text-align: center; color: #657581; padding: 20px; }
.image-symbol { display: block; font-size: 36px; color: #a6b6bd; margin-bottom: 20px; font-weight: 300; }
.placeholder p { color: #526671; font-size: 14px; font-weight: 550; margin: 10px 0; }
.placeholder small { font-size: 12px; line-height: 1.6; }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid #deebe6; border-top-color: #156c58; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
#error { padding: 14px 18px; background: #fff0ec; color: #9a372b; border: 1px solid #efcfc7; border-radius: 7px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.result-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 10px 0 40px; min-height: 38px; }
#status { font-size: 12px; color: #657581; overflow-wrap: anywhere; }
.download { color: #156c58; font-size: 12px; font-weight: 650; text-underline-offset: 4px; white-space: nowrap; }
@media (max-width: 720px) { main { padding-top: 30px; } .image-grid { grid-template-columns: 1fr; } .toolbar { align-items: stretch; flex-direction: column; } .upload-controls { justify-content: space-between; } .image-stage { min-height: 310px; } .result-footer { align-items: flex-start; flex-direction: column; gap: 0; } }
