:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #6f5f4a;
    background: #f4e6c8;
    --surface: #fffaf0;
    --panel: #f3e9d2;
    --border: #dcc9a3;
    --accent: #8a624a;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1120px; margin: auto; padding: 16px; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
section { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 1px 3px #6f5f4a19, 0 8px 24px #6f5f4a14; }
h1 { font-size: 1.1rem; margin: 0 0 12px; }
p { font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.drop { display: grid; gap: 8px; text-align: center; padding: 20px 8px; border: 2px dashed var(--border); border-radius: 10px; background: var(--panel); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
button, input, select, .download { font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 0; background: var(--surface); }
button, .download { cursor: pointer; background: var(--panel); text-decoration: none; }
button.primary { background: var(--accent); color: #fffaf0; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible, .drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
[role=status][data-error=true] { color: #a43925; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
article { display: grid; align-content: start; gap: 8px; padding: 10px; background: var(--panel); border-radius: 10px; overflow-wrap: anywhere; }
article p { margin: 0; }
article img { width: 100%; height: 135px; object-fit: contain; background: var(--surface); }
video { display: block; width: 100%; max-height: 360px; background: #221a12; border-radius: 10px; }
video[hidden] { display: none; }
#frames { margin-top: 14px; }
@media (max-width: 680px) { main { grid-template-columns: 1fr; padding: 10px; } }
