:root {
    color-scheme: dark;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    background: #10151c;
    color: #eef3f8;
    --muted: #abb7c6;
    --line: #394452;
    --accent: #a2e5d3;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 68px;
    gap: 16px;
    padding: 0 max(20px, calc((100vw - 1060px) / 2));
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; font-weight: 700; text-decoration: none; }
.mark { width: 15px; height: 23px; border-radius: 4px; border: 2px solid var(--accent); }
.download { color: var(--accent); font-size: .93rem; text-underline-offset: 4px; white-space: nowrap; }
main { width: min(100% - 32px, 920px); margin: 0 auto; }
.login {
    margin: clamp(36px, 10vh, 108px) auto 36px;
    width: min(100%, 460px);
    padding: clamp(22px, 5vw, 38px);
    background: #19222c;
    border: 1px solid var(--line);
    border-radius: 20px;
}
h1 { font-size: clamp(1.45rem, 4vw, 2rem); letter-spacing: -.035em; margin: 0; }
p { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: 10px; margin-top: 28px; }
label { font-weight: 600; }
input, button { font: inherit; border-radius: 9px; min-height: 44px; }
input { width: 100%; border: 1px solid #687588; background: #11181f; color: inherit; padding: 10px 12px; }
button { padding: 8px 16px; background: var(--accent); border: 1px solid transparent; color: #142321; font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.13); }
button:disabled { opacity: .52; cursor: default; }
button.secondary { border-color: #556372; color: #eef3f8; background: #222e3b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.feedback { margin: 12px 0 0; color: #ffc9a3; }
.feedback:empty { display: none; }
.workspace { padding: 22px 0; }
.workspace-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.status { margin: 4px 0 0; }
.viewer {
    background: #0b1015;
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: min(50dvh, 400px);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.viewer p { padding: 0 20px; text-align: center; }
.viewer img {
    display: block;
    max-width: 100%;
    max-height: max(220px, calc(100dvh - 235px));
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}
.toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
@media (max-width: 430px) {
    .workspace-header { align-items: center; }
    button { padding-inline: 12px; }
}
