body { margin: 0; font-family: system-ui, sans-serif; background: #f3efe8; color: #2b2b2b; }
main { display: flex; flex-wrap: wrap; gap: 24px; padding: 16px; justify-content: center; align-items: flex-start; }
#controls { display: flex; flex-direction: column; gap: 12px; width: 300px; }
h1 { margin: 0; font-size: 1.3rem; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea, button { font: inherit; padding: 8px; }
input[type=checkbox], input[type=range] { padding: 0; }
textarea { resize: vertical; }
input[type=color] { padding: 0; height: 36px; }
button { background: #5a1a2a; color: #fff; border: 0; border-radius: 6px; cursor: pointer; }
#warn { background: #fff3cd; border: 1px solid #e0c36a; border-radius: 6px; padding: 6px 8px; font-size: .8rem; }
canvas { max-width: 100%; height: auto; width: 520px; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
#status { font-size: .8rem; line-height: 1.6; word-break: break-word; }
#status a { color: #5a1a2a; }
button:disabled { opacity: .5; cursor: wait; }
fieldset { border: 1px solid #c9bfae; border-radius: 6px; display: flex; flex-direction: column; gap: 10px; }
legend { font-size: .85rem; padding: 0 4px; }
#right { display: flex; flex-direction: column; gap: 20px; width: 520px; max-width: 100%; }
#results h2 { font-size: 1.1rem; margin: 0 0 8px; }
#results h2 small { font-weight: normal; color: #666; font-size: .75rem; }
#results h3 { font-size: .9rem; margin: 12px 0 6px; }
#results video { width: 100%; max-width: 100%; background: #000; border-radius: 6px; display: block; margin-bottom: 8px; }
#results .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#results figure { margin: 0; }
#results img { width: 100%; display: block; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
#results figcaption { margin-top: 6px; }
.btn { display: inline-block; background: #5a1a2a; color: #fff; text-decoration: none; padding: 7px 12px; border-radius: 6px; font-size: .8rem; margin-right: 6px; }
#lock { position: fixed; inset: 0; background: #f3efe8; display: flex; align-items: center; justify-content: center; z-index: 10; }
#lock[hidden], main[hidden] { display: none; }
#lockForm { display: flex; flex-direction: column; gap: 12px; width: min(320px, 90vw); }
#lockForm p { margin: 0; font-size: .9rem; }
#lockMsg { color: #a02020; font-size: .85rem; min-height: 1.2em; }
progress { width: 100%; accent-color: #5a1a2a; }
progress[hidden] { display: none; }
