/* Native Vice Market (vice-market-native.js): Viceberg's own layout, colours and type. One scroll. On desktop the trade
   panel stays beside the chart as you scroll; on a phone Buy and Sell are pinned above the tab bar. */
.vmn { --vmn-card: rgba(18, 16, 25, .72); --vmn-line: rgba(211, 193, 238, .14); --vmn-soft: rgba(211, 193, 238, .07); --vmn-mute: #bab0c5; --vmn-ink: #faf6ff; --vmn-up: #a48bff; --vmn-down: #ff5b8f;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; color: var(--vmn-ink); }
.vmx-desk:has(.vmn) { min-height: 0; }
.vmn-main { display: grid; gap: 18px; min-width: 0; }
.vmn-muted { margin: 0; color: var(--vmn-mute); }
.vmn-small { font-size: .78rem; }

.vmn-head { display: flex; align-items: center; gap: 16px; }
.vmn-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--vmn-line), 0 10px 30px rgba(120, 80, 220, .25); }
.vmn-id h3 { margin: 0; font-size: 1.55rem; letter-spacing: -.02em; }
.vmn-id span { color: var(--vmn-mute); font-size: .85rem; }
.vmn-quote { display: grid; justify-items: end; gap: 4px; margin-left: auto; text-align: right; }
.vmn-quote b { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vmn-quote span { padding: 3px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.vmn-quote .is-up { color: var(--vmn-up); background: rgba(164, 139, 255, .1); }
.vmn-quote .is-down { color: var(--vmn-down); background: rgba(255, 91, 143, .1); }

.vmn-chart-card { padding: 14px 14px 8px; border: 1px solid var(--vmn-line); border-radius: 22px; background: linear-gradient(180deg, rgba(177, 140, 255, .06), transparent 40%), var(--vmn-card); }
.vmn-chart-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.vmn-seg { display: inline-flex; padding: 3px; border: 1px solid var(--vmn-soft); border-radius: 999px; background: rgba(9, 13, 26, .6); }
.vmn-seg button { padding: 6px 12px; border: 0; border-radius: 999px; background: none; color: var(--vmn-mute); font-family: inherit; font-size: .78rem; font-weight: 600; line-height: 1; cursor: pointer; }
.vmn-seg button[aria-pressed="true"] { background: rgba(177, 140, 255, .2); color: var(--vmn-ink); }
.vmn-seg button:disabled { opacity: .4; cursor: default; }
.vmn-seg button:focus-visible, .vmn-trade button:focus-visible, .vmn-phone-bar button:focus-visible { outline: 2px solid #b18cff; outline-offset: 2px; }
.vmn-chart { height: 380px; }
.vmn-chart-note { margin: -200px 0 180px; color: var(--vmn-mute); text-align: center; pointer-events: none; }

.vmn-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vmn-stats div { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--vmn-soft); border-radius: 16px; background: var(--vmn-card); }
.vmn-stats span { color: var(--vmn-mute); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
.vmn-stats b { font: 700 1.05rem/1 ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }

.vmn-trades h4 { margin: 4px 0 10px; font-size: 1rem; }
.vmn-trade-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.vmn-trade-list li { display: grid; grid-template-columns: minmax(0, 1fr) 56px 96px 44px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: .88rem; }
.vmn-trade-list li:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.vmn-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vmn-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmn-who img, .vmn-face { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 50) 70% 42%)); box-shadow: 0 0 0 1px var(--vmn-line); }
.vmn-private { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.vmn-private { background: repeating-linear-gradient(135deg, #e8e2f2 0 3px, #2a2536 3px 7px); box-shadow: 0 0 0 1px var(--vmn-line); }
.vmn-side-tag { justify-self: start; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.is-buy .vmn-side-tag { color: var(--vmn-up); background: rgba(164, 139, 255, .1); }
.is-sell .vmn-side-tag { color: var(--vmn-down); background: rgba(255, 91, 143, .1); }
.vmn-trade-list b { text-align: right; font: 600 .86rem ui-monospace, "SF Mono", Menlo, monospace; }
.vmn-ago { color: var(--vmn-mute); text-align: right; text-decoration: none; font-size: .78rem; }
a.vmn-ago:hover { color: var(--vmn-ink); }

.vmn-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.vmn-trade { display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(177, 140, 255, .32); border-radius: 22px; background: radial-gradient(120% 90% at 100% 0, rgba(255, 111, 178, .12), transparent 60%), radial-gradient(120% 90% at 0 100%, rgba(177, 140, 255, .14), transparent 60%), var(--vmn-card); box-shadow: 0 18px 50px rgba(60, 30, 120, .25); }
.vmn-trade-title { margin: 0; font-weight: 700; }
.vmn-trade-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vmn-buy, .vmn-sell { min-height: 48px; border-radius: 14px; font-family: inherit; font-size: 1rem; font-weight: 800; line-height: 1; cursor: pointer; transition: transform .15s, filter .15s; }
.vmn-buy { border: 0; background: linear-gradient(135deg, #8b5cf6, #b18cff); color: #fff; box-shadow: 0 10px 28px rgba(139, 92, 246, .35); }
.vmn-sell { border: 1px solid var(--vmn-line); background: rgba(255, 255, 255, .04); color: var(--vmn-ink); }
.vmn-buy:hover, .vmn-sell:hover { filter: brightness(1.1); transform: translateY(-1px); }
/* vice-market.css resets `.vice-market button` to font: inherit at the same specificity and loads later; these win over it. */
.vice-market .vmn-seg button { font-family: inherit; font-size: .78rem; font-weight: 600; line-height: 1; }
.vice-market .vmn-buy, .vice-market .vmn-sell { font-family: inherit; font-size: 1rem; font-weight: 800; line-height: 1; }
.vmn-paused { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--vmn-mute); font-size: .9rem; }
.vmn-note { margin: 0; padding: 10px 14px; border: 1px solid rgba(177, 140, 255, .22); border-radius: 14px; background: rgba(177, 140, 255, .06); color: var(--vmn-mute); font-size: .86rem; line-height: 1.45; }
.vmn-note[hidden] { display: none; }
.vmn-paused span { color: #f4b728; font-size: .6rem; }
.vmn-facts { display: grid; gap: 0; margin: 0; padding: 6px 16px; border: 1px solid var(--vmn-soft); border-radius: 18px; background: var(--vmn-card); }
.vmn-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--vmn-soft); font-size: .86rem; }
.vmn-facts div:last-child { border-bottom: 0; }
.vmn-facts dt { color: var(--vmn-mute); } .vmn-facts dd { margin: 0; text-align: right; }
.vmn-facts a, .vmn-copy { border: 0; background: none; color: #d9c8ff; font: inherit; cursor: pointer; text-decoration: none; padding: 0; }

.vmn-phone-bar { display: none; }
@media (max-width: 1099px) {
  .vmn { grid-template-columns: 1fr; }
  .vmn-side { position: static; }
  .vmn-chart { height: 300px; }
}
/* Buy and Sell pinned just above the phone tab bar, always in reach (vice-market-native.js measures the bar). */
html.vmn-docked .vmn-trade { display: none; }
html.vmn-docked .vmn-phone-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--vmn-tabbar, 66px) + 10px); z-index: 40; display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; padding: 10px; border: 1px solid rgba(177, 140, 255, .3); border-radius: 20px; background: rgba(14, 12, 24, .84); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
html.vmn-docked .vmn-phone-bar:has(.vmn-paused) { grid-template-columns: 1fr; justify-items: center; padding: 12px; }
html.vmn-docked .vmx-desk:has(.vmn) { padding-bottom: 96px; }
@media (max-width: 560px) {
  /* Range and Price/Market cap on one line, and a chart that sits above the pinned Buy and Sell. */
  .vmn-chart-card { padding: 10px 10px 6px; border-radius: 18px; }
  .vmn-chart-bar { flex-wrap: nowrap; gap: 6px; }
  .vmn-seg button, .vice-market .vmn-seg button { padding: 6px 9px; font-size: .74rem; }
  .vmn-chart { height: 164px; }
  .vmn-head { gap: 12px; } .vmn-logo { width: 44px; height: 44px; } .vmn-id h3 { font-size: 1.2rem; }
  .vmn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vmn-trade-list li { grid-template-columns: minmax(0, 1fr) 48px 80px 36px; gap: 6px; padding: 8px; }
  .vmx-desk:has(.vmn) { margin: 0; }
}

/* Phone chips: both tokens side by side, compact, nothing clipped: symbol and change on top, price below. */
@media (max-width: 560px) {
  .vmx-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; }
  .vmx-chip { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "logo sym" "logo px" "logo chg"; column-gap: 10px; row-gap: 2px; align-items: center; padding: 9px 12px; border-radius: 16px; }
  .vmx-chip img { grid-area: logo; width: 28px; height: 28px; }
  .vmx-chip > b { grid-area: sym; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vmx-chip-px { display: contents; }
  .vmx-chip-px b { grid-area: px; font-size: .8rem; }
  .vmx-chip-px small { grid-area: chg; font-size: .68rem; line-height: 1; }
}
/* Phone: a tighter hero so the chart clears the pinned Buy and Sell on the first screen. */
@media (max-width: 560px) {
  html.vmn-docked .vmx { gap: 12px; }
  html.vmn-docked .vmx-hero { min-height: 0; padding-top: 80px; padding-bottom: 16px; gap: 10px; }
  html.vmn-docked .vmx-hero h2 { font-size: 2rem; }
  html.vmn-docked .vmx-hero-copy p:last-child { margin-top: 6px; font-size: .95rem; }
  html.vmn-docked .vmx-actions { gap: 8px; }
  html.vmn-docked .vmx-launch, html.vmn-docked .vmx-apply { padding-top: 9px; padding-bottom: 9px; font-size: .82rem; }
  html.vmn-docked .vmn { gap: 14px; } html.vmn-docked .vmn-main { gap: 14px; }
}
