:root {
  --bg: #0f1115; --panel: #181b22; --line: #2a2f3a; --text: #e6e8ee; --muted: #9aa3b2; --accent: #c23c2a; --accent2: #e8b04a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent2); }
h1, h2, h3 { margin: .2em 0 .4em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; justify-content: space-between; align-items: center; height: 54px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav a { margin-left: 16px; text-decoration: none; color: var(--muted); }
nav a:hover, nav .cartbtn { color: var(--accent2); }
.hero { padding: 28px 0 8px; }
.hero p { color: var(--muted); margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
input, select, textarea { background: #0c0e12; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; }
input[type=checkbox] { width: auto; }
.filters input[type=search] { flex: 1 1 220px; }
label { color: var(--muted); }
.count { color: var(--muted); margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--rc, #888); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.card.oos { opacity: .55; }
.imgbox { position: relative; aspect-ratio: 4/3; background: #0c0e12; display: grid; place-items: center; }
.imgbox img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 8px; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.badge.disc { left: 8px; background: var(--accent); }
.badge.new { right: 8px; background: #2f8f4e; position: static; }
.imgbox .badge.new { position: absolute; }
.badge.sold { left: 50%; transform: translateX(-50%); background: #444; top: 40%; font-size: .9rem; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1rem; }
.meta, .desc { color: var(--muted); font-size: .85rem; margin: 0; }
.rar { color: var(--rc); font-weight: 600; }
.tags span { font-size: .72rem; border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; margin-right: 4px; color: var(--muted); }
.price { margin-top: auto; }
.price strong { font-size: 1.15rem; }
.price s { color: var(--muted); margin-left: 6px; }
.r-common { --rc: #b0c3d9; } .r-uncommon { --rc: #5e98d9; } .r-rare { --rc: #4b69ff; }
.r-mythical { --rc: #8847ff; } .r-legendary { --rc: #d32ce6; } .r-immortal { --rc: #e4ae33; } .r-arcana { --rc: #ade55c; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; font: inherit; text-decoration: none; display: inline-block; margin: 4px 6px 4px 0; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { background: #444; cursor: not-allowed; }
.btn.alt { background: #2a2f3a; }
.btn.sm { padding: 3px 9px; font-size: .82rem; margin: 2px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 22px 0; }
.panel label { display: block; margin: 8px 0; }
.panel input:not([type=checkbox]), .panel textarea { width: 100%; }
.panel label.chk, .checks label { display: inline-block; margin-right: 14px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.form .wide, .form .checks, .form > div:last-child { grid-column: 1 / -1; }
details { border-top: 1px solid var(--line); padding: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
.links a { margin-right: 16px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl small { color: var(--muted); margin-left: 6px; }
.num { text-align: right; white-space: nowrap; }
.total td { font-weight: 700; }
.msg { background: #0c0e12; border: 1px solid var(--line); border-radius: 6px; padding: 10px; white-space: pre-wrap; }
.hint, .empty { color: var(--muted); }
code { background: #0c0e12; padding: 1px 5px; border-radius: 4px; }
.foot { color: var(--muted); font-size: .8rem; padding: 24px 16px 40px; text-align: center; }
#blazor-error-ui { display: none; }
.closed { text-align: center; border-color: var(--accent); }
.pastebox { display: flex; align-items: center; gap: 12px; border: 1px dashed var(--line); border-radius: 6px; padding: 10px; margin: 6px 0; }
.pastebox img { height: 80px; max-width: 120px; object-fit: contain; background: #0c0e12; border-radius: 4px; }
