/* ============================================================ Tokens */

:root {
  --bg: #07080a;
  --bg-glow: rgba(245, 177, 76, 0.07);
  --surface: #0e1014;
  --surface-2: #14171c;
  --surface-3: #1b1f26;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.12);
  --highlight: rgba(255, 255, 255, 0.045);
  --text: #eef1f5;
  --text-2: #b4bcc8;
  --muted: #7a8391;
  --faint: #4a515c;
  --accent: #f5b14c;
  --accent-2: #ffd27d;
  --accent-ink: #1a1307;
  --up: #3ddc97;
  --down: #ff6b6b;
  --up-tint: rgba(61, 220, 151, 0.12);
  --down-tint: rgba(255, 107, 107, 0.12);
  --series-1: #f5b14c;
  --series-2: #7aa7ff;
  --series-3: #8b94a3;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 var(--highlight) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f3;
    --bg-glow: rgba(217, 138, 20, 0.08);
    --surface: #ffffff;
    --surface-2: #f4f4f1;
    --surface-3: #ebebe6;
    --hairline: rgba(20, 22, 26, 0.08);
    --hairline-strong: rgba(20, 22, 26, 0.14);
    --highlight: rgba(255, 255, 255, 0.9);
    --text: #121418;
    --text-2: #3c434d;
    --muted: #6b7380;
    --faint: #a3aab4;
    --accent: #d98a14;
    --accent-2: #f0a93a;
    --accent-ink: #ffffff;
    --up: #0f9d63;
    --down: #d93d3d;
    --up-tint: rgba(15, 157, 99, 0.1);
    --down-tint: rgba(217, 61, 61, 0.1);
    --series-1: #d98a14;
    --series-2: #3a6fd8;
    --series-3: #8b94a3;
    --shadow: 0 1px 2px rgba(20, 22, 26, 0.05), 0 16px 40px -20px rgba(20, 22, 26, 0.18);
    color-scheme: light;
  }
}

/* ============================================================ Base */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.5 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 520px at 50% -180px, var(--bg-glow), transparent 70%),
    var(--bg);
}

a { color: inherit; }
img { display: block; }
code { font-family: var(--mono); font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); }
s { text-decoration-thickness: 1px; }

.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ============================================================ Top bar */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(20px, calc((100vw - 1240px) / 2));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; color: var(--text-2); }
.brand strong { color: var(--text); font-weight: 600; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path d='M8 21l5-6 4 4 7-9' stroke='%231a1307' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 100% no-repeat,
    linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 18px -6px var(--accent);
}

nav {
  display: flex; gap: 2px; padding: 3px; overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--hairline); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent);
}
nav::-webkit-scrollbar { display: none; }
nav a {
  padding: 6px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color 0.15s, background 0.15s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 0 var(--highlight) inset; }

.user { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13.5px; color: var(--text-2); }
.refresh-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--hairline-strong); background: var(--surface-2);
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  font-variant-numeric: tabular-nums; box-shadow: 0 1px 0 var(--highlight) inset; transition: border-color 0.15s, color 0.15s;
}
.refresh-pill:hover { color: var(--text); border-color: var(--faint); }
.refresh-pill:disabled { cursor: progress; color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.refresh-pill svg { width: 14px; height: 14px; color: var(--accent); }
.refresh-pill.spinning svg { animation: spin 0.9s linear infinite; }
.user img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--hairline-strong), 0 0 0 3px var(--bg); }

/* ============================================================ Layout */

main { max-width: 1240px; margin: 0 auto; padding: 36px 20px 64px; }
.footer { max-width: 1240px; margin: 0 auto; padding: 0 20px 40px; color: var(--faint); font-size: 12px; }

.stack > * + * { margin-top: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.09em; }

.card {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 100%, transparent), var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; }
.card p + p { margin-top: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }

/* ============================================================ Hero (portfolio) */

.hero { padding: 26px 26px 18px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 240px at 0% 0%, var(--bg-glow), transparent 70%);
}
.hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.hero-value {
  margin-top: 8px; font-size: 60px; line-height: 1; font-weight: 600; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.hero-value .dec { font-size: 0.5em; letter-spacing: -0.02em; color: var(--muted); font-weight: 500; }
.hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; align-items: center; gap: 8px; }
.hero .chart { margin-top: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.chip.up { background: var(--up-tint); color: var(--up); }
.chip.down { background: var(--down-tint); color: var(--down); }
.chip-lg { padding: 5px 11px; font-size: 13.5px; }

/* ============================================================ Stats strip */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 16px 0; padding: 0; overflow: hidden;
}
.stat { padding: 18px 20px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat .value { margin-top: 8px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub { margin-top: 4px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .sub a { text-decoration: none; color: var(--text-2); }
.stat .sub a:hover { color: var(--accent); }

/* ============================================================ Controls */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--hairline-strong); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 0 var(--highlight) inset; transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--faint); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  height: 44px; padding: 0 20px; border: 0; font-weight: 600; color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 30px -10px var(--accent);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--accent-2), var(--accent)); filter: brightness(1.06); }
.btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

