/* Chat com Moderação ao Vivo — estilos próprios (usa os tokens de /_jev/jev.css) */
:root {
  --k-ok: #34d399; --k-warn: #fbbf24; --k-bad: #f87171; --k-rule: #a78bfa; --k-sil: #94a3b8;
}
.chat-shell { padding-top: 12px; padding-bottom: 14px; display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h)); min-height: 660px; }

/* ---------- hero ---------- */
.hero { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 12px; }
.hero h1 { margin: 0 0 2px; font-size: clamp(26px, 2.6vw, 36px); }
.hero p { margin: 0; color: var(--text-muted); font-size: 15px; max-width: 980px; }
.hero p b { color: var(--text); }
.hero-short { display: none; }
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
#simBtn { min-width: 196px; font-size: 15px; min-height: 48px; }
#simBtn.running { background: linear-gradient(135deg, #22d3ee, #a78bfa); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font: 800 11.5px/1 var(--font); letter-spacing: .06em; color: #fecaca; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); white-space: nowrap; }
.live-pill b { font-family: var(--mono); color: #fff; }
.live-pill i, .dot-live { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 10px #ef4444; animation: jevpulse 1.4s ease-in-out infinite; display: inline-block; flex: none; }

/* ---------- palco (3 colunas) ---------- */
.stage {
  display: grid; gap: 14px;
  grid-template-columns: minmax(330px, 400px) minmax(0, 1fr) minmax(290px, 350px);
  flex: 1; min-height: 0;
}
.panel {
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--border); border-radius: 18px;
}
.panel-head { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); flex: none; }
.ph-main { min-width: 0; flex: 1; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.ph-sub { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-head .jev-badge { flex: none; }
.mtabs { display: none; }

/* ---------- chat ---------- */
.p-chat { border-color: rgba(34,211,238,.18); }
.simbar { position: relative; flex: none; height: 30px; display: flex; align-items: center; padding: 0 14px; font-size: 12.5px; font-weight: 700; color: #a5f3fc; background: rgba(34,211,238,.07); border-bottom: 1px solid rgba(34,211,238,.18); overflow: hidden; }
.simbar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(34,211,238,.18), rgba(167,139,250,.22)); transition: width .4s ease; }
.simbar span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simbar.done { color: #bbf7d0; background: rgba(16,185,129,.08); border-bottom-color: rgba(16,185,129,.25); }
.simbar.done .simbar-fill { width: 100% !important; background: rgba(16,185,129,.12); }
.chat-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.chat-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 6px 10px 8px; overscroll-behavior: contain; }
.chat-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-dim); font-size: 14px; padding: 20px; pointer-events: none; }
.chat-empty .ce-ic { font-size: 44px; margin-bottom: 6px; }
.new-pill { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 7px 14px; font: 700 12.5px var(--font); color: #0a0a0f; background: var(--jev-grad); cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.cm { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; margin: 1px 0; border-radius: 10px; font-size: 14px; line-height: 1.42; transition: max-height .45s ease, opacity .45s ease, padding .45s ease, margin .45s ease, background .3s; }
.cm:hover { background: rgba(255,255,255,.03); }
.av, .me-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--font); color: #0a0a0f; margin-top: 1px; overflow: hidden; }
.cm-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.cm-nick { font-weight: 700; margin-right: 6px; }
.cm-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; font: 700 10px/16px var(--font); letter-spacing: .04em; text-transform: uppercase; color: #a5f3fc; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.25); vertical-align: 1px; }
.cm-tag.me { color: #ddd6fe; background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.35); }
.cm-text { color: var(--text); }
.cm-meta { display: inline-block; margin-left: 6px; font: 600 11px/1 var(--mono); color: rgba(52,211,153,.8); white-space: nowrap; vertical-align: 1px; }
.cm.warn { background: rgba(251,191,36,.06); box-shadow: inset 2px 0 0 var(--k-warn); }
.cm.warn .cm-meta { color: var(--k-warn); }
.cm.hidden-own { background: rgba(239,68,68,.07); box-shadow: inset 2px 0 0 var(--k-bad); }
.cm.hidden-own.by-rule { background: rgba(167,139,250,.08); box-shadow: inset 2px 0 0 var(--k-rule); }
.cm.hidden-own .cm-text { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(248,113,113,.6); }
.cm.hidden-own.by-rule .cm-text { text-decoration-color: rgba(167,139,250,.6); }
.cm-note { margin-top: 3px; font-size: 12.5px; color: #fca5a5; line-height: 1.4; }
.cm.by-rule .cm-note { color: #c4b5fd; }
.cm-note b { color: #fff; }
.cm.pending { overflow: hidden; }
.cm.pending .cm-text { color: var(--text-muted); }
.cm.pending::after { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none; background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,.16) 50%, transparent 100%); transform: translateX(-100%); animation: scan 0.9s linear infinite; }
@keyframes scan { to { transform: translateX(100%); } }
.cm.pending .cm-meta { color: #67e8f9; }
.cm.pending .jev-spinner { width: 11px; height: 11px; border-width: 2px; vertical-align: -1px; }
.cm.failed { opacity: .7; }
.cm.failed .cm-meta { color: var(--k-bad); }
.cm.enter { animation: cmIn .38s cubic-bezier(.2,.8,.2,1); }
@keyframes cmIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cm.vanish::after { content: attr(data-reason); position: absolute; inset: 0; display: flex; align-items: center; padding: 2px 12px; border-radius: 10px; background: linear-gradient(90deg, rgba(91,33,182,.96), rgba(76,29,149,.92)); color: #ede9fe; font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow: hidden; animation: veil .25s ease; }
.cm.vanish.v-bad::after { background: linear-gradient(90deg, rgba(153,27,27,.95), rgba(127,29,29,.9)); color: #fee2e2; }
@keyframes veil { from { opacity: 0; } to { opacity: 1; } }
.cm.gone { max-height: 0 !important; opacity: 0; padding-top: 0; padding-bottom: 0; margin: 0; }

/* compose */
.compose { flex: none; border-top: 1px solid var(--border); padding: 10px 12px 10px; background: rgba(0,0,0,.2); }
.compose-row { display: flex; gap: 8px; align-items: center; }
.compose-row .jev-input { min-width: 0; flex: 1; }
.compose-row .jev-btn { flex: none; }
.jev-btn--jev:hover:not(:disabled) { background: var(--jev-grad); border-color: transparent; filter: brightness(1.1); }
.me-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; min-width: 0; }
.me-line b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.me-av { width: 22px; height: 22px; font-size: 11px; margin: 0; }
.count { margin-left: auto; font: 600 11px var(--mono); color: var(--text-dim); }
.count.warn { color: var(--k-warn); }
.linkbtn { background: none; border: 0; padding: 2px 4px; color: var(--purple); font: 600 12px var(--font); cursor: pointer; border-radius: 6px; white-space: nowrap; }
.linkbtn:hover { text-decoration: underline; }
.hint { margin-top: 7px; font-size: 11.5px; color: var(--text-dim); }
.muted-bar { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: #e2e8f0; background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.35); }
.muted-bar b { font-family: var(--mono); }
.muted-bar span { color: var(--text-muted); }

/* ---------- console ---------- */
.p-mod { border-color: rgba(167,139,250,.2); }
.conn { font-size: 11.5px; font-weight: 700; color: var(--k-ok); white-space: nowrap; }
.conn.off { color: var(--k-warn); }
.kpis { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 12px 0; }
.kpi { padding: 7px 11px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.kpi .k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 800; }
.kpi .v { font: 800 20px/1.25 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v.bad { color: #fca5a5; } .kpi .v.good { color: #6ee7b7; }
.kpi .v small { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-right: 4px; }
.kpi .s { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dec { flex: none; margin: 10px 12px 8px; padding: 10px 13px; border-radius: 14px; border: 1px solid var(--border-strong); background: rgba(0,0,0,.28); transition: border-color .3s, box-shadow .3s; }
.dec.k-bad { border-color: rgba(239,68,68,.5); box-shadow: 0 0 0 1px rgba(239,68,68,.12), 0 18px 50px rgba(239,68,68,.10); }
.dec.k-rule { border-color: rgba(167,139,250,.55); box-shadow: 0 0 0 1px rgba(167,139,250,.14), 0 18px 50px rgba(124,58,237,.12); }
.dec.k-warn { border-color: rgba(251,191,36,.45); }
.dec.k-ok { border-color: rgba(52,211,153,.35); }
.dec.k-sil { border-color: rgba(148,163,184,.4); }
.dec.flash { animation: decflash .5s ease; }
@keyframes decflash { from { transform: scale(.992); filter: brightness(1.25); } to { transform: none; filter: none; } }
.dec-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px 6px; text-align: center; color: var(--text-muted); font-size: 14px; }
.dec-empty b { color: var(--text); }
.dec-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dec-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dec-time { font: 12px var(--mono); }
.dec-head .spacer { flex: 1; }
.dbadge { flex: none; padding: 3px 10px; border-radius: 999px; font: 900 11px/1.6 var(--font); letter-spacing: .07em; text-transform: uppercase; border: 1px solid; }
.dbadge.k-ok { color: #6ee7b7; background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.4); }
.dbadge.k-warn { color: #fde68a; background: rgba(234,179,8,.14); border-color: rgba(234,179,8,.4); }
.dbadge.k-bad { color: #fecaca; background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.5); }
.dbadge.k-rule { color: #ede9fe; background: rgba(167,139,250,.2); border-color: rgba(167,139,250,.55); }
.dbadge.k-sil { color: #e2e8f0; background: rgba(148,163,184,.16); border-color: rgba(148,163,184,.45); }
.dec-text-row { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.dec-text { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blur { filter: blur(5px); user-select: none; }
.dec-reason { margin-top: 3px; font-size: 13px; color: var(--text-muted); min-height: 19px; }
.dec-reason b { color: var(--text); }
.dec-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.dec h4 { margin: 0 0 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.dec h4.mt { margin-top: 9px; }
.dec h4 .dim { text-transform: none; letter-spacing: 0; font-weight: 600; }
.dec .jev-bars { gap: 5px; }
.dec .jev-bar { grid-template-columns: minmax(80px, 44%) 1fr 42px; font-size: 12.5px; }
.dec .jev-bar .trk { height: 8px; }
.dec .jev-bar .pct { font-size: 12px; }
.dec .jev-score-legend { font-size: 10.5px; }
.dec-sil { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(148,163,184,.1); color: var(--text-muted); font-size: 13px; }
.dec-rules-wrap { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border); }
.dec-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.drule { display: grid; grid-template-columns: minmax(0, 1fr) 56px 36px; gap: 8px; align-items: center; font-size: 12px; color: var(--text-muted); }
.drule .drt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drule .drbar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.drule .drbar i { display: block; height: 100%; width: 0; background: rgba(167,139,250,.55); border-radius: 999px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.drule .drp { text-align: right; font: 700 11.5px var(--mono); }
.drule.hit { color: #ede9fe; }
.drule.hit .drt { font-weight: 700; }
.drule.hit .drbar i { background: linear-gradient(90deg, #a78bfa, #f472b6); box-shadow: 0 0 10px rgba(167,139,250,.6); }
.drule.hit .drp { color: #f0abfc; }
.drule.na { opacity: .55; }
.dec-meta { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dec-meta b { color: var(--text); font-family: var(--mono); }

.log-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.log-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 4px; }
.log-head h4 { margin: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.seg button { border: 0; background: none; color: var(--text-muted); font: 700 11.5px var(--font); padding: 5px 10px; border-radius: 8px; cursor: pointer; min-height: 28px; }
.seg button.on { background: rgba(255,255,255,.1); color: var(--text); }
.log { flex: 1; overflow-y: auto; padding: 2px 8px 10px; }
.lg { display: grid; grid-template-columns: 18px 56px minmax(60px, 112px) minmax(0, 1fr) 46px auto 44px; gap: 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; color: inherit; font: 13px/1.3 var(--font); padding: 5px 8px; cursor: pointer; box-shadow: inset 2px 0 0 transparent; }
.lg:hover { background: rgba(255,255,255,.04); }
.lg.pinned { background: rgba(167,139,250,.1); }
.lg.enter { animation: lgIn .5s ease; }
@keyframes lgIn { from { background: rgba(255,255,255,.1); } to { background: transparent; } }
.lg.k-bad { box-shadow: inset 2px 0 0 var(--k-bad); } .lg.k-rule { box-shadow: inset 2px 0 0 var(--k-rule); }
.lg.k-warn { box-shadow: inset 2px 0 0 var(--k-warn); } .lg.k-sil { box-shadow: inset 2px 0 0 var(--k-sil); }
.lg-ic { font-size: 13px; text-align: center; }
.lg-t { font: 11px var(--mono); color: var(--text-dim); }
.lg-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-x { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.lg.k-ok .lg-x, .lg.k-warn .lg-x { color: var(--text); }
.lg-c { font: 700 11px/1.5 var(--font); padding: 1px 8px; border-radius: 999px; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.lg-c.k-ok { color: #6ee7b7; background: rgba(16,185,129,.1); }
.lg-c.k-warn { color: #fde68a; background: rgba(234,179,8,.12); }
.lg-c.k-bad { color: #fecaca; background: rgba(239,68,68,.16); }
.lg-c.k-rule { color: #ede9fe; background: rgba(167,139,250,.18); }
.lg-c.k-sil { color: #e2e8f0; background: rgba(148,163,184,.14); }
.lg-ms { text-align: right; font: 11px var(--mono); color: var(--text-dim); }
.lg-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.lg-bar i { display: block; height: 100%; border-radius: 999px; background: rgba(52,211,153,.7); }
.lg.k-bad .lg-bar i { background: linear-gradient(90deg, #f87171, #f472b6); }
.lg.k-rule .lg-bar i { background: linear-gradient(90deg, #a78bfa, #f472b6); }
.lg.k-warn .lg-bar i { background: #fbbf24; }
.lg.k-sil .lg-bar i { background: #94a3b8; }
.log[data-f="blocked"] .lg.k-ok, .log[data-f="blocked"] .lg.k-warn { display: none; }
.log[data-f="ok"] .lg.k-bad, .log[data-f="ok"] .lg.k-rule, .log[data-f="ok"] .lg.k-sil { display: none; }
.log-empty { padding: 14px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---------- regras ---------- */
.p-rules { border-color: rgba(244,114,182,.18); }
.rules-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 16px; }
.rules { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); font-size: 13.5px; transition: border-color .3s, background .3s; }
.rule.new { animation: ruleIn .9s ease; }
@keyframes ruleIn { 0% { background: rgba(244,114,182,.25); border-color: rgba(244,114,182,.7); } 100% { background: var(--bg-card); } }
.rule .rn { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 800 11px var(--mono); color: #0a0a0f; background: var(--hot-grad); }
.rule .rt { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.rule .rh { flex: none; font: 700 10.5px/1.5 var(--font); color: #ddd6fe; background: rgba(167,139,250,.14); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.rule button { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--text-muted); cursor: pointer; font-size: 13px; }
.rule button:hover { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,.05); }
.rule input { flex: 1; min-width: 0; min-height: 32px; padding: 5px 8px; font-size: 13.5px; }
.rules-empty { padding: 12px; text-align: center; color: var(--text-dim); border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 13px; }
.sugs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 2px; font-size: 12px; }
.sugs #sugs { display: contents; }
.sugs .jev-chip { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.retro { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; color: var(--text-muted); background: rgba(167,139,250,.08); border: 1px solid rgba(167,139,250,.3); }
.retro b { color: var(--text); }
.retro .hit { color: #f0abfc; font-weight: 800; }
.retro.busy { color: #a5f3fc; background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.3); }
.qprev { margin-top: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.35); overflow: hidden; }
.qprev-h { padding: 7px 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.qprev pre { margin: 0; padding: 10px 12px; font: 11.5px/1.5 var(--mono); color: #cbd5e1; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; }
.qprev pre .k { color: #c4b5fd; } .qprev pre .s { color: #86efac; }
.how { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.how-h { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.how ol { margin: 0 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.how b { color: var(--text); }
.how .small { font-size: 12px; margin: 0 0 10px; }
.k-ok { color: var(--k-ok); font-weight: 700; } .k-warn { color: var(--k-warn); font-weight: 700; } .k-bad { color: var(--k-bad); font-weight: 700; } .k-sil { color: var(--k-sil); font-weight: 700; }
.how .k-ok, .how .k-warn, .how .k-bad, .how .k-sil { font-weight: 800; }

/* ---------- responsivo ---------- */
@media (max-width: 1359px) {
  .chat-shell { height: auto; display: block; }
  .stage { grid-template-columns: minmax(320px, 390px) minmax(0, 1fr); grid-template-rows: auto; align-items: start; }
  .p-chat { height: clamp(560px, calc(100vh - var(--topbar-h) - 120px), 880px); }
  .p-mod { height: auto; }
  .p-mod .log-wrap { flex: none; }
  .p-mod .log { flex: none; height: 300px; }
  .p-rules { grid-column: 1 / -1; }
  .rules-body { overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .rules-side .how { margin-top: 0; padding-top: 0; border-top: 0; }
  .rules-side .qprev { margin-top: 0; margin-bottom: 12px; }
}
@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 10px; }
  .hero-long { display: none; }
  .hero-short { display: block; font-size: 14.5px; }
  .hero-cta { justify-content: space-between; }
  #simBtn { min-width: 0; flex: 1; }
  .mtabs { display: flex; gap: 6px; position: sticky; top: var(--topbar-h); z-index: 20; padding: 8px 0; background: rgba(10,10,15,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 0 0 8px; }
  .mtabs button { position: relative; flex: 1; min-width: 0; white-space: nowrap; min-height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-muted); font: 700 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .mtabs button.on { color: var(--text); border-color: rgba(167,139,250,.7); background: rgba(167,139,250,.14); }
  .mt-badge { position: absolute; top: -7px; right: -3px; font: 800 10px/17px var(--mono); padding: 0 6px; border-radius: 999px; color: #fff; background: #ef4444; box-shadow: 0 0 0 2px var(--bg); }
  .stage { display: block; height: auto; }
  .rules-body { display: block; }
  .rules-side .how { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
  .rules-side .qprev { margin-top: 12px; }
  .p-mod .log { height: auto; }
  .panel { display: none; }
  body[data-tab="chat"] .p-chat, body[data-tab="mod"] .p-mod, body[data-tab="regras"] .p-rules { display: flex; }
  .p-chat { height: calc(100svh - 290px); min-height: 430px; }
  .p-rules { height: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec-grid { grid-template-columns: 1fr; gap: 10px; }
  .dec-rules { grid-template-columns: 1fr; }
  .lg { grid-template-columns: 18px minmax(56px, 90px) minmax(0, 1fr) auto; }
  .lg-t, .lg-ms, .lg-bar { display: none; }
  .p-mod { height: auto; min-height: 0; }
  .log { max-height: 60vh; }
}
@media (max-width: 420px) {
  .panel-head .jev-badge { display: none; }
  .kpi .v { font-size: 19px; }
}
