:root { --accent: #2556d9; --bg: #f5f6f8; --line: #dfe2e8; --muted: #667085; --danger: #c4321c; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: #1a1f2b; font: 15px/1.5 "Be Vietnam Pro", system-ui, sans-serif; }
header { display: flex; gap: 12px; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
header button { margin-left: auto; }
main { max-width: 960px; margin: 0 auto; padding: 20px; }
h1, h2 { margin: 0; }
h2 { font-size: 17px; }
section { margin-bottom: 24px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.error:empty { margin: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
button, input { font: inherit; }
button { padding: 6px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
button.primary, button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
.login { max-width: 360px; padding-top: 15vh; }
.login form { display: grid; gap: 10px; }
.login input { padding: 8px; border: 1px solid var(--line); border-radius: 7px; }
.drop { text-align: center; border: 2px dashed var(--line); padding: 28px 16px; }
.drop.over { border-color: var(--accent); background: #eef2fd; }
.row { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; padding: 10px; }
.row .grow { flex: 1; min-width: 0; }
.row progress { width: 100%; accent-color: var(--accent); }
.row img, .row video { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
a { color: var(--accent); overflow-wrap: anywhere; }
.library-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.item { padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.item img, .item video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--bg); }
.item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.item .actions { display: flex; gap: 8px; justify-content: space-between; }
dialog { border: 1px solid var(--line); border-radius: 10px; max-width: min(360px, 90vw); overflow-wrap: anywhere; }
dialog button { margin-right: 8px; }
