:root {
  --bg: #f6f5f1; --panel: #ffffff; --line: #e4e1d8; --text: #1f1e1b; --muted: #6d6a62; --faint: #9a968c;
  --accent: #b5832b; --accent-bg: #f6ecd8; --up: #2f7d4f; --up-bg: #e3f1e8; --down: #b3412f; --down-bg: #f8e4e0;
  --info: #2f62a8; --info-bg: #e3ecf8; --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171a; --panel: #1f1f23; --line: #303036; --text: #ecebe6; --muted: #a3a097; --faint: #74716a;
    --accent: #e0ad55; --accent-bg: #3a2f1c; --up: #6fcf97; --up-bg: #1f3428; --down: #f08a78; --down-bg: #3d221e;
    --info: #8db4ec; --info-bg: #1e2a3b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
header.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { font-weight: 650; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.brand .coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe08a, #c8902c); display: inline-block; }
nav.main { display: flex; gap: 4px; }
nav.main a { padding: 6px 12px; border-radius: 8px; color: var(--muted); }
nav.main a.on, nav.main a:hover { background: var(--accent-bg); color: var(--text); }
.search { margin-left: auto; position: relative; }
.search input { width: 260px; }
.search .results { position: absolute; right: 0; top: 38px; width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.search .results:empty { display: none; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 20px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.metric .hint { color: var(--faint); font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-bg) 45%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .faint { color: var(--faint); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.pill.buy, .pill.ok { background: var(--up-bg); color: var(--up); }
.pill.sell, .pill.deal { background: var(--accent-bg); color: var(--accent); }
.pill.error, .pill.invalid { background: var(--down-bg); color: var(--down); }
.pill.info, .pill.new { background: var(--info-bg); color: var(--info); }
.pill.unchanged { background: var(--bg); color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
input:focus, select:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 8px; padding: 6px 12px; }
button:hover, .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 4px 8px; }
button.ghost:hover { color: var(--down); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); }
.tabs a.on { background: var(--text); color: var(--panel); border-color: var(--text); }
.tabs a .n { color: var(--faint); margin-left: 4px; font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.result { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--accent-bg); }
.row.target { flex-wrap: nowrap; }
.target input { width: 84px; padding: 3px 8px; font-size: 13px; }
.chart { width: 100%; min-height: 320px; }
.profile { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 10px; }
.profile .bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--line); position: relative; }
.profile .bar.lo { background: var(--up); } .profile .bar.hi { background: var(--accent); }
.profile-axis { display: flex; gap: 3px; font-size: 10px; color: var(--faint); }
.profile-axis span { flex: 1; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
details summary { cursor: pointer; color: var(--muted); }
footer { max-width: 1280px; margin: 0 auto; padding: 8px 24px 32px; color: var(--faint); font-size: 12px; }
.spark { vertical-align: middle; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.u-legend { font-size: 12px; }
/* auction radar additions */
.brand img { display: block; }
.hero { text-align: center; padding: 56px 16px 32px; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 34px; margin: 16px 0 8px; }
.hero .lead { font-size: 17px; color: var(--muted); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.features { max-width: 980px; margin: 24px auto; }
.btn.primary-btn, summary.primary-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.auth { max-width: 420px; margin: 40px auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.stack label.row { flex-direction: row; align-items: center; }
.error { background: var(--down-bg); color: var(--down); padding: 8px 12px; border-radius: 8px; }
.notice { border-color: var(--up); background: var(--up-bg); margin-bottom: 16px; }
.listcard { display: block; }
.listcard h3 { margin: 8px 0 4px; font-size: 16px; }
.listcard:hover { border-color: var(--accent); color: inherit; }
.listcard.locked { opacity: .7; cursor: not-allowed; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; margin: 0 0 6px; }
.pill.cat-raid { background: var(--down-bg); color: var(--down); }
.pill.cat-professions { background: var(--info-bg); color: var(--info); }
.pill.cat-farming { background: var(--up-bg); color: var(--up); }
.pill.cat-flipping { background: var(--accent-bg); color: var(--accent); }
.pill.cat-other { background: var(--bg); color: var(--muted); }
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop > .card, details.pop > form.card { position: absolute; right: 0; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
button.mini { padding: 2px 8px; font-size: 12px; }
.small { font-size: 12px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 20px; }
footer .row { margin-bottom: 4px; }
