/* o site do trade: celular primeiro; uma cor para quem vende (--sell) e uma para quem compra (--buy), em tudo */
:root {
  --bg: #f6f6f3; --fg: #1c1e20; --muted: #6a6f75; --card: #ffffff; --line: #e2e3de; --soft: #eeefeb;
  --link: #1c1e20; --sell: #0e8a5c; --buy: #2160c4; --sell-bg: #e3f3ec; --buy-bg: #e5edfa; --mark: #ffe48a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --fg: #e7e8e9; --muted: #9aa0a6; --card: #1a1d20; --line: #2a2e33; --soft: #22262a;
    --link: #e7e8e9; --sell: #3ec58d; --buy: #6ea2ff; --sell-bg: #15301f; --buy-bg: #172540; --mark: #6b5600;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --fg: #e7e8e9; --muted: #9aa0a6; --card: #1a1d20; --line: #2a2e33; --soft: #22262a;
  --link: #e7e8e9; --sell: #3ec58d; --buy: #6ea2ff; --sell-bg: #15301f; --buy-bg: #172540; --mark: #6b5600;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
h1 { font-size: 1.25rem; margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }
main { max-width: 1180px; margin: 0 auto; padding: 12px 16px 40px; }
footer { max-width: 1180px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: .8rem; }
small { font-size: .78em; color: var(--muted); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* topo */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 16px;
  border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { order: 3; display: flex; gap: 2px; width: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav a[aria-current] { color: var(--fg); background: var(--soft); font-weight: 600; }
.prefs { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu { position: relative; }
.menu summary, .theme {
  list-style: none; cursor: pointer; min-width: 34px; height: 32px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: .8rem; text-decoration: none;
  color: var(--fg); background: var(--card);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: 38px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 4px; display: grid; min-width: 140px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.menu-list a { padding: 7px 10px; border-radius: 6px; text-decoration: none; }
.menu-list a[aria-current] { background: var(--soft); font-weight: 600; }
@media (min-width: 760px) {
  .nav { order: 0; width: auto; }
}

/* título com o "i" */
.title { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 12px; position: relative; }
.info { position: relative; }
.info summary {
  list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--muted);
  color: var(--muted); display: grid; place-items: center; font: italic 600 13px/1 Georgia, serif; flex: none;
}
.info summary::-webkit-details-marker { display: none; }
.info[open] summary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.info p {
  position: absolute; z-index: 4; left: 50%; transform: translateX(-60%); top: 28px; width: min(340px, 86vw);
  margin: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  font-size: .85rem; color: var(--fg); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.title .info p { left: auto; right: auto; transform: none; }

/* filtros */
.filters { display: grid; gap: 8px; margin: 0 0 12px; }
.filters .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input, select, button {
  font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  height: 40px; padding: 0 10px; min-width: 0;
}
input[type="search"] { width: 100%; }
button { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; padding: 0 16px; cursor: pointer; }
.filters select { flex: 1 1 120px; }
.chatform .row > input { flex: 1 1 140px; }
.date { display: flex; align-items: center; gap: 6px; flex: 1 1 40%; color: var(--muted); font-size: .85rem; }
.date input { flex: 1; }
.search { position: relative; }
.suggest {
  position: absolute; z-index: 6; left: 0; right: 0; top: 44px; margin: 0; padding: 4px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.suggest li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.suggest li small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--soft); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; height: 40px; flex: 1 1 100%; }
.seg label { flex: 1; display: grid; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; padding: 0 12px; cursor: pointer; color: var(--muted); background: var(--card); }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { color: var(--fg); background: var(--soft); font-weight: 600; }
.seg .seg-sell input:checked + span { background: var(--sell); color: #fff; }
.seg .seg-buy input:checked + span { background: var(--buy); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: -3px; }
@media (min-width: 760px) {
  .seg { flex: 0 0 auto; }
  .filters select { flex: 0 1 auto; }
}

/* cartões */
.count { color: var(--muted); font-size: .85rem; margin: 4px 0 8px; }
.cards { display: grid; gap: 8px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.card {
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 12px 10px 10px; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--side); border-radius: 12px; box-shadow: var(--shadow);
  min-width: 0;
}
.card.sell { --side: var(--sell); }
.card.buy { --side: var(--buy); }
/* a roupa vem em 64x64 com o boneco (32x32) no quadrante de baixo à direita (32..64): a moldura mostra esse quadrante ampliado 1,5x */
.av { position: relative; flex: none; display: block; width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: var(--soft); }
.av .outfit { position: absolute; right: 2px; bottom: 2px; width: 96px; height: 96px; image-rendering: pixelated; max-width: none; }
.av.big { width: 112px; height: 112px; }
.av.big .outfit { right: 4px; bottom: 4px; width: 192px; height: 192px; }
.body { min-width: 0; }
.l1, .l2, .l3 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.l1 .who { font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l1 time { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.l2 .item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--fg); }
.qty { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.l3 { flex-wrap: wrap; margin-top: 2px; }
.price { color: var(--side); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.noprice { color: var(--muted); font-size: .85rem; font-style: italic; }
.city {
  font-size: .75rem; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap;
}
.when { margin-left: auto; display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.l1 .when time { margin-left: 0; }
.rep { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; cursor: help; }
.rep i { font-style: normal; }
.orig { margin-top: 4px; font-size: .85rem; }
.orig summary { cursor: pointer; color: var(--muted); font-size: .78rem; width: max-content; }
.orig p { margin: 4px 0 0; padding: 6px 8px; background: var(--soft); border-radius: 8px; overflow-wrap: anywhere; }
.orig p a { color: var(--muted); text-decoration: none; }
.more, .pager { text-align: center; margin: 14px 0; display: flex; gap: 16px; justify-content: center; }
.more a, .pager a {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none;
  background: var(--card);
}
.empty { color: var(--muted); padding: 18px 0; }
.itemhead { display: flex; gap: 12px; align-items: baseline; margin: 0 0 6px; font-weight: 650; }
.itemhead .clear { font-weight: 400; color: var(--muted); font-size: .85rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sell); vertical-align: middle; }
.dot.buy { background: var(--buy); }

/* item */
.also { color: var(--muted); margin: -6px 0 10px; font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 12px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat {
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 12px;
  padding: 8px 10px; display: grid; gap: 2px; min-width: 0;
}
.stat.sell { border-top-color: var(--sell); }
.stat.buy { border-top-color: var(--buy); }
.stat span { color: var(--muted); font-size: .75rem; }
.stat b { font-size: 1.1rem; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chartbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 4px; margin: 0 0 14px; }
.charthead { display: flex; align-items: center; gap: 8px; }
.charthead .info { margin-left: auto; }
.charthead .info p { left: auto; right: 0; transform: none; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 4px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .85rem; }
.tabs a[aria-current] { background: var(--soft); color: var(--fg); font-weight: 600; }
.chart { position: relative; height: 200px; margin: 10px 0 22px 44px; }
@media (min-width: 760px) { .chart { height: 260px; } }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .band { opacity: .16; stroke: none; }
.chart .band.sell { fill: var(--sell); }
.chart .band.buy { fill: var(--buy); }
.chart .line, .chart .pt { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.chart .line { stroke-width: 2; }
.chart .pt { stroke-width: 7; }
.chart .sell { stroke: var(--sell); }
.chart .buy { stroke: var(--buy); }
.chart .band.sell, .chart .band.buy { stroke: none; }
.chart .ay, .chart .ax { position: absolute; font-size: 11px; color: var(--muted); line-height: 1; white-space: nowrap; }
.chart .ay { right: calc(100% + 6px); transform: translateY(-50%); }
.chart .y0 { top: 0; } .chart .y1 { top: 25%; } .chart .y2 { top: 50%; } .chart .y3 { top: 75%; } .chart .y4 { top: 100%; }
.chart .ax { top: calc(100% + 6px); }
.chart .x0 { left: 0; } .chart .x1 { left: 50%; transform: translateX(-50%); } .chart .x2 { right: 0; }
.legend { margin: 4px 0; font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend .dot + * { margin-right: 6px; }

/* itens */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th.n { text-align: right; }
table.items td:first-child { white-space: normal; min-width: 120px; }
table.items th { white-space: normal; vertical-align: bottom; line-height: 1.2; }
@media (max-width: 759px) { table.items th, table.items td { padding: 7px 6px; } table.items { font-size: .82rem; } }
tbody tr:last-child td { border-bottom: 0; }
th { position: sticky; top: 0; background: var(--card); font-size: .78rem; color: var(--muted); font-weight: 600; }
th a { text-decoration: none; color: inherit; }
th.sell { box-shadow: inset 0 -3px 0 var(--sell); }
th.buy { box-shadow: inset 0 -3px 0 var(--buy); }
td.n { text-align: right; font-variant-numeric: tabular-nums; }
td.sell { color: var(--sell); font-weight: 600; }
td.buy { color: var(--buy); font-weight: 600; }
td.up, td.down { color: var(--fg); }
table.api td { white-space: normal; vertical-align: top; }
code { font: .85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

/* chat */
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.msg .meta .who { font-weight: 650; color: var(--fg); text-decoration: none; font-size: .9rem; }
.msg .chan { padding: 0 6px; border-radius: 999px; background: var(--soft); }
.msg p { margin: 2px 0 0; overflow-wrap: anywhere; }
.msg p a.go { text-decoration: none; color: var(--fg); }
.msg.current { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.context .msg { padding: 5px 10px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.sub { color: var(--muted); margin: -6px 0 12px; font-size: .9rem; }

/* jogador */
.playerhead { display: flex; gap: 14px; align-items: center; margin: 8px 0 4px; }
.playerhead p { margin: 4px 0 0; }
@media (max-width: 759px) { .stats .stat:last-child:nth-child(odd) { grid-column: span 2; } }

/* o cartão de um jogador com vários itens (o mercado sem item escolhido) */
.lines { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 3px; }
.lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; padding-top: 3px; border-top: 1px dashed var(--line); }
.lines li:first-child { border-top: 0; padding-top: 0; }
.lines .item { color: var(--fg); text-decoration: none; font-weight: 500; }
.lines .lp { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.lines .price { font-size: .95rem; }
.orig p + p { margin-top: 4px; }
.plus { margin: 4px 0 0; font-size: .8rem; }
.plus a { color: var(--muted); }

/* o ícone do item, antes do nome */
.sprite { width: 32px; height: 32px; flex: none; image-rendering: pixelated; align-self: center; object-fit: contain; }
.sprite.big { width: 64px; height: 64px; }
.title:has(> .sprite.big) { align-items: center; }
.l2 { align-items: center; }
.lines li { align-items: center; }
table.items td:first-child .sprite { display: inline-block; vertical-align: middle; margin-right: 6px; }
.suggest .sprite { width: 24px; height: 24px; margin-right: 8px; }
.suggest li { align-items: center; }
.suggest li .nm { display: flex; align-items: center; min-width: 0; }

/* como anunciar (/guide) */
.howto { margin-left: auto; align-self: center; color: var(--muted); font-size: .85rem; white-space: nowrap; text-decoration: none; }
.howto:hover { color: var(--fg); text-decoration: underline; }
footer a { color: inherit; }
.rules { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rule h3 { margin: 0 0 2px; font-size: .95rem; }
.rule p { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.rule > :last-child { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; margin: 0 4px 4px 0; }
.chips .chip { margin: 0; }
.chip.sell { background: var(--sell-bg); color: var(--sell); border-color: transparent; }
.chip.buy { background: var(--buy-bg); color: var(--buy); border-color: transparent; }
.money .eq { color: var(--muted); font-size: .8rem; margin: 0 6px 0 -2px; font-variant-numeric: tabular-nums; }
.money .eq::before { content: "= "; }
.units { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.units li { display: flex; align-items: center; gap: 8px; }
.units li span { flex: 1; font-size: .9rem; }
.units .sprite { width: 24px; height: 24px; }
.units .price { color: var(--fg); font-size: .9rem; }
.gh { display: flex; align-items: center; gap: 8px; }
.gh::before { font-size: .9rem; line-height: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--muted); color: var(--muted); }
.gh.good::before { content: "✓"; }
.gh.bad::before { content: "✕"; }
.examples { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
@media (max-width: 400px) { .examples { grid-template-columns: minmax(0, 1fr); } }
.ex { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.examples.bad .ex { border-style: dashed; }
.say { background: var(--soft); border-radius: 8px; padding: 6px 9px; overflow-wrap: anywhere; }
.exnote { margin: 6px 0 4px; color: var(--muted); font-size: .8rem; }
.reads { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.reads li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; padding-top: 3px; border-top: 1px dashed var(--line); }
.reads li:first-child { border-top: 0; padding-top: 0; }
.reads .item { color: var(--fg); text-decoration: none; font-weight: 500; }
.reads .lp { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.reads .empty { padding: 0; color: var(--muted); font-size: .85rem; font-style: italic; }
table.aliases td { white-space: normal; }
table.aliases td.al .chip { margin: 1px 4px 1px 0; }
table.aliases td:last-child { white-space: nowrap; }

/* compositor de anúncios (/post) */
.howtos { margin-left: auto; align-self: center; display: flex; align-items: center; gap: 10px; }
.howtos .howto { margin-left: 0; }
@media (max-width: 759px) {   /* no celular os atalhos descem para a linha de baixo, à direita */
  .title:has(.howtos) { flex-wrap: wrap; }
  .title:has(.howtos) h1 { max-width: calc(100% - 32px); }
  .title:has(> .sprite.big):has(.howtos) h1 { max-width: calc(100% - 120px); }
  .title:has(.howtos) .howtos { flex: 1 0 100%; justify-content: flex-end; }
}
.howto.post { border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; background: var(--card); color: var(--fg); font-weight: 600; text-decoration: none; }
.howto.post:hover { border-color: var(--fg); text-decoration: none; }
.composer { display: grid; gap: 10px; margin: 0 0 14px; }
.prows { display: grid; gap: 8px; }
.prow {
  display: grid; gap: 8px; align-items: center; padding: 8px 8px 8px 10px; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 12px; box-shadow: var(--shadow);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) 40px;
  grid-template-areas: "seg seg rm" "it it it" "qw pw pw";
}
.prow:has(.seg-sell input:checked) { border-left-color: var(--sell); }
.prow:has(.seg-buy input:checked) { border-left-color: var(--buy); }
.prow .seg { grid-area: seg; width: 100%; flex: none; }
.prow .it { grid-area: it; }
.prow .qw { grid-area: qw; }
.prow .pw { grid-area: pw; }
.prow .rm { grid-area: rm; }
.prow .it input, .prow .qw input, .prow .pw input { width: 100%; }
.it .rs { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; pointer-events: none; }
.it .rs .sprite { width: 24px; height: 24px; display: block; }
.it:has(.rs img) input { padding-left: 38px; }
.qw, .pw { display: flex; align-items: center; gap: 6px; min-width: 0; }
.un { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.un:empty { display: none; }
input[aria-invalid="true"] { border-color: #c0392b; }
.rm {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); text-decoration: none; background: var(--card);
}
.rm:hover { color: var(--fg); border-color: var(--fg); }
.rm[hidden], .copy[hidden] { display: none; }
@media (min-width: 760px) {
  .prow {
    grid-template-columns: 200px minmax(180px, 1fr) 120px 200px 40px;
    grid-template-areas: "seg it qw pw rm";
  }
}
.cbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cbar .go { order: 5; flex: 1 1 100%; }
.cbar select { flex: 1 1 150px; }
.cbar .chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .9rem; }
.chk input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--fg); }
button.ghost { background: var(--card); color: var(--fg); border-color: var(--line); }
@media (min-width: 760px) {
  .cbar .go { flex: 0 0 auto; margin-left: auto; }
  .cbar select { flex: 0 1 200px; }
}
.msgbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; min-width: 0; }
.mhead { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-bottom: 6px; }
.mhead .cnt { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.mhead .cnt.over { color: #c0392b; font-weight: 600; }
.mhead .copy { height: 34px; }
.mtext {
  display: block; width: 100%; font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft);
  color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: none; field-sizing: content;
  min-height: 3.6em;
}
.rh { margin: 10px 0 4px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.sub { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.ck { font-size: .8rem; }
.ck.ok { color: var(--sell); font-weight: 700; font-size: 1rem; }
.ck.warn { color: #b3541e; }
.reads li .lp .ck { white-space: normal; }

/* a lista ao vivo: o ponto ao lado da contagem, o efeito e a etiqueta "novo" (uma cor por lado, como o resto) */
#live { overflow-anchor: none; }
.live { display: none; align-items: center; gap: 5px; margin-left: 10px; font-size: .75rem; vertical-align: baseline; }
#live[data-state] .live { display: inline-flex; }
.ldot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); flex: none; animation: ldot 2.4s ease-in-out infinite; }
.live .off, #live[data-state="off"] .live .on { display: none; }
#live[data-state="off"] .live .off { display: inline; }
#live[data-state="off"] .ldot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); animation: none; }
@keyframes ldot { 50% { opacity: .35; } }
.card.sell { --tint: var(--sell-bg); }
.card.buy { --tint: var(--buy-bg); }
.card[data-fresh] { animation: fresh 1.5s ease-out; }
.lines li[data-fresh] { animation: freshrow 1.5s ease-out; }
@keyframes fresh {
  0% { box-shadow: 0 0 0 3px var(--side), 0 0 14px 2px var(--side); background-color: var(--tint); }
  100% { box-shadow: var(--shadow); background-color: var(--card); }
}
@keyframes freshrow { 0% { background-color: var(--tint); } 100% { background-color: transparent; } }
.newtag {
  flex: none; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5;
  padding: 0 6px; border-radius: 999px; background: var(--side); color: var(--card); white-space: nowrap;
}
.lines .newtag { font-size: .6rem; padding: 0 5px; }
@media (prefers-reduced-motion: reduce) {
  .card[data-fresh], .lines li[data-fresh], .ldot { animation: none; }
}
