@font-face { font-family: 'Silkscreen'; src: url('fonts/silkscreen-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Silkscreen'; src: url('fonts/silkscreen-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0e1a;
  --surface: #121729;
  --surface-2: #1a2038;
  --line: #2a3152;
  --text: #e7e9f3;
  --muted: #8b93b5;
  --gold: #facc15;
  --accent: #7c5cff;
  --good: #4ade80;
  --bad: #f87171;
  --xp: #38bdf8;
  --strip-h: 140px;
  --pixel: 'Silkscreen', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 500px at 50% 0%, #1b2140 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 13px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 100vh; padding: 24px 16px 32px; gap: 28px; justify-content: center;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { image-rendering: pixelated; }

/* ---------- Web ---------- */
#web-header { text-align: center; max-width: 640px; }
#web-header h1 { font-family: var(--pixel); font-weight: 700; font-size: clamp(28px, 6vw, 44px); margin: 0 0 8px; letter-spacing: 1px; color: #fff; text-shadow: 3px 3px 0 #000; }
#web-header p { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.web-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.web-actions button, .web-actions .dl {
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 10px; padding: 9px 14px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.web-actions button:hover, .web-actions .dl:hover { border-color: var(--accent); }
.desktop-only { display: none !important; }

#app { width: min(760px, 100%); display: flex; flex-direction: column; gap: 8px; }

/* ---------- Desktop (janela transparente) ---------- */
html.desktop body { background: transparent; padding: 0; min-height: 0; height: 100vh; overflow: hidden; justify-content: flex-end; gap: 0; }
html.desktop .web-only { display: none !important; }
html.desktop .desktop-only { display: inline-flex !important; }
html.desktop #app { width: 100%; height: 100%; gap: 6px; padding: 0 2px 4px; justify-content: flex-end; }
html.desktop #strip, html.desktop #strip * { -webkit-app-region: drag; }
html.desktop #strip button, html.desktop #strip button * { -webkit-app-region: no-drag; }

/* ---------- Faixa do jogo ---------- */
#strip {
  position: relative; flex: 0 0 var(--strip-h); height: var(--strip-h);
  background: rgba(12, 15, 28, 0.94); border: 2px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  user-select: none; -webkit-user-select: none;
}
#hud {
  flex: 0 0 34px; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px;
  font-family: var(--pixel); font-size: 11px; white-space: nowrap;
  border-bottom: 2px solid rgba(42, 49, 82, .7);
}
.hud-stage { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; overflow: hidden; }
#hud-act { color: var(--muted); font: 10px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif; overflow: hidden; text-overflow: ellipsis; }
#hud-wave { color: #fff; }
.farm-badge { background: #3f2d00; color: var(--gold); border: 1px solid #a16207; border-radius: 6px; font-family: var(--pixel); font-size: 9px; padding: 1px 5px; }
.hud-lvl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.xpbar { width: 70px; height: 6px; background: #0a0d18; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--xp); transition: width .2s; }
.hud-gold { display: flex; align-items: center; gap: 4px; color: var(--gold); min-width: 64px; }
.hud-gold img { width: 12px; height: 12px; }
.hud-btns { display: flex; gap: 2px; }
.hud-btns button {
  position: relative; width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 14px; line-height: 1; padding: 0;
}
.hud-btns button:hover, .hud-btns button.on { background: var(--surface-2); border-color: var(--line); }
.hud-btns img { width: 18px; height: 18px; }
#bag-badge { position: absolute; top: -2px; right: -2px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #e11d48; color: #fff; font: 700 9px/14px system-ui, sans-serif; }
#scene { flex: 1; width: 100%; min-height: 0; display: block; }

#toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 5; }
#toast div {
  background: rgba(10, 12, 24, .92); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px;
  font-size: 11px; max-width: min(520px, 90vw); text-align: center; animation: toast 3.2s forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(-4px); } 8%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- Painel ---------- */
#panel {
  height: 420px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
#panel[hidden] { display: none; }
html.desktop #panel { flex: 1 1 auto; height: auto; min-height: 0; }
.panel-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 0 8px; border-bottom: 2px solid var(--line); }
html.desktop .panel-head { -webkit-app-region: drag; }
html.desktop .panel-head button { -webkit-app-region: no-drag; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.tabs button {
  background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 7px 10px 6px;
  font-family: var(--pixel); font-size: 11px; color: var(--muted);
}
.tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.icon-btn { background: transparent; border: 1px solid var(--line); border-radius: 7px; width: 28px; height: 26px; margin-bottom: 4px; }
#panel-body { flex: 1; overflow: auto; padding: 12px; }
#panel-body h3 { font-family: var(--pixel); font-size: 11px; font-weight: 400; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.px { font-family: var(--pixel); }
.btn {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger { border-color: #7f1d1d; color: #fca5a5; }
.btn img { width: 12px; height: 12px; }

/* Mochila */
.bag-layout { display: grid; grid-template-columns: 1fr 210px; gap: 12px; }
.eq-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.slot {
  background: var(--surface-2); border: 2px solid var(--rc, var(--line)); border-radius: 9px; padding: 5px 2px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.slot img { width: 26px; height: 26px; }
.slot span { font-size: 9px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.empty img { opacity: .25; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.cell {
  position: relative; aspect-ratio: 1; background: var(--surface-2); border: 2px solid var(--rc, var(--line)); border-radius: 7px;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.cell img { width: 22px; height: 22px; }
.cell.void { border-style: dashed; border-color: #20263f; background: transparent; cursor: default; }
.cell .up { position: absolute; right: 1px; bottom: 0; font-size: 9px; color: var(--good); font-style: normal; }
.cell.new::after { content: ''; position: absolute; top: 2px; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: #e11d48; }
.slot.sel, .cell.sel { outline: 2px solid #fff; outline-offset: 1px; }
.detail { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; position: sticky; top: 0; }
.detail .nm { font-weight: 700; color: var(--rc); font-size: 13px; }
.detail .sub { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.detail ul { margin: 0 0 8px; padding: 0; list-style: none; font-size: 12px; }
.detail li { padding: 1px 0; }
.detail li.base { color: #fff; }
.detail li.aff { color: #a5b4fc; }
.detail .cmp { font-size: 12px; margin-bottom: 8px; }
.detail .acts { display: flex; flex-wrap: wrap; gap: 5px; }
.power-chip { font-family: var(--pixel); font-size: 11px; background: #1f1840; border: 1px solid #3b2f7a; border-radius: 8px; padding: 3px 8px; }

/* Herói */
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.class-card { background: var(--surface-2); border: 2px solid var(--line); border-radius: 10px; padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.class-card.on { border-color: var(--accent); background: #1d1940; }
.class-card img { width: 48px; height: 48px; }
.class-card b { font-size: 12px; }
.class-card small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.skill { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: var(--surface-2); }
.skill.locked { opacity: .5; }
.skill .info { flex: 1; }
.skill b { font-size: 12px; }
.skill small { display: block; color: var(--muted); font-size: 11px; }
.stats { width: 100%; border-collapse: collapse; font-size: 12px; }
.stats td { padding: 3px 0; border-bottom: 1px dashed #232a47; }
.stats td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.toggle { appearance: none; width: 30px; height: 17px; border-radius: 9px; background: #2a3152; position: relative; cursor: pointer; flex: 0 0 auto; margin: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #8b93b5; transition: .15s; }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { left: 15px; background: #fff; }

/* Mapa */
.diff-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.diff-tabs .btn.on { border-color: var(--dc); color: var(--dc); }
.act { margin-bottom: 12px; }
.act-title { font-size: 12px; margin-bottom: 5px; }
.stages { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.stage { aspect-ratio: 1.3; border-radius: 7px; border: 2px solid var(--line); background: var(--surface-2); font-family: var(--pixel); font-size: 11px; padding: 0; }
.stage.done { border-color: #3b4a7a; }
.stage.cur { border-color: #fff; background: #2a2360; }
.stage.lock { opacity: .45; cursor: default; }
.stage.boss { color: var(--gold); }

/* Forja / Ajustes */
.up-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 7px; }
.up-row .info { flex: 1; }
.up-row b { font-size: 13px; }
.up-row small { display: block; color: var(--muted); font-size: 11px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #232a47; }
.set-row small { display: block; color: var(--muted); font-size: 11px; }
select { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; font: inherit; }
textarea { width: 100%; height: 60px; background: #0a0d18; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: 11px ui-monospace, monospace; padding: 6px; resize: vertical; }
.report { text-align: center; padding: 10px 0; }
.report h2 { font-family: var(--pixel); font-size: 18px; margin: 0 0 4px; }
.report .big { display: flex; justify-content: center; gap: 24px; margin: 16px 0; flex-wrap: wrap; }
.report .big div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 120px; }
.report .big b { display: block; font-family: var(--pixel); font-size: 18px; }
.report .loot { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 480px; margin: 0 auto 14px; }
.report .loot .cell { width: 34px; }

@media (max-width: 560px) {
  :root { --strip-h: 132px; }
  .hud-lvl .xpbar { width: 40px; }
  #hud-act { display: none; }
  #hud { gap: 6px; padding-left: 8px; }
  #hud-wave { font-size: 9px; }
  .hud-gold { min-width: 0; }
  .bag-layout, .two-col { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: 1fr; }
  .eq-row { grid-template-columns: repeat(3, 1fr); }
  .stages { grid-template-columns: repeat(5, 1fr); }
}

/* barras de rolagem discretas */
#panel-body::-webkit-scrollbar { width: 8px; }
#panel-body::-webkit-scrollbar-thumb { background: #2a3152; border-radius: 4px; }
#panel-body::-webkit-scrollbar-track { background: transparent; }

/* ---------- Menu: conta, vagas e criação ---------- */
#panel.menu .panel-head { display: none; }
html.desktop #panel.menu #panel-body { -webkit-app-region: no-drag; }
#strip.menu .hud-lvl, #strip.menu .hud-gold, #strip.menu #hud-farm,
#strip.menu .hud-btns button:not(#btn-hide) { visibility: hidden; }
.menu-wrap { max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 0 8px; }
.menu-wrap.wide { max-width: 100%; align-items: stretch; }
.menu-title { font-size: 18px; font-weight: 700; color: #fff; text-shadow: 2px 2px 0 #000; margin: 0 0 2px; text-align: center; }
.center { text-align: center; }
.auth-box { width: 100%; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #0d1122; border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { background: transparent; border: 0; border-radius: 7px; padding: 7px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field input, input.inp {
  background: #0d1122; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: 14px system-ui, sans-serif;
}
.field input:focus { outline: none; border-color: var(--accent); }
.btn.big { padding: 10px 14px; font-size: 14px; justify-content: center; }
.link { background: none; border: 0; color: #a5b4fc; font-size: 12px; padding: 2px; text-decoration: underline; text-underline-offset: 2px; }
.link.danger { color: #fca5a5; }
.form-err { background: #3b0d14; border: 1px solid #7f1d1d; color: #fecaca; border-radius: 8px; padding: 7px 9px; font-size: 12px; }
.form-info { background: #0c2b1c; border: 1px solid #166534; color: #bbf7d0; border-radius: 8px; padding: 7px 9px; font-size: 12px; }
.or { width: 100%; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.acct-mini { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.notice { background: #1d1940; border: 1px solid #3b2f7a; border-radius: 10px; padding: 8px 10px; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.slot-card {
  background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px; padding: 12px 10px; min-height: 230px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
}
.slot-card img { width: 64px; height: 64px; }
.slot-card b { font-size: 13px; color: #fff; word-break: break-word; }
.slot-card small { font-size: 11px; line-height: 1.4; }
.slot-card .btn { margin-top: 4px; width: 100%; justify-content: center; }
.slot-card.empty { border-style: dashed; color: var(--muted); }
.slot-card.empty:hover { border-color: var(--accent); color: #fff; }
.slot-card .plus { font: 700 30px/1 var(--pixel); }
.create-grid { display: grid; grid-template-columns: 170px 1fr; gap: 14px; margin-top: 6px; }
.preview { background: #0d1122; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 8px; align-self: start; position: sticky; top: 0; }
.preview img { width: 128px; height: 128px; }
.preview b { color: #fff; text-align: center; word-break: break-word; }
.create-form { display: flex; flex-direction: column; gap: 8px; }
.create-form .class-grid { margin-bottom: 4px; }
.create-form .class-card img { width: 40px; height: 40px; }
.create-form .class-card small { display: none; }
.create-form .class-card { align-items: center; text-align: center; padding: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 24px; height: 24px; border-radius: 6px; background: var(--c); border: 2px solid rgba(255,255,255,.15); padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.hero-card { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.hero-card img { width: 64px; height: 64px; }
.hero-card > div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.hero-card b { font-size: 14px; color: #fff; }
.account-box { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.account-box small { display: block; color: var(--muted); font-size: 11px; max-width: 330px; }
@media (max-width: 560px) {
  .slot-grid { grid-template-columns: 1fr; }
  .slot-card { min-height: 0; }
  .create-grid { grid-template-columns: 1fr; }
  .preview { position: static; }
}
.bag-seg { max-width: 360px; margin-bottom: 12px; }

/* ---------- Itens: fundo pela raridade ---------- */
.cell:not(.void), .slot:not(.empty), .detail[style*="--rc"] .nm { --glow: color-mix(in srgb, var(--rc) 40%, transparent); }
.cell:not(.void), .slot:not(.empty) {
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 38%, #161c33) 0%, color-mix(in srgb, var(--rc) 12%, #11162a) 70%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 -6px 10px rgba(0,0,0,.25), 0 0 6px var(--glow);
}
.cell img, .slot img { filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)); }
.slot img.ghost, .cell img.ghost { opacity: .22; filter: grayscale(1); }
.cell img { width: 26px; height: 26px; }
.slot img { width: 30px; height: 30px; }
.cell.sm { width: 34px; height: 34px; aspect-ratio: auto; }
.cell.sm img { width: 24px; height: 24px; }
/* ---------- Joias e fusão ---------- */
.gem-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-family: var(--pixel); font-size: 11px; }
.gem-bar span { display: inline-flex; align-items: center; gap: 4px; }
.gem-bar img { width: 18px; height: 18px; }
.gem-bar .gold img { width: 13px; height: 13px; }
.center-bar { justify-content: center; margin: 0 auto 12px; max-width: 480px; }
.fuse-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 6px; }
.fuse-row.dim { opacity: .55; }
.fuse-in { display: flex; gap: 3px; }
.fuse-arrow { color: var(--muted); font-family: var(--pixel); }
.fuse-row .info { flex: 1; min-width: 0; font-size: 12px; }
.fuse-row .info small { display: block; color: var(--muted); font-size: 11px; }
.fuse-cost { display: flex; flex-direction: column; gap: 2px; font-family: var(--pixel); font-size: 10px; align-items: flex-end; }
.fuse-cost span { display: inline-flex; align-items: center; gap: 3px; }
.fuse-cost img { width: 14px; height: 14px; }
@media (max-width: 560px) { .fuse-row { flex-wrap: wrap; } }

/* ---------- Janela flutuante do navegador (Document Picture-in-Picture) ---------- */
html.pip, html.pip body { height: 100%; }
html.pip body { margin: 0; padding: 0; min-height: 0; overflow: hidden; background: #0b0e1a; display: flex; flex-direction: column; justify-content: flex-end; }
html.pip #app { width: 100%; height: 100%; gap: 6px; padding: 4px; box-sizing: border-box; justify-content: flex-end; }
html.pip #panel { flex: 1 1 auto; height: auto; min-height: 0; }

/* ---------- Evolução de classe / nível dos atos ---------- */
.evo-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.evo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--ec); border-radius: 10px; background: var(--surface-2); }
.evo-row.done { background: color-mix(in srgb, var(--ec) 10%, var(--surface-2)); }
.evo-row .info { display: flex; flex-direction: column; min-width: 0; }
.evo-row .info b { color: var(--ec); }
.evo-row .info small { color: var(--muted); font-size: 11px; }
.evo-cost { display: flex; gap: 8px; align-items: center; font-size: 12px; white-space: nowrap; }
.evo-cost span { display: inline-flex; align-items: center; gap: 3px; }
.evo-cost img { width: 12px; height: 12px; }
.evo-cost .bad, .lvl-chip.bad { color: #f87171; }
.lvl-chip { display: inline-block; font-family: var(--pixel); font-size: 9px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: #a5f3fc; margin-left: 4px; }
.lvl-chip.bad { border-color: #7f1d1d; background: #2a0f14; }
.map-note { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #a16207; background: #2a1d00; color: #fde68a; border-radius: 10px; font-size: 12px; }
.btn.tiny { padding: 2px 7px; font-size: 11px; }
.rename { gap: 6px; margin-bottom: 2px; }
.rename input { flex: 1; min-width: 0; background: #0a0d18; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 5px 8px; font: inherit; }

/* ---------- Segurança da conta / convites ---------- */
.sec-line { font-size: 11px; color: #86efac; margin: -6px 0 12px; }
.invite-box { border: 1px solid #a16207; background: color-mix(in srgb, #facc15 6%, var(--surface-2)); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.invite-box input { flex: 1; min-width: 0; background: #0a0d18; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit; }
.invites td { vertical-align: middle; padding: 5px 4px; }
.invites td.code { letter-spacing: 1px; color: #fde68a; white-space: nowrap; font-size: 11px; }
.invites td.right { text-align: right; white-space: nowrap; }
.mfa-qr { display: block; width: 180px; height: 180px; margin: 6px auto; background: #fff; border-radius: 10px; padding: 8px; image-rendering: auto; }
.mfa-secret { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--text); letter-spacing: 1px; word-break: break-all; }
.notice.name-ask { flex-wrap: wrap; justify-content: flex-start; width: 100%; }
.notice.name-ask .row { flex: 1 1 260px; gap: 8px; }
.notice.name-ask input, .account-box ~ .rename input { flex: 1; min-width: 0; background: #0a0d18; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit; }
.pv { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.pv.good { color: #86efac; background: #052e16; border: 1px solid #166534; }
.pv.bad { color: #fca5a5; background: #2a0f14; border: 1px solid #7f1d1d; }
.pv.mid { color: #fde68a; background: #2a1d00; border: 1px solid #a16207; }

/* ---------- Perigo das fases (mapa) ---------- */
.stage { box-shadow: inset 0 -4px 0 var(--th, transparent); }
.stage.done, .stage.lock { border-color: color-mix(in srgb, var(--th, var(--line)) 45%, var(--line)); }
.threat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; font-size: 12px; }
.threat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.threat-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.threat-legend small { margin-left: auto; font-size: 11px; }
.map-note.threat-note { border-color: var(--th); background: color-mix(in srgb, var(--th) 10%, var(--surface-2)); color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
