:root { --bg:#faf7f2; --card:#fff; --text:#2a2118; --muted:#7a6c5d; --accent:#b45309; --accent-t:#fff; --border:#e8dfd3; --err:#b91c1c; }
@media (prefers-color-scheme: dark) { :root { --bg:#181410; --card:#241e18; --text:#f1e9df; --muted:#a39382; --accent:#f59e0b; --accent-t:#1a1206; --border:#3a3027; --err:#f87171; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
h1 { font-size:1.4rem; margin:0; } h2 { margin-top:0; }
main, #app { max-width:760px; margin:0 auto; padding:16px; }
header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
input { font:inherit; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:var(--card); color:var(--text); min-width:0; }
button { font:inherit; padding:10px 14px; border-radius:10px; border:0; background:var(--accent); color:var(--accent-t); cursor:pointer; font-weight:600; }
button.ghost { background:transparent; color:var(--text); border:1px solid var(--border); }
button:focus-visible, input:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.add { display:flex; gap:8px; margin-bottom:12px; } .add input { flex:1; }
.tabs { display:flex; gap:8px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.tabs button { background:transparent; color:var(--muted); border:1px solid var(--border); }
.tabs button.on { background:var(--accent); color:var(--accent-t); border-color:var(--accent); }
.tabs input { flex:1; min-width:120px; }
.list { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.item { display:flex; gap:12px; background:var(--card); border:1px solid var(--border); border-radius:14px; padding:10px; }
.thumb { width:132px; height:74px; flex:none; border-radius:8px; background:var(--border) center/cover; display:block; }
.info { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.title { font-weight:600; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; color:inherit; text-decoration:none; }
.meta { color:var(--muted); font-size:.85rem; }
.actions { display:flex; gap:6px; flex-wrap:wrap; margin-top:auto; }
.actions button { padding:6px 10px; font-size:.85rem; }
.muted { color:var(--muted); } .err { color:var(--err); min-height:1.2em; }
pre { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:10px; overflow-x:auto; white-space:pre-wrap; word-break:break-all; }
dialog { max-width:min(560px,92vw); border:1px solid var(--border); border-radius:16px; background:var(--bg); color:var(--text); }
dialog::backdrop { background:rgba(0,0,0,.5); }
#toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--text); color:var(--bg); padding:10px 16px; border-radius:10px; opacity:0; pointer-events:none; transition:opacity .2s; max-width:90vw; }
#toast.on { opacity:1; }
#authForm { display:flex; flex-direction:column; gap:10px; margin-top:16px; }
@media (max-width:480px) { .thumb { width:104px; height:60px; } }
