:root { --link:#2f6bff; --bg:#f6f7fa; --card:#fff; --line:#e3e6ee; --text:#151a24; --muted:#667085; --brand:#2f6bff; --danger:#e5484d; --good:#067647; --bad:#b42318; --wait:#b54708; }
@media (prefers-color-scheme: dark) {
  :root { --link:#8fb0ff; --bg:#14171f; --card:#1c2029; --line:#2d3340; --text:#e7e9ee; --muted:#98a2b3; --good:#3ccb7f; --bad:#f97066; --wait:#fdb022; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.45 -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 16px; margin: 0; }
.statusBar { flex: 1; min-width: 260px; }
nav { display: flex; gap: 6px; }
main { padding: 12px 16px 40px; }
.view { display: none; } .view.on { display: block; }
button { font: inherit; padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--text); cursor: pointer; }
button.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button:disabled { opacity: .4; cursor: default; }
input, select { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tableWrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--card); color: var(--muted); font-weight: 500; white-space: nowrap; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.dim td { opacity: .6; }
img.thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--line); }
input.price { width: 90px; }
.tag { display: inline-block; padding: 1px 6px; margin: 0 3px 3px 0; border-radius: 10px; background: var(--line); font-size: 11px; }
small, .muted { color: var(--muted); }
.good { color: var(--good); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; } .wait { color: var(--wait); font-weight: 600; }
.warn { color: var(--bad); }
details summary { cursor: pointer; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; max-width: 760px; }
.card h2 { font-size: 15px; margin: 0 0 8px; }
.row { display: flex; gap: 8px; align-items: center; } .row.end { justify-content: flex-end; }
.stack { display: grid; gap: 8px; max-width: 360px; }
.newKey { margin: 10px 0; padding: 10px; border: 1px dashed var(--brand); border-radius: 8px; word-break: break-all; }
table.small { margin-top: 10px; font-size: 12px; }
.hidden { display: none !important; }
.modalBg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 10; padding: 16px; }
.modal { max-width: 440px; width: 100%; }
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.loginCard { width: 100%; max-width: 340px; display: grid; gap: 10px; }
.loginCard h1 { font-size: 18px; margin: 0 0 6px; }
.loginCard label { display: grid; gap: 4px; }
.err { color: var(--bad); min-height: 1em; margin: 0; }
#bids td:nth-child(2) { min-width: 170px; } #bids td:nth-child(3) { min-width: 150px; } #bids td:nth-child(6) { min-width: 140px; } #bids td:nth-child(14) { min-width: 130px; }
a.btn { display: inline-block; padding: 5px 10px; border: 1px solid var(--brand); border-radius: 7px; color: var(--brand); text-decoration: none; white-space: nowrap; }
a.btn:hover { background: var(--brand); color: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); z-index: 20; padding: 12px 16px; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
button.ghost { background: transparent; }
th button.sort { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
th button.sort.on { color: var(--text); font-weight: 600; }
th button.sort .arrow { font-size: 10px; opacity: .7; }
tr[data-row] { cursor: pointer; }
tr[data-row]:hover td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
tr.sel td { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.plate { letter-spacing: .02em; }
.est { display: inline-block; padding: 0 5px; border-radius: 8px; font-size: 10px; color: var(--wait); border: 1px solid var(--wait); }
.small { font-size: 12px; }
.newVer { color: var(--wait); font-weight: 600; }
#bids td:nth-child(1), #bids td:nth-child(2) { white-space: nowrap; }
#bids td:nth-child(4) { min-width: 170px; } #bids td:nth-child(5) { min-width: 150px; } #bids td:nth-child(8) { min-width: 140px; } #bids td:nth-child(16) { min-width: 130px; }
.drawerBg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 8; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); border-left: 1px solid var(--line); z-index: 9; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.2); }
.drawerHead { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.drawerHead h2 { flex: 1; margin: 0; font-size: 16px; }
.drawerHead h2 small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.drawerBody { overflow-y: auto; padding: 12px 16px 40px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-bottom: 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line); display: block; }
.dActions { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin-bottom: 12px; }
.dActions .row { flex-wrap: wrap; }
input.dPrice { width: 110px; }
table.kv th { width: 130px; color: var(--muted); font-weight: 500; position: static; background: none; white-space: normal; }
table.kv td { word-break: break-word; }
.pre { white-space: pre-wrap; margin: 6px 0 0; }
.card.soon { margin-top: 14px; border-style: dashed; max-width: none; }
.card.soon h3 { margin: 0 0 6px; font-size: 14px; }
.card h3 { font-size: 14px; margin: 14px 0 6px; }
.card ol { margin: 0; padding-left: 20px; } .card li { margin: 3px 0; }
.dlRow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.dlBtn { display: inline-block; padding: 12px 18px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; }
.dlBtn.disabled { opacity: .4; pointer-events: none; }
a { color: var(--link); }
