:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2c2027;
  background: #f7f3f4;
  --accent: #8f3e5f;
  --muted: #6a5660;
  --line: #e5d9de;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9f5372; outline-offset: 3px; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 13px max(18px, calc((100% - 1112px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.identity { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-weight: 750; }
.identity img { border-radius: 8px; }
main { width: min(calc(100% - 36px), 1112px); margin: clamp(32px, 5vw, 62px) auto 22px; }
h1 { margin: 0; font-size: clamp(43px, 7vw, 73px); line-height: 1.04; letter-spacing: -.065em; }
.intro { color: var(--muted); font-size: clamp(16px, 2vw, 20px); margin: 14px 0 25px; }
.workspace { display: grid; grid-template-columns: minmax(248px, 310px) minmax(0, 1fr); gap: 14px; align-items: start; }
.settings, .results { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 17px; min-width: 0; }
.drop { position: relative; display: grid; gap: 4px; text-align: center; padding: 16px 6px; border: 1px dashed #b27b91; border-radius: 10px; background: #fff3f7; cursor: pointer; }
.drop span, #status { color: var(--muted); font-size: 13px; }
.drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.drop.active, .drop:focus-within { outline: 3px solid #9f5372; outline-offset: 3px; }
.text-button { border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; padding: 10px 0; }
.color-field { display: grid; grid-template-columns: 1fr 42px 72px; align-items: center; gap: 7px; font-weight: 710; margin: 9px 0 16px; }
.color-field input { width: 42px; height: 35px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
.color-field output, .quality-field output { color: var(--muted); font-size: 14px; font-weight: 500; text-align: right; }
.quality-field { display: flex; justify-content: space-between; font-weight: 710; }
#quality { display: block; margin: 6px 0 14px; width: 100%; accent-color: var(--accent); }
.primary { display: block; width: 100%; background: var(--accent); color: white; border: 0; border-radius: 8px; padding: 11px 12px; font-weight: 750; }
.primary:disabled { background: #f0e7eb; color: var(--muted); cursor: default; }
#status { min-height: 1.2em; margin: 8px 0 0; }
#status.error, .detail.error { color: #962e38; }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; min-height: 29px; }
.archive { background: #f7e7ee; border-radius: 7px; padding: 6px 10px; font-weight: 720; text-decoration: none; }
.empty { display: grid; place-items: center; min-height: 278px; padding: 12px; text-align: center; background: #faf7f8; border-radius: 10px; margin: 0; color: var(--muted); }
.items { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.image-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.thumbnail { position: relative; height: 176px; background: #faf5f7; display: grid; place-items: center; color: var(--muted); }
.thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.card-details { padding: 9px 11px 13px; overflow-wrap: anywhere; }
.name { font-size: 14px; }
.detail { color: var(--muted); font-size: 13px; margin: 5px 0 6px; }
.download { font-size: 13px; }
footer { width: min(calc(100% - 36px), 1112px); margin: 0 auto 23px; display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.info { max-width: 770px; line-height: 1.65; }
.info h1 { font-size: 44px; }
.info section { margin: 26px 0; }
@media (max-width: 680px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .thumbnail { height: 136px; }
  .empty { min-height: 170px; }
}
