:root{--bg: #f6f7f9;--surface: #fff;--text: #1b1f24;--muted: #5f6b7a;--border: #dde2e8;--brand: #1f4e79;--brand-text: #fff;--error: #b42318;--mark: #fff3b0;color-scheme:light dark;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}@media (prefers-color-scheme: dark){:root{--bg: #0f1419;--surface: #182029;--text: #e6e9ed;--muted: #9aa5b1;--border: #2a3542;--brand: #4b8bd0;--mark: #5a4a00}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}a{color:var(--brand);text-decoration:none}.center{min-height:100vh;display:grid;place-items:center;padding:16px}.topbar{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--border);position:sticky;top:0}.topbar nav{display:flex;gap:16px;flex-wrap:wrap;flex:1}.topbar nav a.active{font-weight:600;text-decoration:underline}.brand{font-size:1.2rem;color:var(--brand)}.who{display:flex;gap:8px;align-items:center}main{max-width:1100px;margin:0 auto;padding:16px}.card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px;margin:12px 0;color:inherit;display:block}.card.auth{width:min(400px,100%);display:flex;flex-direction:column;gap:10px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}.stat{display:flex;justify-content:space-between;align-items:center}.stat b{font-size:1.4rem}label{display:flex;flex-direction:column;gap:4px;font-size:.9rem}input,select,textarea,button,.button{font:inherit;padding:8px 10px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text)}input,textarea{width:100%}textarea{resize:vertical}button,.button{background:var(--brand);color:var(--brand-text);border-color:var(--brand);cursor:pointer;display:inline-block}button.secondary,.button.secondary{background:transparent;color:var(--brand)}button.link{background:none;border:none;color:var(--brand);padding:0}button:disabled{opacity:.6;cursor:default}.row-form{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:8px 0}.row-form input,.row-form select{width:auto;flex:1 1 160px}.row-form h3{flex-basis:100%;margin:0 0 4px}.list{list-style:none;padding:0}.list li{padding:10px 0;border-bottom:1px solid var(--border)}.table{width:100%;border-collapse:collapse;background:var(--surface);display:block;overflow-x:auto}.table th,.table td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--border);white-space:nowrap}.clickable{cursor:pointer}.clickable:hover{background:var(--bg)}.pill{font-size:.75rem;padding:2px 8px;border-radius:999px;border:1px solid var(--border);color:var(--muted)}.muted{color:var(--muted)}.small{font-size:.85rem}.error{color:var(--error)}mark{background:var(--mark);color:inherit}.links{display:flex;flex-direction:column;gap:6px;align-items:flex-start}.banner{background:var(--mark);padding:8px 16px;font-size:.9rem}.row-form textarea{flex-basis:100%}.stack{display:flex;flex-direction:column;gap:12px}.details{margin:8px 0 16px}.prewrap{white-space:pre-wrap}.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.upload textarea{margin:8px 0}.details-row td{white-space:normal;background:var(--bg)}.selected td{background:var(--bg)}.truncate{max-width:420px;overflow:hidden;text-overflow:ellipsis}.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:8px 0 4px}label.inline{flex-direction:row;align-items:center;gap:6px}label.inline input,label.inline select{width:auto}.segmented{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.segmented button{border:0;border-radius:0;background:var(--surface);color:var(--text);padding:6px 12px}.segmented button.on{background:var(--brand);color:var(--brand-text)}.filters select,.filters input{flex:0 1 auto}.group{margin:12px 0}.group-head{background:none;border:0;color:var(--text);font-weight:600;font-size:1rem;padding:6px 0;display:flex;gap:6px;align-items:center}.group-head .count{color:var(--muted);font-weight:400;font-size:.85rem;border:1px solid var(--border);border-radius:999px;padding:0 8px}.chev{width:1em;color:var(--muted)}.tiles{display:grid;gap:12px}.tiles.small{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.tiles.medium{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.tile{all:unset;box-sizing:border-box;cursor:pointer;background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden;display:flex;flex-direction:column}.tile:hover{border-color:var(--brand)}.tile:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.thumb{position:relative;aspect-ratio:4 / 3;background:var(--bg);display:grid;place-items:center;overflow:hidden}.thumb img{width:100%;height:100%;object-fit:cover}.thumb-status{position:absolute;bottom:6px;left:6px;font-size:.7rem;background:var(--surface);border-radius:6px;padding:1px 6px}.file-badge{width:56px;height:70px;border:2px solid var(--border);border-radius:6px;display:grid;place-items:end center;padding-bottom:8px;color:var(--muted);font-weight:700;font-size:.75rem;background:var(--surface)}.tile-body{padding:8px 10px 10px;display:flex;flex-direction:column;gap:3px;min-width:0}.tile-title{font-weight:600;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile-meta{color:var(--muted);font-size:.8rem}.tile-desc{font-size:.82rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tiles.small .tile-desc{-webkit-line-clamp:1}.tile-pills{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}.tiles.small .tile-pills{display:none}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:grid;place-items:center;padding:16px;z-index:10}.dialog{background:var(--surface);border-radius:12px;width:min(760px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:start}.dialog-head h3{margin:0}.preview{background:var(--bg);border-radius:8px;display:grid;place-items:center;min-height:160px}.preview img{max-width:100%;max-height:60vh;object-fit:contain}.demo-hint{border:1px dashed var(--brand);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:4px;align-items:flex-start;font-size:.9rem}.banner.demo{background:var(--brand);color:var(--brand-text)}
