:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #191c29;
  background: #f8f8fb;
  --muted: #555a70;
  --accent: #4537ce;
  --accent-dark: #3426ad;
  --line: #dddfe8;
  --surface: #fff;
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.5; }
button, input { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.shell { width: min(100% - 48px, 1056px); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); position: relative; }
.brand-mark::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: white;
  top: 8px;
  left: 8px;
  box-shadow: 7px 0 #bdb5ff, 0 7px #bdb5ff, 7px 7px white;
}
.privacy { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: .875rem; }
.lock { width: 11px; height: 9px; margin-top: 4px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; flex-shrink: 0; }
.lock::before { content: ""; position: absolute; width: 5px; height: 5px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; left: 1.5px; bottom: 6px; }

main { padding-block: clamp(44px, 7vw, 88px) 64px; }
.intro { margin-bottom: clamp(26px, 4vw, 42px); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.75rem, 7vw, 5.375rem); font-weight: 760; letter-spacing: -.068em; line-height: 1.04; overflow-wrap: anywhere; }
h1 span { color: var(--accent); }
.intro p { margin-top: 16px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
h2 { font-size: 1.13rem; line-height: 1.25; letter-spacing: -.015em; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px #2621380a; }
.source { padding: clamp(16px, 3vw, 30px); min-width: 0; }
.dropzone { min-height: 285px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 25px 15px; border: 1.5px dashed #9185cf; border-radius: 15px; background: #f8f7ff; text-align: center; transition: background .15s ease, border-color .15s ease; }
.dropzone.dragging { border-style: solid; border-color: var(--accent); background: #ece8ff; }
.drop-label { font-size: 1.125rem; font-weight: 680; }
.limits { color: var(--muted); font-size: .875rem; }
.file-art { position: relative; width: 88px; height: 57px; margin-bottom: 3px; }
.file-art span { display: block; width: 42px; height: 50px; border: 1px solid #7e6ee0; border-radius: 8px; position: absolute; top: 4px; left: 13px; transform: rotate(-13deg); background: #e6e1ff; }
.file-art span:last-child { left: 35px; top: 2px; transform: rotate(10deg); background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 9px #3725a333; }
.file-art span::before { content: ""; width: 17px; height: 2px; border-radius: 2px; background: currentColor; opacity: .9; color: #6251c3; position: absolute; left: 10px; top: 22px; box-shadow: 0 6px currentColor; }
.file-art span:last-child::before { color: #fff; }
.settings { display: flex; flex-direction: column; gap: 22px; align-self: stretch; min-width: 0; padding: clamp(22px, 4vw, 38px); border-left: 1px solid var(--line); }
.quality { display: grid; gap: 9px; }
.quality-heading, .range-labels, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quality-heading label { font-size: .94rem; font-weight: 620; }
.quality-heading output { color: var(--accent); font-size: .944rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.quality input { margin: 0; inline-size: 100%; min-block-size: 32px; accent-color: var(--accent); }
.range-labels, .conversion-note { color: var(--muted); font-size: .875rem; }
.range-labels { align-items: start; }
.range-labels span:last-child { text-align: end; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; font-weight: 670; padding: 9px 18px; text-align: center; line-height: 1.25; text-decoration: none; }
.primary { color: white; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
.primary:disabled { background: #e4e2ef; color: #5d586f; }
.settings .primary { width: 100%; margin-top: auto; }
.secondary { background: white; color: var(--accent-dark); border-color: #9185cf; }
.secondary:hover:not(:disabled) { background: #f0edff; }
.secondary:disabled { color: var(--muted); }

.selection { margin-top: 18px; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); font-size: .875rem; font-weight: 630; min-height: 44px; padding: 4px 8px; border-radius: 6px; }
.text-button:hover:not(:disabled) { background: #f0edff; }
.text-button:disabled { color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 6px 0 0; }
.file-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-block: 7px; border-top: 1px solid var(--line); }
.file-info { min-width: 0; }
.file-name { display: block; overflow-wrap: anywhere; font-weight: 610; }
.file-size { display: block; color: var(--muted); font-size: .875rem; }
.file-action { flex: 0 0 auto; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.status { color: var(--muted); margin-top: 14px; }
.status:empty { margin: 0; }
.progress-region { margin-top: 12px; }
progress { width: 100%; height: .5rem; accent-color: var(--accent); }
.results, .issues { margin-top: 18px; border: 1px solid var(--line); border-radius: 15px; padding: clamp(15px, 3vw, 24px); background: var(--surface); }
.results-heading { flex-wrap: wrap; margin-bottom: 12px; }
.issues { background: #fff9f5; color: #833d17; border-color: #e9c9b6; }
.issues ul { margin: 12px 0 0; padding-inline-start: 21px; }
.issues li { overflow-wrap: anywhere; margin-bottom: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 700px) {
  .shell { width: calc(100% - 32px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .settings { border-left: none; border-top: 1px solid var(--line); }
  .dropzone { min-height: 248px; }
}
@media (max-width: 390px) {
  .privacy { line-height: 1.2; text-align: right; }
  .header-inner { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone { transition: none; }
}
