:root { color-scheme: light dark; --bg: #f6f7f9; --fg: #14171c; --muted: #4a525e; --card: #fff; --line: #c9ced6; --accent: #1f5fbf; --accent-fg: #fff; --err: #a3121b; }
@media (prefers-color-scheme: dark) { :root { --bg: #111418; --fg: #eef1f5; --muted: #b3bac5; --card: #1b2027; --line: #3a424e; --accent: #5b9bf0; --accent-fg: #0b1020; --err: #ff8a8f; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
section, form { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.row label { margin: 0; }
input[type=password], select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 44px; }
input[type=password] { flex: 1; min-width: 0; }
textarea { width: 100%; resize: vertical; }
button { font: inherit; min-height: 44px; min-width: 44px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; width: 100%; margin-top: 8px; }
button:disabled { opacity: .6; cursor: progress; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang button[aria-pressed=true] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-weight: 400; min-height: 120px; border: 2px dashed var(--line); border-radius: 10px; padding: 16px; cursor: pointer; }
.drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-name { font-weight: 600; word-break: break-all; }
.hint { color: var(--muted); margin: 0; font-size: .9rem; }
#status { min-height: 1.5em; color: var(--muted); }
#status.err { color: var(--err); font-weight: 600; }
