:root { color-scheme: dark; --bg: #111; --card: #1c1c1c; --line: #333; --text: #eee; --dim: #999; --gold: #d4a648; --red: #e05555; --green: #5bbf6a; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, sans-serif; }
header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
h1 { font-size: 20px; margin: 0; color: var(--gold); }
h2 { font-size: 18px; margin: 0 0 12px; }
h2 small { color: var(--dim); font-weight: normal; }
main { max-width: 1400px; margin: 0 auto; padding: 20px; }
section { margin-bottom: 32px; }
button, .button { background: var(--gold); color: #111; border: 0; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; display: inline-block; min-height: 44px; }
button.small { padding: 6px 12px; min-height: 36px; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--red); color: #fff; }
button.big { font-size: 18px; padding: 12px 28px; margin-top: 12px; }
button:disabled { opacity: .5; cursor: default; }
input[type=password] { padding: 10px; font: inherit; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.error { color: var(--red); }
.hint { color: var(--dim); font-size: 14px; }
.machine { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--red); }
.dot.on { background: var(--green); } .dot.wait { background: var(--gold); }
.samples, .shots, .styles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 12px; }
.samples img { width: 100%; aspect-ratio: 4/5; object-fit: cover; cursor: pointer; border-radius: 6px; border: 2px solid transparent; }
.samples img:hover { border-color: var(--gold); }
.shot { position: relative; } .shot img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 6px; }
.shot span { position: absolute; left: 6px; top: 6px; background: #000a; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.style { background: var(--card); border: 2px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; text-align: center; font-size: 13px; }
.style.on { border-color: var(--gold); }
.style .pics { display: flex; gap: 4px; } .style img { width: 50%; flex: 1; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.style .src { color: var(--dim); font-size: 11px; }
.models { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.models label { display: flex; gap: 6px; align-items: center; min-height: 36px; }
.models .off { color: var(--dim); }
.grid { overflow-x: auto; }
table { border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 6px; vertical-align: top; text-align: center; }
th { background: var(--card); position: sticky; top: 0; }
td img { width: 220px; display: block; border-radius: 4px; cursor: zoom-in; }
td .meta { color: var(--dim); margin-top: 4px; }
td .fail { width: 220px; color: var(--red); font-size: 12px; text-align: left; white-space: pre-wrap; }
.views { display: flex; gap: 4px; justify-content: center; margin-bottom: 4px; }
.views button { padding: 2px 8px; min-height: 26px; font-size: 12px; background: var(--card); color: var(--text); border: 1px solid var(--line); }
.views button.on { background: var(--gold); color: #111; }
pre.log { background: #000; color: #9c9; padding: 10px; max-height: 220px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.runItem { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.runItem a { color: var(--gold); cursor: pointer; }
.zoom { position: fixed; inset: 0; background: #000e; display: grid; place-items: center; z-index: 20; cursor: zoom-out; }
.zoom img { max-width: 95vw; max-height: 95vh; }
/* scanner */
.scanner { position: fixed; inset: 0; background: #000; z-index: 30; display: flex; flex-direction: column; align-items: center; }
.scanTop { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px; }
.steps { display: flex; gap: 8px; } .steps span { padding: 4px 10px; border-radius: 14px; background: #222; font-size: 13px; }
.steps span.done { background: var(--green); color: #111; } .steps span.now { background: var(--gold); color: #111; }
.stage { position: relative; width: min(100vw, 720px); flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage video, .stage canvas { position: absolute; max-width: 100%; max-height: 100%; transform: scaleX(-1); }
.scanMsg { font-size: 24px; font-weight: 700; text-align: center; margin: 10px; color: var(--gold); min-height: 1.5em; }
.scanWarn { color: #fff; background: #a33a; padding: 4px 10px; border-radius: 6px; min-height: 1.5em; margin: 0 0 16px; }
.scanWarn:empty { background: none; }
