:root{--gap:14px;--radius:16px;--maxw:1200px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu}
*{box-sizing:border-box}
body{margin:0;background:#0f1115;color:#e9eaee}
a{color:#8ab4ff;text-decoration:none}
.container{max-width:var(--maxw);margin:0 auto;padding:18px}
header h1{margin:6px 0 2px;font-size:28px}
.muted{opacity:.8}
.toolbar{display:flex;gap:var(--gap);flex-wrap:wrap;margin:12px 0}
.toolbar input,.toolbar select,.btn{padding:10px 12px;border-radius:10px;border:1px solid #2a2f3a;background:#151924;color:#e9eaee}
.filter-line { display:flex; align-items:center; gap:.5rem; user-select:none; }
.badge.qty { font-weight:700; }
.badge.value { font-variant-numeric: tabular-nums; }
.edit-row { display:flex; gap:.75rem; margin-top:.5rem; }
.edit-row label { display:flex; flex-direction:column; font-size:.9rem; gap:.25rem; }
.edit-row input { padding:.35rem .5rem; }
.btn{cursor:pointer}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:var(--gap);padding-bottom:16px}
.card{background:#141821;border:1px solid #2a2f3a;border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.thumb{aspect-ratio:1/1;background:#0c0f14;display:flex;align-items:center;justify-content:center}
.thumb img{max-width:100%;max-height:100%;display:block}
.meta{padding:12px 12px 14px}
.title{display:flex;justify-content:space-between;gap:8px}
.title h3{font-size:16px;margin:0;line-height:1.25}
.badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.badge{font-size:12px;border:1px solid #2a2f3a;border-radius:999px;padding:4px 8px}
.badge.owned{border-color:#1e8e3e}
.badge.wanted{border-color:#c99100}
.loadmore-wrap{display:flex;justify-content:center;padding:8px 0 28px}
.foot{border-top:1px solid #2a2f3a}
.empty{opacity:.8;padding:24px;text-align:center;border:1px dashed #2a2f3a;border-radius:12px}
.viewtoggle .btn{padding:10px 12px;border-radius:10px;border:1px solid #2a2f3a;background:#151924;color:#e9eaee}
.viewtoggle .btn.active{outline:2px solid #2a2f3a}
.tablelist{width:100%;border-collapse:collapse;background:#141821;border:1px solid #2a2f3a;border-radius:12px;overflow:hidden}
.tablelist th,.tablelist td{padding:10px;border-bottom:1px solid #2a2f3a;text-align:left}
.tablelist tr:hover{background:#1a1f2a}
.badge.owned{border-color:#1e8e3e}
.badge.wanted{border-color:#c99100}