input[type="search"], input[type="text"] {
  height: 36px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 0 12px; min-width: 220px;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.cost-input {
  width: 96px; height: 32px; padding: 0 10px; text-align: right;
  font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 8px; transition: border-color 0.15s, background 0.15s;
}
tr:hover .cost-input, .cost-input:focus { background: var(--surface-2); border-color: var(--hairline-strong); }
.cost-input::placeholder { color: var(--text-2); }
.cost-input.missing { border: 1px dashed var(--faint); }
.cost-input.missing::placeholder { color: var(--faint); }
.cost-input.saved { border-color: var(--up); }
.cost-hint { font-size: 11px; color: var(--faint); margin-top: 2px; padding-right: 11px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface-2); }
.seg button {
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: transparent; border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--highlight) inset, 0 1px 2px rgba(0, 0, 0, 0.25); }

/* ============================================================ Tables */

.table-card { padding: 6px 0 0; }
.table-card .card-head { padding: 14px 20px 6px; margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th {
  position: sticky; top: 0;
  color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  text-align: left; white-space: nowrap; user-select: none; border-bottom: 1px solid var(--hairline);
}
th.num { text-align: right; }
th[data-sort] { cursor: pointer; }
th[data-sort]:hover { color: var(--text); }
th.sorted { color: var(--text); }
th.sorted::after { content: " ↓"; color: var(--accent); }
th.sorted.asc::after { content: " ↑"; }
td { border-bottom: 1px solid var(--hairline); }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-3) 55%, transparent); }
tbody tr:last-child td { border-bottom: 0; }

.item-cell { display: flex; align-items: center; gap: 14px; min-width: 240px; }
.thumb {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface-2));
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.thumb img { width: 40px; height: 40px; object-fit: contain; }
.item-cell a { text-decoration: none; font-weight: 500; color: var(--text); }
.item-cell a:hover { color: var(--accent); }
.item-cell .meta { display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 500; color: var(--muted); background: var(--surface-2); box-shadow: 0 0 0 1px var(--hairline) inset;
}
.badge.owned { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent) inset; }
.gain { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.gain strong { font-weight: 500; }

/* ============================================================ Charts */

.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--mono); }
.chart .hover-line { stroke: var(--hairline-strong); stroke-width: 1; }
.chart .ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.7; }
.chart .ref-label { fill: var(--text-2); font: 500 11px var(--font); }
.chart .ref-pill { fill: var(--surface-3); stroke: var(--hairline-strong); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.tooltip {
  position: fixed; z-index: 20; pointer-events: none; min-width: 170px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-strong); border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  padding: 10px 12px; font-size: 12.5px;
}
.tooltip .t { color: var(--muted); margin-bottom: 6px; font-size: 11.5px; }
.tooltip .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; }
.tooltip .row + .row { margin-top: 3px; }
.tooltip .row span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.tooltip .row i { width: 7px; height: 7px; border-radius: 50%; }

/* ============================================================ Store */

.section-title { margin: 8px 0 14px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.09em; }
.drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 28px; }
.drop { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s; }
.drop:hover { transform: translateY(-2px); border-color: var(--hairline-strong); }
.drop-art {
  position: relative; height: 180px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 12%, var(--surface-3)), var(--surface-2) 72%);
  border-bottom: 1px solid var(--hairline);
}
.drop-art img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45)); }
.drop-timer { position: absolute; top: 12px; right: 12px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px); color: var(--text); box-shadow: 0 0 0 1px var(--hairline-strong) inset; }
.drop-timer::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--down); box-shadow: 0 0 8px var(--down); margin-right: 3px; }
.drop-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.drop-name { font-weight: 500; }
.drop-name a { text-decoration: none; }
.drop-name a:hover { color: var(--accent); }
.drop-price { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.drop-price .dec { font-size: 0.6em; color: var(--muted); font-weight: 500; }
.drop-price s { font-size: 14px; font-weight: 400; }
.drop-market { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.drop-sales { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.drop-sales strong { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.drop-progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.drop-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--down)); }
.drop-dates { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.drop-link { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.drop-link:hover { color: var(--text); }

/* Selection for the Steam cart */
.pick {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--hairline-strong); color: transparent;
  background: color-mix(in srgb, var(--bg) 65%, transparent); backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pick svg { width: 15px; height: 15px; }
.pick:hover { border-color: var(--accent); color: var(--muted); }
.pick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick-sm { position: static; width: 24px; height: 24px; background: var(--surface-2); backdrop-filter: none; }
.drop:has(.pick[aria-pressed="true"]) { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow); }

.cart-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 15; transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px)); padding: 10px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--hairline-strong); border-radius: 18px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
  animation: rise 0.25s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }
