/* MineDemon Homepage – Markt v2 (#market-v2-root, rendered by assets/js/market-v2.js).
   Pixel theme of v2.css: blackstone/amethyst textures, inventory slots, Minecraft item tooltips, no orange accents.
   Colours: offers/asks = crimson, buy orders/bids = green, market volume = violet. */

/* the item tooltip (.mv2-tip) is appended to <body>, outside .mv2 – it needs the colour tokens too */
.mv2, .mv2-tip {
  --mv2-ask: #fda4af;
  --mv2-ask-strong: #fb7185;
  --mv2-bid: #86efac;
  --mv2-bid-strong: #4ade80;
  --mv2-violet: #9b5cf6;
  --mv2-amethyst: #c084fc;
  --mv2-line: rgba(196, 166, 255, 0.16);
  --mv2-muted: #b3a9c9;
  --mv2-slot: rgba(0, 0, 0, 0.48);
  --mv2-slot-dark: #08050c;
  --mv2-slot-light: rgba(255, 255, 255, 0.1);
}
.mv2 {
  position: relative;
  display: grid;
  gap: 16px;
  min-width: 0;
  color: var(--v2-text, #f1edf8);
}
.mv2 *, .mv2-tip * { box-sizing: border-box; }
.mv2 img { image-rendering: pixelated; }
.mv2-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mv2-boot { margin: 0; color: var(--mv2-muted, #b3a9c9); }
.mv2 h2, .mv2 h3 { margin: 0; font-weight: 900; color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); letter-spacing: 0.01em; }
.mv2 h2 { font-size: 1.02rem; }
.mv2 h3 { font-size: 0.95rem; }
.mv2 p { margin: 0; }
.mv2 code { font-size: 0.8em; }
.mv2-muted { color: var(--mv2-muted); }
.mv2-up, .mv2 .mv2-up-title { color: var(--mv2-bid-strong); }
.mv2-down, .mv2 .mv2-down-title { color: var(--mv2-ask-strong); }
.mv2-ask { color: var(--mv2-ask); }
.mv2-bid { color: var(--mv2-bid); }
.mv2-soon { color: var(--mv2-ask-strong); }
.mv2-note, .mv2-hint, .mv2-count { color: var(--mv2-muted); font-size: 0.86rem; line-height: 1.5; }
.mv2-count { margin: 2px 0 10px !important; }
.mv2-note { padding: 8px 12px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 2px #2a2138; }

/* ---------- buttons ---------- */
.mv2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 0; color: #fff; font: inherit; font-weight: 800; font-size: 0.84rem; letter-spacing: 0.03em; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
  background: linear-gradient(rgba(36, 28, 48, 0.72), rgba(18, 14, 26, 0.85)), var(--tex-bricks) 0 0 / 40px 40px; image-rendering: pixelated;
  box-shadow: inset 0 0 0 2px #07050b, inset 4px 4px 0 rgba(255, 255, 255, 0.12), inset -4px -4px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer; transition: transform 0.1s ease, filter 0.1s ease; white-space: nowrap;
}
.mv2-btn:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-1px); }
.mv2-btn:active:not(:disabled) { transform: translateY(1px); }
.mv2-btn:disabled { opacity: 0.55; cursor: default; }
.mv2-btn-primary { background: linear-gradient(rgba(124, 58, 237, 0.58), rgba(76, 29, 149, 0.72)), var(--tex-amethyst) 0 0 / 40px 40px; box-shadow: inset 0 0 0 2px #16062a, inset 4px 4px 0 rgba(255, 255, 255, 0.24), inset -4px -4px 0 rgba(0, 0, 0, 0.32); }
.mv2-icon-btn { min-width: 40px; padding: 0 10px; }
.mv2-link-btn { padding: 4px 2px; border: 0; background: none; color: #e9d5ff; font: inherit; font-size: 0.84rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.mv2-link-btn:hover { color: #fff; }

/* ---------- top bar ---------- */
.mv2-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.mv2-status { display: inline-flex; align-items: center; gap: 10px; color: var(--mv2-muted); font-size: 0.86rem; font-weight: 700; }
.mv2-dot { width: 10px; height: 10px; flex: none; background: var(--mv2-bid-strong); box-shadow: 0 0 0 2px #07050b, 0 0 10px rgba(74, 222, 128, 0.6); animation: mv2-blink 2s steps(2, end) infinite; }
.mv2-status[data-mode="loading"] .mv2-dot { background: var(--mv2-amethyst); box-shadow: 0 0 0 2px #07050b; }
.mv2-status[data-mode="stale"] .mv2-dot { background: #8b8398; box-shadow: 0 0 0 2px #07050b; animation: none; }
.mv2-status[data-mode="error"] .mv2-dot { background: var(--mv2-ask-strong); box-shadow: 0 0 0 2px #07050b; animation: none; }
.mv2-status[data-mode="demo"] .mv2-dot { background: var(--mv2-amethyst); box-shadow: 0 0 0 2px #07050b, 0 0 10px rgba(192, 132, 252, 0.6); }
.mv2-quick { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; justify-content: flex-end; min-width: 0; }
.mv2-quick-search { flex: 0 1 340px; }

/* ---------- inputs (Minecraft chat / anvil field) ---------- */
.mv2-search {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; min-width: 0; flex: 1 1 220px;
  background: #050308; box-shadow: inset 0 0 0 2px #6b6280, inset 4px 4px 0 rgba(0, 0, 0, 0.6);
}
.mv2-search:focus-within { box-shadow: inset 0 0 0 2px #fff; }
.mv2-search input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 0.92rem; }
.mv2-search input::placeholder { color: #8b8398; }
.mv2-field { display: grid; gap: 4px; min-width: 0; }
.mv2-field > span { color: var(--mv2-muted); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.mv2-field select, .mv2-field input {
  height: 40px; min-width: 0; padding: 0 10px; border: 0; color: #fff; font: inherit; font-size: 0.9rem; color-scheme: dark;
  background: #050308; box-shadow: inset 0 0 0 2px #6b6280, inset 4px 4px 0 rgba(0, 0, 0, 0.6); outline: none;
}
.mv2-field select:focus-visible, .mv2-field input:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.mv2-field select option { background: #120d1a; color: #fff; }
.mv2-grow { flex: 1 1 200px; }

.mv2-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.mv2-form-actions { display: flex; gap: 8px; align-items: flex-end; }

/* segmented buttons (like the pill tabs of v2.css) */
.mv2-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 2px #2a2138; }
.mv2-seg button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; background: transparent; color: var(--mv2-muted);
  font: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.mv2-seg button:hover { color: #fff; background: rgba(155, 92, 246, 0.2); }
.mv2-seg button[aria-pressed="true"] { color: #fff; background: linear-gradient(rgba(124, 58, 237, 0.55), rgba(76, 29, 149, 0.65)), var(--tex-amethyst) 0 0 / 32px 32px; box-shadow: inset 0 0 0 2px #f3eefc; image-rendering: pixelated; }
.mv2-seg-sm button { min-height: 30px; padding: 0 9px; font-size: 0.76rem; }

/* ---------- tabs as hotbar ---------- */
.mv2-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; scrollbar-width: thin; background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 2px #2a2138, inset 4px 4px 0 rgba(0, 0, 0, 0.4); }
.mv2-tab {
  position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 14px;
  border: 0; color: #e6def4; font: inherit; font-weight: 900; font-size: 0.9rem; white-space: nowrap; cursor: pointer; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.42); box-shadow: inset 0 0 0 2px #2a2138, inset 3px 3px 0 rgba(0, 0, 0, 0.5); transition: background-color 0.12s ease, transform 0.12s ease;
}
.mv2-tab:hover { color: #fff; background: rgba(155, 92, 246, 0.22); transform: translateY(-1px); }
.mv2-tab.is-active { color: #fff; background: linear-gradient(rgba(124, 58, 237, 0.55), rgba(76, 29, 149, 0.6)), var(--tex-amethyst) 0 0 / 32px 32px; box-shadow: inset 0 0 0 3px #f3eefc, inset 6px 6px 0 rgba(255, 255, 255, 0.12); image-rendering: pixelated; }
.mv2-tab[aria-selected="false"].is-active { box-shadow: inset 0 0 0 3px rgba(243, 238, 252, 0.45); }
.mv2 .mc-ico { width: 20px; height: 20px; display: inline-block; }

.mv2-panel, .mv2-detail { min-width: 0; display: grid; gap: 14px; align-content: start; }
.mv2-panel[hidden], .mv2-detail[hidden] { display: none; }

/* ---------- cards ---------- */
.mv2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mv2-span-2 { grid-column: 1 / -1; }
.mv2-card {
  min-width: 0; display: grid; gap: 12px; align-content: start; padding: 16px;
  background: var(--px-card); image-rendering: pixelated; clip-path: var(--px-clip);
  box-shadow: inset 0 0 0 3px var(--v2-edge, #050308), inset 3px 3px 0 3px rgba(255, 255, 255, 0.05), inset -3px -3px 0 3px rgba(0, 0, 0, 0.4);
}
.mv2-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mv2-card-head h2, .mv2-card-head h3 { display: inline-flex; align-items: center; gap: 8px; }

/* KPI tiles = inventory slots */
.mv2-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.mv2-kpi {
  display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px 14px;
  background: var(--mv2-slot); box-shadow: inset 0 0 0 2px #2a2138, inset 4px 4px 0 rgba(0, 0, 0, 0.45), inset -2px -2px 0 rgba(255, 255, 255, 0.04);
}
.mv2-kpi .mv2-kpi-ico { width: 30px; height: 30px; margin-top: 2px; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.6)); }
.mv2-kpi-body { display: grid; gap: 2px; min-width: 0; }
.mv2-kpi-label { color: var(--mv2-muted); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.mv2-kpi-value { color: #fff; font-size: 1.22rem; font-weight: 900; line-height: 1.2; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mv2-kpi-detail { color: var(--mv2-muted); font-size: 0.78rem; line-height: 1.35; }
.mv2-kpi .mv2-delta { margin-top: 2px; }

/* lists */
.mv2-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mv2-list > li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(196, 166, 255, 0.08); }
.mv2-list > li:hover { background: rgba(155, 92, 246, 0.14); }
.mv2-rowlink { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; }
.mv2-rowlink:hover .mv2-iname-main { text-decoration: underline; }
.mv2-num { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.mv2-rank { width: 22px; flex: none; color: var(--mv2-muted); font-weight: 900; text-align: right; }
.mv2-toplist > li { padding-bottom: 9px; }
.mv2-bar { position: absolute; left: 8px; bottom: 3px; height: 3px; width: var(--mv2-w, 0%); max-width: calc(100% - 16px); background: var(--mv2-violet); box-shadow: 0 0 6px rgba(155, 92, 246, 0.5); }
.mv2-feed > li { align-items: flex-start; }
.mv2-feed-meta { margin-left: auto; text-align: right; font-size: 0.8rem; line-height: 1.4; white-space: nowrap; }
.mv2-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mv2-movers h3 { margin-bottom: 6px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.mv2-changes > li { flex-wrap: wrap; }
.mv2-when { font-size: 0.78rem; white-space: nowrap; }
.mv2-buffnerf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.mv2-buffnerf h3 { margin-bottom: 8px; }

/* delta / tags */
.mv2-delta { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 900; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.mv2-delta.is-up { color: var(--mv2-bid-strong); }
.mv2-delta.is-down { color: var(--mv2-ask-strong); }
.mv2-delta.is-flat { color: var(--mv2-muted); }
.mv2-tag, .mv2-badge, .mv2-state-tag, .mv2-source {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  background: rgba(0, 0, 0, 0.5); box-shadow: inset 0 0 0 1px currentColor; color: #e9d5ff;
}
.mv2-tag.is-buff { color: var(--mv2-bid-strong); }
.mv2-tag.is-nerf { color: var(--mv2-ask-strong); }
.mv2-badge { color: #f0abfc; }
.mv2-state-tag.is-filled { color: var(--mv2-bid-strong); }
.mv2-state-tag.is-expired { color: #b3a9c9; }
.mv2-state-tag.is-cancelled { color: var(--mv2-ask-strong); }
.mv2-state-tag.is-open { color: #e9d5ff; }
.mv2-source.is-market { color: #d8b4fe; }
.mv2-source.is-order { color: var(--mv2-bid); }
.mv2-source.is-adminshop { color: #f0abfc; }
.mv2-source.is-itemframe, .mv2-source.is-shop { color: #a5f3fc; }

/* chips (category filter) */
.mv2-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mv2-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 12px; border: 0; color: #e6def4; font: inherit; font-size: 0.84rem; font-weight: 800; cursor: pointer;
  background: var(--mv2-slot); box-shadow: inset 0 0 0 2px #2a2138, inset 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.mv2-chip:hover { box-shadow: inset 0 0 0 2px #c084fc, inset 4px 4px 0 rgba(0, 0, 0, 0.45); color: #fff; }
.mv2-chip[aria-pressed="true"] { color: #fff; background: linear-gradient(rgba(124, 58, 237, 0.5), rgba(76, 29, 149, 0.6)); box-shadow: inset 0 0 0 2px #f3eefc; }
.mv2-chip-count { padding: 0 5px; background: rgba(0, 0, 0, 0.55); color: #e9d5ff; font-size: 0.72rem; }

/* ---------- item icons ---------- */
.mv2-icon { position: relative; flex: none; display: inline-grid; place-items: center; width: var(--mv2-icon, 32px); height: var(--mv2-icon, 32px); }
/* animated block textures are vertical frame strips (16×48 … 16×512): cover + top crops them to the first frame, 16×16 stays as is */
.mv2-icon img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5)); }
.mv2-icon.is-glint::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0.55;
  background: linear-gradient(115deg, transparent 30%, rgba(192, 132, 252, 0.85) 45%, transparent 60%) 0 0 / 300% 300%;
  -webkit-mask: var(--mv2-mask, none); animation: mv2-glint 3.2s linear infinite;
}
.mv2-icon-none { background: linear-gradient(rgba(124, 58, 237, 0.55), rgba(59, 15, 110, 0.7)); box-shadow: inset 0 0 0 2px #12051f; color: #fff; font-size: calc(var(--mv2-icon, 32px) * 0.36); font-weight: 900; text-shadow: 1px 1px 0 #000; }
.mv2-ilink { color: inherit; text-decoration: none; }
.mv2-itemcell { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #fff; font-weight: 800; }
.mv2-itemcell:hover .mv2-iname-main { text-decoration: underline; }
.mv2-iname { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.mv2-iname-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv2-label { color: #d8b4fe; font-size: 0.78rem; font-style: italic; font-weight: 600; }
.mv2-player { padding: 0; border: 0; background: none; color: #e9d5ff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(233, 213, 255, 0.35); text-underline-offset: 3px; }
.mv2-player:hover { color: #fff; text-decoration-color: #fff; }
.mv2-player.is-system { color: #f0abfc; }

/* ---------- inventory grid ---------- */
.mv2-inv {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; padding: 10px;
  background: rgba(198, 198, 198, 0.06); box-shadow: inset 0 0 0 3px #050308, inset 4px 4px 0 rgba(255, 255, 255, 0.05), inset -4px -4px 0 rgba(0, 0, 0, 0.45);
}
.mv2-inv-cell { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.mv2-slot {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; text-decoration: none;
  background: #1a1422; box-shadow: inset 2px 2px 0 var(--mv2-slot-dark), inset -2px -2px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.mv2-slot:hover, .mv2-slot:focus-visible { background: #2c2338; box-shadow: inset 2px 2px 0 var(--mv2-slot-dark), inset -2px -2px 0 rgba(255, 255, 255, 0.18), 0 0 0 2px #f3eefc; outline: none; }
.mv2-slot:hover::after { content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, 0.12); pointer-events: none; }
.mv2-slot-count { position: absolute; right: 3px; bottom: 1px; color: #fff; font-size: 0.82rem; font-weight: 900; line-height: 1; text-shadow: 2px 2px 0 #3f3f3f; font-variant-numeric: tabular-nums; }
.mv2-slot-flag { position: absolute; left: 4px; top: 4px; width: 6px; height: 6px; background: var(--mv2-bid-strong); box-shadow: 1px 1px 0 #000; }
.mv2-slot-price { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7); }
.mv2-slot-price.is-ask { color: var(--mv2-ask); }
.mv2-slot-price.is-last { color: #e9d5ff; }
.mv2-slot-price.is-base { color: #8b8398; }

.mv2-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--mv2-muted); font-size: 0.78rem; }
.mv2-key { display: inline-block; width: 10px; height: 10px; margin-right: -6px; vertical-align: middle; box-shadow: 1px 1px 0 #000; }
.mv2-key.is-ask { background: var(--mv2-ask); }
.mv2-key.is-last { background: #e9d5ff; }
.mv2-key.is-base { background: #8b8398; }
.mv2-key.is-flag { background: var(--mv2-bid-strong); width: 6px; height: 6px; }
.mv2-key.is-market { background: var(--mv2-violet); }
.mv2-key.is-order { background: var(--mv2-bid-strong); }
.mv2-key.is-avg { background: #e9d5ff; height: 3px; width: 14px; }
.mv2-key.is-band { background: rgba(192, 132, 252, 0.35); }
.mv2-key.is-askline { background: repeating-linear-gradient(90deg, var(--mv2-ask-strong) 0 3px, transparent 3px 5px); height: 2px; width: 14px; }
.mv2-key.is-bidline { background: repeating-linear-gradient(90deg, var(--mv2-bid-strong) 0 3px, transparent 3px 5px); height: 2px; width: 14px; }
.mv2-key.is-baseline { background: repeating-linear-gradient(90deg, #f1edf8 0 3px, transparent 3px 5px); height: 2px; width: 14px; }
.mv2-inv-legend { margin-top: 8px; }

/* ---------- tables ---------- */
.mv2-table-wrap { min-width: 0; overflow-x: auto; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 2px #2a2138; scrollbar-width: thin; }
.mv2-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.mv2-table th {
  position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; white-space: nowrap;
  background: #0d0913; color: #e9d5ff; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(155, 92, 246, 0.45); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
}
.mv2-table td { padding: 7px 10px; vertical-align: middle; border-top: 1px solid var(--mv2-line); }
.mv2-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.mv2-table tbody tr:hover { background: rgba(155, 92, 246, 0.12); }
.mv2-table .is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv2-table time { white-space: nowrap; }
.mv2-compact td, .mv2-compact th { padding: 5px 8px; }
.mv2-parties { white-space: nowrap; }
.mv2-parties > span[aria-hidden] { margin: 0 6px; color: var(--mv2-muted); }
.mv2-progress-cell { min-width: 140px; }
.mv2-progress { display: inline-block; width: 90px; height: 10px; vertical-align: middle; background: #050308; box-shadow: inset 0 0 0 1px #3a2f48; }
.mv2-progress > span { display: block; height: 100%; background: repeating-linear-gradient(90deg, #4ade80 0 6px, #22a858 6px 8px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.mv2-progress-text { margin-left: 8px; font-size: 0.78rem; color: var(--mv2-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* order book depth bars */
.mv2-book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mv2-book-side.is-ask .mv2-book-table tbody tr { background: linear-gradient(270deg, rgba(251, 113, 133, 0.13) var(--mv2-depth, 0%), transparent var(--mv2-depth, 0%)); }
.mv2-book-side.is-bid .mv2-book-table tbody tr { background: linear-gradient(270deg, rgba(74, 222, 128, 0.12) var(--mv2-depth, 0%), transparent var(--mv2-depth, 0%)); }
.mv2-book-side.is-ask { box-shadow: inset 0 0 0 3px var(--v2-edge, #050308), inset 0 4px 0 3px rgba(251, 113, 133, 0.35); }
.mv2-book-side.is-bid { box-shadow: inset 0 0 0 3px var(--v2-edge, #050308), inset 0 4px 0 3px rgba(74, 222, 128, 0.3); }

/* ---------- pager ---------- */
.mv2-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; }
.mv2-page {
  min-width: 38px; height: 38px; padding: 0 8px; border: 0; color: #e6def4; font: inherit; font-weight: 900; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 2px #2a2138, inset 3px 3px 0 rgba(0, 0, 0, 0.5); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.mv2-page:hover:not(:disabled) { color: #fff; background: rgba(155, 92, 246, 0.25); }
.mv2-page.is-active { color: #fff; background: linear-gradient(rgba(124, 58, 237, 0.55), rgba(76, 29, 149, 0.65)), var(--tex-amethyst) 0 0 / 32px 32px; box-shadow: inset 0 0 0 2px #f3eefc; image-rendering: pixelated; }
.mv2-page:disabled { opacity: 0.4; cursor: default; }
.mv2-page-gap { color: var(--mv2-muted); padding: 0 2px; }
.mv2-more { display: flex; justify-content: center; margin-top: 12px; }
.mv2-end { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px !important; color: var(--mv2-muted); font-size: 0.84rem; }

/* ---------- states ---------- */
.mv2-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; min-height: 90px; padding: 18px; text-align: center; color: var(--mv2-muted); font-weight: 700; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 2px rgba(42, 33, 56, 0.8); }
.mv2-error { color: #fecdd3; box-shadow: inset 0 0 0 2px rgba(225, 29, 72, 0.5); }
.mv2-spinner { width: 14px; height: 14px; background: var(--mv2-amethyst); box-shadow: 0 0 0 2px #07050b; animation: mv2-spin 0.9s steps(4, end) infinite; }

/* ---------- Minecraft text boxes (price info + tooltips) ---------- */
.mv2-mcbox {
  display: grid; gap: 2px; padding: 10px 12px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.86rem; line-height: 1.45; color: #aaaaaa;
  background: rgba(16, 0, 16, 0.94); border: 2px solid; border-image: linear-gradient(180deg, #5000ff, #28007f) 1; box-shadow: 0 0 0 2px #100010;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6); overflow-wrap: anywhere;
}
.mv2-mcbox.is-old { margin-top: 10px; opacity: 0.85; }
.mv2-mcline { min-height: 1.2em; }
.mv2-mcfoot { margin-top: 6px; color: #555555; font-size: 0.76rem; }
.mv2-details { margin-top: 4px; }
.mv2-details > summary { cursor: pointer; color: #e9d5ff; font-weight: 800; font-size: 0.84rem; padding: 4px 0; }
.mv2-details > summary:hover { color: #fff; }
.mv2-details[open] > summary { margin-bottom: 8px; }

.mv2-tip {
  position: fixed; z-index: 400; max-width: min(300px, calc(100vw - 16px)); padding: 7px 10px 8px; pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.84rem; line-height: 1.4; color: #aaaaaa;
  background: rgba(16, 0, 16, 0.96); border: 2px solid; border-image: linear-gradient(180deg, #5000ff, #28007f) 1; box-shadow: 0 0 0 2px #100010, 6px 6px 0 rgba(0, 0, 0, 0.35);
  text-shadow: 2px 2px 0 #3f3f3f;
}
.mv2-tip[hidden] { display: none; }
.mv2-tip-title { color: #ffffff; font-weight: 800; }
.mv2-tip-sub { color: #5555ff; font-size: 0.78rem; margin-bottom: 3px; }
.mv2-tip-line { display: flex; justify-content: space-between; gap: 14px; }
.mv2-tip-line b { color: #fff; font-weight: 800; white-space: nowrap; }
.mv2-tip-line b.mv2-ask { color: #ff8a9a; }
.mv2-tip-line b.mv2-bid { color: #55ff55; }
.mv2-tip-dim { color: #777; font-size: 0.78rem; }
.mv2-tip-dim b { color: #bbb; }
.mv2-tip-hint { margin-top: 4px; color: #555555; font-size: 0.74rem; font-style: italic; }
.mv2-tip .mv2-delta { font-size: 0.78rem; text-shadow: none; }

/* ---------- detail ---------- */
.mv2-detail-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.mv2-detail-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mv2-detail-slot { display: grid; place-items: center; width: 76px; height: 76px; flex: none; background: #1a1422; box-shadow: inset 3px 3px 0 #08050c, inset -3px -3px 0 rgba(255, 255, 255, 0.14), 0 0 0 2px rgba(0, 0, 0, 0.6); }
.mv2-detail-title { font-size: clamp(1.3rem, 3vw, 1.75rem) !important; outline: none; overflow-wrap: anywhere; }
.mv2-detail-head p { margin-top: 4px; font-size: 0.86rem; }
.mv2-kpis-detail { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------- charts ---------- */
.mv2-chart, .mv2-daily { position: relative; min-width: 0; overflow: hidden; }
.mv2-chart { outline-offset: 2px; }
.mv2-chart:focus-visible { outline: 3px solid #fff; }
.mv2-svg { display: block; max-width: 100%; height: auto; }
.mv2-chart-summary { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px !important; color: var(--mv2-muted); font-size: 0.84rem; }
.mv2-chart-summary strong { color: #fff; }
.mv2-gridline { stroke: rgba(196, 166, 255, 0.13); stroke-width: 1; }
.mv2-axis { fill: #a39bb6; font-size: 11px; font-weight: 700; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.mv2-band { fill: rgba(192, 132, 252, 0.24); }
.mv2-avg { fill: none; stroke: #e9d5ff; stroke-width: 3; stroke-linecap: square; stroke-linejoin: miter; filter: drop-shadow(0 0 3px rgba(192, 132, 252, 0.6)); }
.mv2-avg-gap { fill: none; stroke: rgba(233, 213, 255, 0.45); stroke-width: 2; stroke-dasharray: 3 4; }
.mv2-vol-market { fill: var(--mv2-violet, #9b5cf6); }
.mv2-vol-order { fill: var(--mv2-bid-strong, #4ade80); }
.mv2-ref { stroke-width: 2; stroke-dasharray: 6 4; }
.mv2-ref.is-ask { stroke: var(--mv2-ask-strong, #fb7185); }
.mv2-ref.is-bid { stroke: var(--mv2-bid-strong, #4ade80); }
.mv2-ref.is-base { stroke: rgba(241, 237, 248, 0.55); }
.mv2-ref-label { font-size: 10px; font-weight: 900; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; paint-order: stroke; stroke: #0b0711; stroke-width: 3px; }
.mv2-ref-label.is-ask { fill: var(--mv2-ask, #fda4af); }
.mv2-ref-label.is-bid { fill: var(--mv2-bid, #86efac); }
.mv2-ref-label.is-base { fill: #e6def4; }
.mv2-cursor { fill: rgba(255, 255, 255, 0.12); }
.mv2-cursor[hidden] { display: none; }
.mv2-hit { fill: transparent; cursor: crosshair; }
.mv2-dbar .mv2-hit { cursor: default; }
.mv2-dbar:hover .mv2-hit { fill: rgba(255, 255, 255, 0.06); }

/* ---------- animations ---------- */
@keyframes mv2-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes mv2-spin { to { transform: rotate(360deg); } }
@keyframes mv2-glint { from { background-position: 100% 100%; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .mv2-dot, .mv2-spinner, .mv2-icon.is-glint::after { animation: none !important; }
  .mv2-btn, .mv2-tab { transition: none; }
}

/* ---------- responsive: container queries on the market root (its width, not the viewport, decides) ---------- */
.mv2 { container: mv2 / inline-size; }
.mv2-card { container-type: inline-size; }
.mv2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mv2-kpis-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mv2-movers, .mv2-buffnerf { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 520px) {
  .mv2-movers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 640px) {
  .mv2-buffnerf { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
@container mv2 (min-width: 1000px) {
  .mv2-kpis, .mv2-kpis-detail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@container mv2 (max-width: 900px) {
  .mv2-book { grid-template-columns: minmax(0, 1fr); }
}
@container mv2 (max-width: 700px) {
  .mv2-grid { grid-template-columns: minmax(0, 1fr); }
}
@container mv2 (max-width: 640px) {
  .mv2 { gap: 12px; }
  .mv2-quick { flex-basis: 100%; justify-content: stretch; }
  .mv2-quick-search { flex: 1 1 auto; }
  .mv2-refresh span { display: none; }
  .mv2-tab { flex: 0 0 auto; min-height: 42px; padding: 0 11px; font-size: 0.84rem; }
  .mv2-toolbar > * { flex: 1 1 calc(50% - 10px); }
  .mv2-toolbar > .mv2-search, .mv2-toolbar > .mv2-seg, .mv2-toolbar > .mv2-grow, .mv2-form-actions { flex-basis: 100%; }
  .mv2-toolbar > .mv2-icon-btn { flex: 0 0 auto; }
  .mv2-seg { justify-content: stretch; }
  .mv2-seg button { flex: 1 1 auto; justify-content: center; }
  .mv2-card { padding: 12px; }
  .mv2-kpis, .mv2-kpis-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mv2-kpi { padding: 10px; gap: 8px; }
  .mv2-kpi .mv2-kpi-ico { width: 24px; height: 24px; }
  .mv2-kpi-value { font-size: 1.02rem; }
  .mv2-inv { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 4px; padding: 6px; }
  .mv2-slot { width: 50px; height: 50px; }
  .mv2-feed-meta { white-space: normal; }
  .mv2-detail-slot { width: 60px; height: 60px; }

  /* tables become stacked cards */
  .mv2-table-wrap { overflow: visible; background: none; box-shadow: none; }
  .mv2-table, .mv2-table tbody, .mv2-table tr, .mv2-table td { display: block; width: 100%; }
  .mv2-table thead { display: none; }
  .mv2-table tbody { display: grid; gap: 8px; }
  .mv2-table tbody tr { padding: 8px 10px; background: rgba(0, 0, 0, 0.35) !important; box-shadow: inset 0 0 0 2px #2a2138; }
  .mv2-book-side.is-ask .mv2-book-table tbody tr { background: linear-gradient(270deg, rgba(251, 113, 133, 0.13) var(--mv2-depth, 0%), rgba(0, 0, 0, 0.35) var(--mv2-depth, 0%)) !important; }
  .mv2-book-side.is-bid .mv2-book-table tbody tr { background: linear-gradient(270deg, rgba(74, 222, 128, 0.12) var(--mv2-depth, 0%), rgba(0, 0, 0, 0.35) var(--mv2-depth, 0%)) !important; }
  .mv2-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .mv2-table td::before { content: attr(data-label); flex: none; color: var(--mv2-muted); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; }
  .mv2-table td[data-label="Item"] { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--mv2-line); }
  .mv2-table td[data-label="Item"]::before { display: none; }
  .mv2-table td[data-label="Item"] .mv2-itemcell { flex: 1; }
  .mv2-table .is-num { white-space: normal; }
  .mv2-progress-cell { min-width: 0; }
  .mv2-progress { width: 70px; }
}
@container mv2 (max-width: 400px) {
  .mv2-kpi-detail { font-size: 0.72rem; }
  .mv2-tab span { font-size: 0.8rem; }
}
.mv2-stack { display: grid; justify-items: end; gap: 1px; }
/* grid tracks must not grow with wide tables/charts (they scroll inside .mv2-table-wrap instead) */
.mv2, .mv2-panel, .mv2-detail, .mv2-card { grid-template-columns: minmax(0, 1fr); }
/* the two order-book sides sit next to each other only when there is room for their five columns */
.mv2-book { grid-template-columns: minmax(0, 1fr); }
@container mv2 (min-width: 1100px) {
  .mv2-book { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container mv2 (max-width: 640px) {
  .mv2-status-extra { display: none; }
}
/* stacked table cards: two label/value columns when the card is wide enough */
@container mv2 (min-width: 420px) and (max-width: 640px) {
  .mv2-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .mv2-table td[data-label="Item"], .mv2-table td[data-label="Zeit"], .mv2-table td.mv2-parties, .mv2-table td.mv2-progress-cell { grid-column: 1 / -1; }
}
@container mv2 (max-width: 640px) {
  .mv2-toolbar > .mv2-seg-view { flex: 0 0 auto; }
  .mv2-table td.mv2-opt { display: none; }
}
@container mv2 (max-width: 640px) {
  .mv2-table tbody { grid-template-columns: minmax(0, 1fr); }
  .mv2-table td { min-width: 0; flex-wrap: wrap; }
  .mv2-table td > * { min-width: 0; }
  .mv2-parties { white-space: normal; justify-content: flex-end; }
  .mv2-table td[data-label="Verkäufer → Käufer"] { flex-wrap: wrap; }
  .mv2-iname-main { white-space: normal; }
}