.cart-main { display: flex; align-items: center; gap: 8px; }
.cart-summary {
  flex: 1; display: flex; align-items: baseline; gap: 12px; min-width: 0; padding: 6px 8px;
  font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left;
}
.cart-summary strong { font-weight: 600; }
.cart-summary span:nth-child(2) { font-variant-numeric: tabular-nums; color: var(--text-2); }
.cart-summary .muted { margin-left: auto; font-size: 12.5px; }
.cart-bar .btn-primary { height: 38px; }
.cart-hint { padding: 8px 8px 2px; font-size: 12px; color: var(--muted); }
.cart-hint a { color: var(--accent); }
.cart-list { display: none; max-height: 260px; overflow-y: auto; margin-bottom: 8px; border-bottom: 1px solid var(--hairline); }
.cart-bar.open .cart-list { display: block; }
.cart-row { display: grid; grid-template-columns: auto 1fr auto 80px; align-items: center; gap: 12px; padding: 6px 8px; }
.cart-row .thumb { width: 36px; height: 36px; border-radius: 9px; }
.cart-row .thumb img { width: 30px; height: 30px; }
.cart-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--hairline-strong); border-radius: 8px; overflow: hidden; }
.stepper button { width: 26px; height: 26px; border: 0; background: var(--surface-3); color: var(--text); cursor: pointer; font: inherit; }
.stepper span { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
#store-page:has(.cart-bar) { padding-bottom: 120px; }

.cart-help { margin-top: 16px; }
.cart-help ol { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }
.cart-help li + li { margin-top: 8px; }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 6px; padding: 5px 12px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 13px; color: var(--accent-ink); cursor: grab;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}
.bookmarklet svg { width: 14px; height: 14px; }

details.permanent summary { list-style: none; cursor: pointer; }
details.permanent summary::-webkit-details-marker { display: none; }
details.permanent[open] summary .muted:last-child { visibility: hidden; }
details.permanent:not([open]) { padding-bottom: 6px; }

/* ============================================================ Misc */

.empty, .loading { color: var(--muted); padding: 48px 20px; text-align: center; }
.loading::before {
  content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 12px;
  border: 2px solid var(--hairline-strong); border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border-radius: 12px; padding: 11px 14px; margin-bottom: 16px; color: var(--text-2); font-size: 13.5px;
}
.notice::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.notice.error { border-color: color-mix(in srgb, var(--down) 35%, transparent); background: color-mix(in srgb, var(--down) 7%, var(--surface)); }
.notice.error::before { background: var(--down); box-shadow: 0 0 10px var(--down); }

/* Login */
.login { max-width: 460px; margin: 12vh auto 0; text-align: center; padding: 44px 36px; overflow: hidden; }
.login::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, var(--bg-glow), transparent);
}
.login .brand-mark { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 22px; position: relative; }
.login h1 { position: relative; font-size: 30px; line-height: 1.15; margin: 0 0 10px; font-weight: 600; letter-spacing: -0.035em; }
.login p { position: relative; color: var(--muted); margin: 0 0 26px; }
.login .notice { text-align: left; }
.login .fine { margin: 18px 0 0; font-size: 12px; color: var(--faint); }

/* Item page */
.item-hero { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; padding: 24px; }
.item-art {
  width: 220px; height: 220px; border-radius: 16px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 14%, var(--surface-3)), var(--surface-2) 70%);
  box-shadow: 0 0 0 1px var(--hairline) inset;
}
.item-art img { width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.45)); }
.item-hero h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.035em; }
.item-hero .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; color: var(--muted); }
.item-price { margin-top: 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.item-price .big { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.item-price .big .dec { font-size: 0.55em; color: var(--muted); font-weight: 500; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 20px; border-top: 1px solid var(--hairline);
}
.facts div { padding: 12px 14px 0 0; }
.facts span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.facts strong { display: block; margin-top: 3px; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.back { display: inline-flex; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--text); }

/* Settings */
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings .wide { grid-column: 1 / -1; }
.settings p { color: var(--text-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
code.url { display: block; padding: 12px 14px; border-radius: 10px; word-break: break-all; font-size: 12px; line-height: 1.6; background: var(--surface-2); box-shadow: 0 0 0 1px var(--hairline) inset; }

/* Some Steam icons ship with an opaque dark square: blend it into the tile in the dark theme. */
.thumb img, .drop-art img, .item-art img { mix-blend-mode: lighten; }
@media (prefers-color-scheme: light) {
  .thumb img, .drop-art img, .item-art img { mix-blend-mode: normal; }
}

/* ============================================================ Responsive */

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
  .settings { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  nav { order: 3; width: 100%; }
  .user .user-name { display: none; }
  .refresh-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: 24px 16px 48px; }
  .hero { padding: 20px 18px 12px; }
  .hero-value { font-size: 44px; }
  .page-head h1 { font-size: 26px; }
  .item-hero { grid-template-columns: 1fr; padding: 18px; }
  .item-art { width: 100%; height: 200px; }
  .hide-sm { display: none; }
  input[type="search"] { min-width: 0; width: 100%; }
  .toolbar { width: 100%; }
  .cart-main { flex-wrap: wrap; }
  .cart-summary { flex-basis: 100%; }
  .cart-main .btn { flex: 1; justify-content: center; }
}
