:root {
  --ink: #0a0608; --bg: #120c10; --panel: #1b1418; --panel2: #241a1f; --brass: #b8893f; --brass2: #e0b764; --copper: #a0522d;
  --verd: #3f8f7f; --blood: #a3141c; --text: #e6d6b4; --muted: #9a8a6c; --cyan: #30e0e0;
  --r0: #a8a39a; --r1: #5fbf4a; --r2: #3f8fe0; --r3: #a24ae0; --r4: #f0a020; --r5: #e03030; --r6: #30e0e0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: 'IM Fell English', Georgia, serif; font-size: 15px; user-select: none; }
canvas#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 2, 6, .75) 100%); }
.hidden { display: none !important; }
button { font-family: 'Cinzel', serif; cursor: pointer; }
input, select { font-family: 'IM Fell English', serif; font-size: 15px; background: #0e0a0c; color: var(--text); border: 1px solid #5a4528; padding: 6px 8px; border-radius: 3px; outline: none; }
input:focus, select:focus { border-color: var(--brass2); box-shadow: 0 0 6px rgba(224, 183, 100, .35); }

@supports (appearance: base-select) and selector(::picker(select)) {
  .market-type, .market-type::picker(select) { appearance: base-select; }
  .market-type::picker(select) { background: #0e0a0c; color: var(--text); border: 1px solid #5a4528; border-radius: 3px; }
  .market-type option { padding: 4px 8px; }
  .market-type option:hover, .market-type option:focus { background: #30231d; }
  .market-type selectedcontent { display: inline-flex; align-items: center; gap: .3em; }
  .market-type svg { width: .9em; height: .9em; flex: none; vertical-align: -.1em; }
}

/* moldura de latão rebitada */
.frame { position: relative; background: linear-gradient(180deg, rgba(36, 26, 31, .96), rgba(20, 14, 17, .97)); border: 2px solid #6b5230;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(224, 183, 100, .18), inset 0 0 30px rgba(0, 0, 0, .7), 0 8px 30px rgba(0, 0, 0, .6); border-radius: 4px; }
.frame::before, .frame::after { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; top: 4px; left: 4px;
  background: radial-gradient(circle at 35% 35%, #ffe6a8, #8a6428 60%, #2a1a08); box-shadow: calc(100% + 0px) 0 0 transparent; }
.frame::after { left: auto; right: 4px; }

.btn { background: linear-gradient(180deg, #8a6428, #5a3e18); color: #ffecc0; border: 1px solid #2a1a08; padding: 7px 16px; border-radius: 3px;
  text-shadow: 0 1px 0 #000; box-shadow: inset 0 1px 0 rgba(255, 230, 170, .35), 0 2px 0 #000; font-weight: 700; letter-spacing: .5px; }
/* Padrão único de botão. Tamanhos: .small (28px) · padrão (34px) · .big (44px).
   Papéis: latão = ação neutra · .green = ganho/transação · .red = destrutivo · .secondary = Cancelar/Fechar e ações leves.
   Rodapé de diálogo: .secondary à esquerda, no máximo um colorido à direita. */
.btn { font-size: 14px; line-height: 1.2; min-height: 34px; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn.big { font-size: 16px; padding: 10px 22px; min-height: 44px; width: 100%; margin-top: 10px; }
.btn.red { background: linear-gradient(180deg, #8a1c1c, #4a0c0c); }
.btn.green { background: linear-gradient(180deg, #3c7a3a, #1c3e1a); }
.btn.small { padding: 4px 10px; font-size: 12px; min-height: 28px; }
.btn.secondary { background: transparent; border-color: #624d37; box-shadow: none; color: var(--text); text-shadow: none; }
.btn.secondary:hover { border-color: var(--brass2); filter: none; color: #fff1d6; }
.btn.secondary.danger { color: #eeb0a0; }
.btn.secondary.danger:hover { border-color: #b0503c; color: #ffd0c4; }
.btn:disabled, .btn:disabled:hover { filter: none; opacity: .45; cursor: not-allowed; transform: none; }
/* Rodapé padrão de diálogo criado em JS: Fechar/ações .secondary à esquerda, a ação principal colorida por último (à direita). */
.dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #2e2218; }

/* Seleção (filtros, abas internas, páginas, andares): quadrado, Cinzel, ativo = latão. Sem pílula. */
:where(.chip, .seg button, .vault-filter .chips button, .pz-qbtn, .floors button, #panelFoot button, .vault-pages button) {
  min-height: 28px; padding: 4px 10px; border: 1px solid #4a3820; border-radius: 3px; background: #1a1214;
  color: var(--muted); font: 12px/1.2 'Cinzel', serif; letter-spacing: .3px; }
:where(.chip, .seg button, .vault-filter .chips button, .pz-qbtn, .floors button, #panelFoot button, .vault-pages button):hover:not(:disabled) { border-color: #8a6a3e; color: var(--text); }
:where(.chip, .seg button, .vault-filter .chips button, .pz-qbtn, .floors button, #panelFoot button, .vault-pages button):is(.on, .cur) { border-color: var(--brass2); background: #3a2a1e; color: #ffecc0; }
:where(.chip, .seg button, .vault-filter .chips button, .pz-qbtn, .floors button, #panelFoot button, .vault-pages button):disabled:not(.on, .cur) { opacity: .45; cursor: not-allowed; }
.mini { background: #5a3e18; color: #ffe; border: 1px solid #000; border-radius: 3px; padding: 0 5px; font-size: 12px; line-height: 16px; }

/* ================= LOGIN ================= */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
#loginBg { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-box { position: relative; width: min(760px, 94vw); padding: 26px 34px 22px; }
.logo { font-family: 'Cinzel Decorative', serif; font-size: 58px; margin: 0; text-align: center; letter-spacing: 3px; color: #e9c27a;
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(240, 160, 32, .45), 3px 3px 0 #4a0c0c; }
.logo span { color: #f2e6c8; }
.subtitle { text-align: center; font-family: 'Cinzel', serif; color: var(--muted); letter-spacing: 6px; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid #4a3820; }
.tab { flex: 1; background: none; border: none; color: var(--muted); padding: 8px; font-size: 15px; border-bottom: 3px solid transparent; }
.tab.active { color: var(--brass2); border-color: var(--brass2); }
label { display: block; margin: 8px 0; color: var(--muted); font-size: 13px; letter-spacing: .5px; }
label input { display: block; width: 100%; margin-top: 4px; }
.create { display: flex; gap: 20px; align-items: flex-start; }
.create-form { flex: 1; }
#heroPreview { background: radial-gradient(ellipse at 50% 75%, #3a2a24, #120c10 70%); border: 2px solid #4a3820; border-radius: 4px; }
.row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.lbl { width: 105px; color: var(--muted); font-size: 13px; }
.seg { display: flex; gap: 3px; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #000; cursor: pointer; box-shadow: 0 0 0 1px #5a4528; }
.swatches i.on { box-shadow: 0 0 0 2px var(--brass2), 0 0 8px var(--brass2); }
.hint { font-style: italic; color: var(--muted); font-size: 13px; }
.err { color: #ff6060; min-height: 20px; text-align: center; margin-top: 8px; }

/* ================= HUD ================= */
#hud { --menu-button-height: calc(64px * var(--fs, 1)); position: fixed; inset: 0; pointer-events: none; z-index: 10; display: grid; grid-template: repeat(5, auto) / minmax(0, 1fr); align-content: start; }
#hud > * { pointer-events: auto; }
#stage { position: absolute; inset: 0; overflow: hidden; background: var(--ink); }
.mobile-only { display: none; }
#menu button.mobile-only { display: none; }
#sceneHeader, #sceneControls, #menuPrimary, #menuMore, #menuPages, #fieldDrawer, #houseExitWrap, #guildExitWrap { display: contents; }
body:not(.in-house) :is(.house-head, #houseBar, #houseExitWrap) { display: none; }
body:not(.in-guild) :is(.ghall-head, #guildExitWrap) { display: none; }
#chatForm, #chatTradeForm { display: flex; gap: 6px; }
#chatIn, #chatTradeIn { flex: 1; min-width: 0; }
/* chat: soltar item arrastado do inventário (linka no texto) */
#chat.drop-on { outline: 2px dashed var(--brass2); outline-offset: -2px; }
.inv-actions .inv-share { width: 100%; margin-top: 6px; }
/* presets: opção "só skills" no formulário */
.pz-only { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 0; cursor: pointer; color: var(--muted); }
.pz-only input { width: auto; margin: 0; flex: none; }
/* Círculo de Transmutação: abas e fusão de pedras */
.fuse-h { margin: 4px 0 6px; font-size: 13px; color: var(--brass2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fuse-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.fuse-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; background: rgba(0, 0, 0, .25); border: 1px solid #3a2c1c; border-radius: 4px; color: inherit; cursor: pointer; font: inherit; }
.fuse-opt:hover:not(:disabled) { border-color: #6b5230; }
.fuse-opt.sel { border-color: var(--brass2); background: rgba(201, 162, 92, .12); }
.fuse-opt.off { opacity: .4; cursor: not-allowed; }
.fuse-opt .cell { pointer-events: none; }
.fuse-opt-n { font-size: 12px; line-height: 1.1; }
.fuse-opt-q { font-size: 12px; color: #c9b48a; font-variant-numeric: tabular-nums; }
.fuse-recipe { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 14px 0 10px; padding: 14px 10px; background: rgba(0, 0, 0, .28); border: 1px solid #3a2c1c; border-radius: 4px; }
.fuse-side { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.fuse-side b { font-size: 14px; }
.fuse-side > span { font-family: 'Cinzel', serif; font-size: 20px; color: #f2e0b8; font-variant-numeric: tabular-nums; }
.fuse-arrow { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--brass2); }
.fuse-arrow b { font-family: 'Cinzel', serif; font-size: 15px; }
.fuse-arrow svg { width: 48px; height: 16px; }
.fuse-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fuse-qty { display: flex; align-items: center; gap: 6px; }
.fuse-lbl { margin-right: 4px; color: #c9b48a; }
.fuse-n { width: 64px; text-align: center; }
.fuse-cost { display: flex; flex-direction: column; align-items: flex-end; }
.fuse-cost b { font-family: 'Cinzel', serif; font-size: 18px; color: #f2e0b8; }
.fuse-cost b.neg { color: #e06a5a; }
@media (max-width: 560px) {
  .fuse-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fuse-bar { flex-direction: column; align-items: stretch; }
  .fuse-cost { align-items: center; }
}
/* As linhas acompanham a altura real dos cartões, inclusive quando os recursos quebram linha.
   position: relative põe os cartões acima do #stage (absolute, mesmo pai): estáticos ficavam escondidos atrás do canvas. */
:is(#playerCard, #profBadge, #worldBossOpen, #guildWarOpen, #globalQuestOpen, #bloodOpen) { position: relative; grid-column: 1; justify-self: start; margin-left: 12px; }
/* largura acompanha o tamanho da fonte (430px a 100%, 580px a 150%) para os recursos não quebrarem em várias linhas */
#playerCard { grid-row: 1; margin-top: 12px; display: flex; gap: 10px; padding: 10px 12px 10px 10px; width: max(430px, calc(130px + 300px * var(--fs, 1))); }
/* tamanho fixo: sem isso o canvas estica com a altura do cartão, fica mais largo e empurra o texto para fora */
#portrait { flex: none; align-self: center; width: 84px; height: 84px; border: 2px solid #6b5230; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2a2a, #0e0a0c); }
.pc-info { flex: 1; min-width: 0; }
.pc-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 16px; color: #f2e0b8; display: flex; justify-content: space-between; }
.lvl { color: var(--brass2); font-size: 14px; }
.bar { position: relative; height: calc(17px * var(--fs, 1)); background: #0b0709; border: 1px solid #000; margin-top: 5px; border-radius: 2px; box-shadow: inset 0 0 0 1px #3a2c1c; overflow: hidden; }
.bar > div { height: 100%; width: 0; transition: width .2s; }
.bar.hp > div { background: linear-gradient(180deg, #e04040, #8a1010 60%, #5a0808); box-shadow: inset 0 1px 0 rgba(255, 200, 200, .4); }
.bar.xp { height: calc(13px * var(--fs, 1)); }
.bar.xp > div { background: linear-gradient(180deg, #f0c060, #a07020); }
/* números das barras: fonte sem serifa e algarismos tabulares, contorno preto para ler sobre qualquer cor */
.bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Segoe UI', Tahoma, Verdana, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .2px; font-variant-numeric: tabular-nums; line-height: 1; text-box: trim-both cap alphabetic; color: #fff; text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000; }
.bar.xp span { font-size: 10px; color: #fff3d6; }
.pc-res { display: flex; flex-wrap: wrap; gap: 4px 5px; margin-top: 6px; font-size: 14px; color: var(--brass2); align-items: center; }
.pc-res > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 1px 5px; background: rgba(0,0,0,.35); border: 1px solid #3a2c1c; border-radius: 10px; }
.pc-res b { color: #f2e0b8; }
/* DPS logo depois da ampulheta (o cartão tem largura para caber na mesma linha) */
#hDps { color: var(--muted); font-size: 12px; background: none !important; border: none !important; padding: 0 !important; }

#floorTitle { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.ft-floor { font-family: 'Cinzel Decorative', serif; font-size: 26px; color: #f2e0b8; text-shadow: 0 2px 0 #000, 0 0 14px rgba(0, 0, 0, .9); }
.ft-name { font-family: 'Cinzel', serif; letter-spacing: 4px; color: var(--brass2); text-shadow: 0 1px 0 #000; font-size: 13px; }
.ft-boss { margin-top: 4px; font-size: 13px; color: #ff7a5a; text-shadow: 0 1px 2px #000; }
#profBadge { grid-row: 2; padding: 6px 12px; font-size: 13px; width: max(430px, calc(130px + 300px * var(--fs, 1))); }
#profBadge .bar { height: 7px; margin-top: 3px; }
#profBadge .bar > div { background: linear-gradient(90deg, #3f8f7f, #7fe0c8); }

#skillBar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: end; gap: 8px; }
.sk { width: 62px; height: 62px; position: relative; border: 2px solid #6b5230; border-radius: 6px; background: radial-gradient(circle, #2a1e22, #0e0a0c);
  box-shadow: 0 0 0 1px #000, 0 4px 12px rgba(0, 0, 0, .7); cursor: pointer; }
.sk canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk .cd { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Cinzel'; font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 0 4px #000; }
.sk .key { position: absolute; left: 3px; top: 1px; font-size: 10px; color: var(--muted); }
.sk .lv { position: absolute; right: 3px; bottom: 1px; font-size: 10px; color: var(--brass2); text-shadow: 0 0 2px #000; }
.sk.off { filter: grayscale(.85) brightness(.55); }
.sk.empty { opacity: .45; }
.sk.cooling .cd { background: rgba(7, 4, 12, .65); }
.sk.pet-skill { width: 44px; height: 44px; padding: 0; margin-left: 4px; border-color: #4e8f7f; overflow: hidden; }
.sk.pet-skill .cd { font-size: 15px; }
/* signature da arma: mesmo tamanho do pet, à esquerda das skills; moldura de latão (sem brilho) */
.sk.sig-skill { width: 44px; height: 44px; padding: 0; margin-right: 4px; border-color: #a8823e; overflow: hidden; }
.sk.sig-skill .cd { font-size: 15px; }
.sk.sig-skill.cooling .cd { background: none; }
.sk.sig-skill.cooling canvas { filter: grayscale(.7) brightness(.7); }
.sk.sig-skill .sig-sweep { position: absolute; inset: 0; pointer-events: none; }
.sk.sig-skill .chg { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 700; color: #f2e0b8; text-shadow: 0 0 2px #000, 0 0 2px #000; pointer-events: none; }
.sk.sig-skill.ready { animation: sigReady .45s ease-out; }
@keyframes sigReady { 0% { transform: scale(1); border-color: #fff2c0; } 35% { transform: scale(1.18); border-color: #fff2c0; } 100% { transform: scale(1); } }
/* corda (Fúria Engrenada e outras com wind): a recarga caiu — o ícone dá uma volta para trás e a moldura pisca latão */
.sk.wound { animation: skWound .55s ease-out; }
.sk.wound canvas { animation: skWoundTurn .55s cubic-bezier(.2, .7, .3, 1); }
@keyframes skWound { 0%, 40% { border-color: #e8c070; } 100% { border-color: #6b5230; } }
@keyframes skWoundTurn { 0% { transform: rotate(0); } 50% { transform: rotate(-200deg) scale(.86); } 100% { transform: rotate(-360deg); } }
body.in-duel .sig-skill { display: none; }
body.in-duel .pet-skill { display: none; }
.sk.pot-skill { width: 44px; height: 44px; padding: 0; margin-left: 4px; border-color: #3a8a4a; overflow: hidden; }
.sk.pot-skill .pot-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #6fff8a; }
.sk.pot-skill .cd { font-size: 15px; }
.sk.pot-skill .lv { color: #8fe0a0; }
body.in-duel .pot-skill, body.in-lobby .pot-skill { display: none; }
#buffBar { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.buff { font-size: 12px; background: rgba(20, 14, 17, .9); border: 1px solid #3f8f7f; border-radius: 3px; padding: 2px 7px; color: #9fe8d8; }

/* com fonte grande os botões quebram em mais linhas em vez de encolher e sobrepor os rótulos */
#menu { position: absolute; right: 12px; top: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
  max-width: calc((100vw - min(28vw, 408px * var(--hud-zoom, 1))) / var(--hud-zoom, 1) - 24px); }
#menu button { flex: none; width: calc(76px * var(--fs, 1)); min-width: 0; min-height: var(--menu-button-height); padding: 4px;
  background: linear-gradient(180deg, #2a1e22, #140e11); border: 2px solid #6b5230; border-radius: 5px; color: var(--brass2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .6); }
#menu button i { font-style: normal; font-size: min(calc(24px * var(--fs, 1)), 3vw / var(--hud-zoom, 1)); }
#menu button span { max-width: 100%; overflow-wrap: break-word; text-align: center; font-size: 10px; line-height: 1.15; color: var(--muted); }
#menu #menuToggle { flex: none; width: calc(28px * var(--fs, 1)); min-width: 28px; }
#menu #menuToggle span { display: none; }
#menu.collapsed > div button { display: none !important; }
#menu button:hover, #menu button.on { border-color: var(--brass2); background: linear-gradient(180deg, #3a2a1e, #1a1210); }

#chat { position: absolute; left: 12px; bottom: 12px; width: 400px; height: 210px; display: flex; flex-direction: column; padding: 8px; background: rgba(18, 12, 16, .82); }
/* alça no topo do chat: arrastar para cima aumenta a altura (lembrada no navegador) */
.chat-grip { position: absolute; left: 0; right: 0; top: -5px; height: 10px; cursor: ns-resize; touch-action: none; z-index: 2; }
.chat-grip::before { content: ''; position: absolute; left: 50%; top: 4px; width: 36px; height: 3px; margin-left: -18px; border-radius: 2px; background: #63472e; opacity: 0; transition: opacity .15s; }
#chat:hover .chat-grip::before, .chat-grip.drag::before { opacity: 1; }
#chatTabs { display: flex; gap: 4px; border-bottom: 1px solid #63472e; }
#chatTabs button { padding: 3px 10px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
#chatTabs button[aria-selected="true"] { border-color: #63472e; background: #2b1e22; color: var(--brass2); }
.chat-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; font-size: 13px; line-height: 1.35; padding-right: 4px; overflow-wrap: anywhere; }
.chat-log .c-name { color: var(--brass2); font-weight: bold; }
.chat-log .c-admin { background: rgba(214, 72, 52, .14); padding: 2px 4px; margin: 1px 0; }
.chat-log .c-admin .c-adm-tag { color: #ff8a6a; font-weight: bold; letter-spacing: .05em; }
.chat-log .c-admin .c-name { color: #ff8a6a; }
.chat-log .c-admin .c-adm-msg { color: #fff1d6; font-weight: bold; }
.chat-log .c-sys { color: #7fd0c0; font-style: italic; }
.chat-log .c-item { padding: 0; border: 0; background: none; font: inherit; font-weight: bold; text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
#chatIn { margin-top: 6px; }
#lootFeed { position: absolute; right: 245px; bottom: 14px; width: 300px; display: flex; flex-direction: column-reverse; gap: 3px; pointer-events: none; }
.loot { background: rgba(10, 6, 8, .82); border-left: 3px solid; padding: 3px 8px; font-size: 13px; animation: lootIn .3s ease-out, fade 1s 5s forwards; text-shadow: 0 1px 0 #000; }
@keyframes lootIn { from { transform: translateX(30px); opacity: 0 } }
@keyframes fade { to { opacity: 0 } }
#mapHud { --map-control-size: 22px; position: absolute; right: 12px; bottom: 12px; width: 220px; }
.map-toolbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto repeat(3, var(--map-control-size)); gap: 3px; margin-bottom: 4px; white-space: nowrap; }
#minimap { display: block; width: 100%; height: auto; border: 2px solid #6b5230; border-radius: 4px; background: rgba(10, 6, 8, .85); box-shadow: 0 0 0 1px #000; }
#online { align-self: center; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.map-toolbar :is(summary, button:is(#btnReport, #btnAutomation, #btnMapLogout)) { box-sizing: border-box; height: var(--map-control-size); cursor: pointer; padding: 0 4px; border: 1px solid #6b5230; border-radius: 4px; background: #1d1311; color: var(--brass2); font: inherit; font-size: 12px; }
#sessionStats summary { display: flex; align-items: center; justify-content: center; gap: 5px; list-style: none; line-height: 1; }
#sessionStats summary::-webkit-details-marker { display: none; }
#sessionStats summary::before { content: ''; border-block: 4px solid transparent; border-left: 6px solid currentColor; }
#sessionStats[open] summary::before { transform: rotate(90deg); }
.map-toolbar .session-stats { white-space: normal; }
/* Automação: diálogo de tamanho fixo com abas; a lista rola por dentro */
#automation { width: min(600px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 24px)); max-height: none; max-width: none; padding: 16px 18px; color: var(--text); overflow: hidden; }
#automation[open] { display: flex; flex-direction: column; }
#automation::backdrop { background: #000a; }
#automation .dlg-head { flex: none; display: flex; align-items: center; justify-content: space-between; }
#automation .dlg-head h2 { margin: 0; color: var(--brass2); font: 700 18px 'Cinzel', serif; }
#automation .auto-lock, .auto-tabs, #automation .dlg-foot { flex: none; }
#automation .dlg-foot { margin-top: 0; }
.auto-tabs { display: flex; margin-top: 6px; border-bottom: 1px solid #53402e; }
.auto-tabs button { flex: 1 1 auto; min-height: 38px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 13px 'Cinzel', serif; cursor: pointer; }
.auto-tabs button:hover { color: var(--text); }
.auto-tabs button[aria-selected="true"] { color: var(--brass2); border-bottom-color: var(--brass2); }
.auto-tabs button:focus-visible { outline: 2px solid var(--brass2); outline-offset: -3px; }
.auto-body { flex: 1 1 0; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; padding: 4px 4px 12px 0; }
.automation-settings small:not(.keep) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.auto-q { width: 18px; height: 18px; margin-left: 7px; padding: 0; border: 1px solid #6b5230; border-radius: 50%; background: none; color: var(--muted); font: 700 11px/1 'Cinzel', serif; cursor: help; vertical-align: 1px; }
.auto-q:hover { color: var(--brass2); border-color: var(--brass2); }
.automation-option { position: relative; display: flex; align-items: center; gap: 14px; margin: 0; padding: 9px 2px; min-height: 42px; box-sizing: border-box; border-bottom: 1px dotted #2e2218; cursor: pointer; }
.automation-option:last-of-type { border-bottom: 0; }
.automation-copy { position: relative; flex: 1; display: flex; align-items: center; }
.automation-copy strong { color: var(--text); font-size: 15px; line-height: 1.2; }
.automation-settings small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.automation-settings input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.automation-switch { position: relative; flex: 0 0 44px; height: 24px; border: 1px solid #826842; border-radius: 12px; background: #231a1c; }
.automation-switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #a28c73; box-shadow: 0 1px 3px #000; }
.automation-option input:checked + .automation-switch { border-color: #e0b764; background: #725123; }
.automation-option input:checked + .automation-switch::before { left: 23px; background: linear-gradient(#ffe2a2, #c59548); }
.automation-option.off { opacity: .5; cursor: default; }
.automation-option input:focus-visible + .automation-switch { outline: 2px solid var(--brass2); outline-offset: 3px; }
.automation-ranged { position: relative; min-inline-size: 0; margin: 12px 0 0; padding: 0; border: 0; }
.automation-ranged legend { width: 100%; padding: 0 0 4px; border-bottom: 1px solid #3a2c1c; color: var(--brass2); font: 700 14px 'Cinzel', serif; }
.automation-ranged > :is(.loot-keep, .automation-modes, .pot-at) { margin-top: 10px; }
.automation-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.automation-modes label { position: relative; cursor: pointer; }
.automation-modes span { display: block; padding: 9px 3px; border: 1px solid #53402e; border-radius: 3px; color: var(--muted); font-size: 14px; text-align: center; }
.automation-modes input:checked + span { border-color: #a97b41; background: #36251c; color: var(--brass2); }
.automation-modes input:focus-visible + span { outline: 2px solid var(--brass2); outline-offset: 2px; }
.loot-keep { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.pot-at { display: flex; align-items: center; gap: 10px; }
.automation-settings .pot-at input { position: static; flex: 1; width: auto; height: 30px; opacity: 1; accent-color: var(--brass2); cursor: pointer; }
.pot-at output { min-width: 3.5em; text-align: right; color: var(--brass2); font-size: 16px; font-variant-numeric: tabular-nums; }
.loot-keep button { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; padding: 4px 6px; border: 1px solid #3a2c1c; border-radius: 4px; background: #120d10; color: var(--text); text-align: left; cursor: pointer; }
.loot-keep button:hover { border-color: #826842; }
.loot-keep button:disabled { cursor: default; opacity: .7; }
.loot-keep i { flex: none; width: 34px; height: 34px; border: 2px solid var(--c); border-radius: 4px; background: #0c080a; }
.loot-keep canvas { display: block; width: 34px; height: 34px; }
.loot-keep span { display: grid; min-width: 0; line-height: 1.15; } .loot-keep b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.loot-keep em { font-size: 12px; font-style: normal; color: #8fd07a; } .loot-keep .st-off { color: #c9826a; }
.loot-keep.destroys .st-on { color: #c9826a; } .loot-keep.destroys .st-off { color: #8fd07a; }
.loot-keep button[aria-pressed="true"] .st-off, .loot-keep button[aria-pressed="false"] .st-on { display: none; }
.loot-keep:not(.destroys) button[aria-pressed="false"] i, .loot-keep.destroys button[aria-pressed="true"] i { filter: grayscale(1) brightness(.6); border-style: dashed; }
.loot-keep button:focus-visible { outline: 2px solid var(--brass2); outline-offset: 2px; }
.session-stats { position: absolute; right: 0; bottom: calc(100% + 4px); width: max-content; margin: 0; padding: 10px 12px; display: grid; grid-template-columns: auto auto; gap: 6px 16px; font-size: 13px; }
.session-stats dd { margin: 0; text-align: right; color: var(--brass2); font-variant-numeric: tabular-nums; }
#deathOverlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(80, 0, 0, .35), rgba(0, 0, 0, .7));
  font-family: 'Cinzel Decorative'; font-size: 64px; color: #c01818; text-shadow: 0 0 30px #000, 3px 3px 0 #000; pointer-events: none; }
#deathOverlay small { font-family: 'Cinzel'; font-size: 20px; color: var(--text); }

/* ================= PAINEL ================= */
#panel { position: fixed; z-index: 20; right: 12px; top: 88px; width: min(var(--panel-width, 820px), 96vw); max-height: calc(100vh - 110px); display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px; border-bottom: 1px solid #4a3820;
  background: linear-gradient(180deg, rgba(90, 62, 24, .35), transparent); }
.panel-head h2 { margin: 0; font-family: 'Cinzel Decorative'; font-size: 22px; color: var(--brass2); text-shadow: 0 2px 0 #000; }
.x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: none; border: none; color: var(--muted); font-size: 20px; line-height: 1; }
.x:hover { color: #fff; }
#panelBody { flex: 1 1 auto; overflow-y: auto; padding: 12px 16px 16px; }
/* rodapé fixo do painel (paginação do mercado/ranking) */
#panelFoot { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid #4a3820;
  background: linear-gradient(0deg, rgba(90, 62, 24, .3), transparent); }
#panelFoot.hidden { display: none; }
#panelFoot .gap { color: var(--muted); padding: 0 2px; }
#panelFoot .info { color: var(--muted); font-size: 12px; margin-left: 8px; }
h3 { font-family: 'Cinzel'; color: var(--brass2); font-size: 15px; margin: 14px 0 8px; border-bottom: 1px solid #3a2c1c; padding-bottom: 4px; letter-spacing: 1px; }
.cols { display: flex; gap: 18px; }
.cols > div { flex: 1; min-width: 0; }
.stat { display: flex; justify-content: space-between; padding: 2px 0; font-size: 14px; border-bottom: 1px dotted #2e2218; }
.stat b { color: #f2e0b8; font-weight: normal; }
.attr { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.attr .n { width: 90px; color: var(--muted); }
.attr b { width: 40px; color: #f2e0b8; }

.equip-grid { display: grid; grid-template-columns: repeat(4, 74px); gap: 8px; }
.slot { width: 74px; height: 74px; border: 2px solid #4a3820; border-radius: 5px; background: radial-gradient(circle, #241a1f, #0c080a); position: relative; cursor: pointer; }
.slot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot .sl { position: absolute; bottom: 1px; width: 100%; text-align: center; font-size: 10px; color: var(--muted); text-shadow: 0 0 3px #000; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, 58px); gap: 6px; }
.cell { width: 58px; height: 58px; border: 2px solid #3a2c1c; border-radius: 4px; background: radial-gradient(circle, #221a1e, #0c080a); position: relative; cursor: pointer; }
.cell canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cell .salvage-checkbox { position: absolute; left: 2px; bottom: 2px; margin: 0; cursor: pointer; pointer-events: none; }
.cell.picked { outline: 2px solid #e8c25a; box-shadow: inset 0 0 10px rgba(232, 194, 90, .45); }
.cell .fav { position: absolute; right: 2px; bottom: 0; font-size: 12px; color: #ffd84a; text-shadow: 0 0 2px #000; pointer-events: none; }
.cell.sel { outline: 2px solid #fff; }
.cell .badge { position: absolute; right: 2px; top: 1px; font-size: 10px; color: #7fe0c8; text-shadow: 0 0 2px #000; }
.cell .up { position: absolute; left: 2px; top: 0; font-size: 11px; color: #6f6; text-shadow: 0 0 2px #000; }
.cell .qty { position: absolute; left: 3px; bottom: 1px; font-size: 10px; font-weight: 600; color: #f1e4c2; text-shadow: 0 0 2px #000, 0 0 2px #000; pointer-events: none; }
.r0 { border-color: #5a564e !important; } .r1 { border-color: #3f7f30 !important; } .r2 { border-color: #2f6fb0 !important; }
.r3 { border-color: #7a30b0 !important; box-shadow: 0 0 6px rgba(162, 74, 224, .4); } .r4 { border-color: #c08010 !important; box-shadow: 0 0 8px rgba(240, 160, 32, .5); }
.r5 { border-color: #c02020 !important; box-shadow: 0 0 10px rgba(224, 48, 48, .6); } .r6 { border-color: #20c0c0 !important; box-shadow: 0 0 12px rgba(48, 224, 224, .7); animation: relic 2s infinite; }
@keyframes relic { 50% { box-shadow: 0 0 18px rgba(48, 224, 224, .95); } }
.cell .up { letter-spacing: -2px; }
/* régua do atributo, rebites e comparação em barras */
.rul { position: relative; height: 5px; margin: 1px 0 5px; }
.rul i { position: absolute; top: 0; bottom: 0; background: rgba(14, 9, 12, .74); }
.rul b { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -2.5px; background: #fff2cf; border: 1px solid #000; box-sizing: content-box; }
.rivets { display: flex; gap: 4px; margin: 5px 0; }
.rivets i { width: 9px; height: 9px; box-sizing: border-box; border-radius: 50%; border: 1px solid #3a2f28; }
.rivets i.can { border-color: currentColor; } .rivets i.on { background: currentColor; border-color: currentColor; }
.cb { display: grid; grid-template-columns: minmax(58px, 34%) 1fr minmax(46px, auto); align-items: center; gap: 8px; line-height: 1.5; }
.cb > :last-child { text-align: right; }
.cb-bar { display: flex; height: 6px; background: #140e10; } .cb-bar i { background: #8a6a32; } .cb-bar .gain { background: #5fbf4a; } .cb-bar .loss { background: #b8402f; }
/* opções do tooltip (Configurações) */
.no-riv .rivets, .no-rul .rul { display: none; }
.set-h { margin: 6px 0 0; font-size: 13px; }
/* ganhos por ponto de atributo */
.aw { display: flex; flex-wrap: wrap; gap: 2px; margin: 3px 0; } .aw span { width: 24px; height: 24px; box-sizing: border-box; border: 1px solid transparent; border-radius: 3px; opacity: .55; }
.aw span.cur { opacity: 1; border-color: var(--brass2); } .aw canvas { display: block; width: 22px; height: 22px; }
.ag { display: grid; grid-template-columns: 1fr auto auto; gap: 0 9px; font-size: 11px; color: var(--muted); line-height: 1.5; } .ag > :not(:nth-child(3n+1)) { text-align: right; } .ag-t { color: #f2e0b8; }
.attr-base { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 8px 0; font-size: 12px; color: var(--muted); } .attr-base b { color: #f2e0b8; } .ag b { font-weight: 600; } .ag-n { color: var(--brass2); font-weight: 700; }
.stat.pv > b { color: #8fe07a; margin-left: auto; } .stat.pv::after { content: attr(data-pv); color: #8fe07a; margin-left: 6px; }
.ag b.capd, .stat.pv.capd > b, .stat.pv.capd::after { color: #e0894a; } /* ganho de atributo que já está no teto */
.t0 { color: var(--r0); } .t1 { color: var(--r1); } .t2 { color: var(--r2); } .t3 { color: var(--r3); } .t4 { color: var(--r4); } .t5 { color: var(--r5); } .t6 { color: var(--r6); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .sp { flex: 1; }
/* ---- presets: faixa rápida (Personagem / Skills) ---- */
.pz-quick { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 7px 10px; border: 1px solid #4a3820; border-radius: 5px; background: #150f12; }
.pz-quick-l { flex: none; color: var(--muted); font: 700 12px 'Cinzel', serif; letter-spacing: 1px; text-transform: uppercase; }
.pz-quick-list { flex: 1; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.pz-qbtn { flex: none; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-qbtn.on { cursor: default; }
.pz-manage { flex: none; }

/* ---- presets: aba própria ---- */
#panel[data-view="presets"] { width: min(860px, 96vw); }
.pz-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pz-count { display: flex; align-items: baseline; gap: 8px; }
.pz-count b { color: var(--brass2); font: 700 22px 'Cinzel', serif; font-variant-numeric: tabular-nums; }
.pz-count span { color: var(--muted); font-size: 14px; }
/* build ao vivo do Personagem: de onde o preset copia (clicar abre Personagem) */
.pz-src { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px; border: 1px solid #4a3820; border-radius: 5px; background: #120d10; color: var(--muted); }
.pz-src:hover, #panel[data-view="presets"]:has(.pz-save:not(:disabled):hover, .pz-new:focus-within) .pz-src { border-color: var(--brass2); color: var(--brass2); background: #1d1518; }
.pz-src:focus-visible { outline: 2px solid var(--brass2); outline-offset: 1px; }
.pz-src-ico { flex: none; font-size: 26px; line-height: 1; }
.pz-src-gear { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; min-width: 0; }
.pz-src-cell { position: relative; aspect-ratio: 1; border: 1px solid #3a2c1c; border-radius: 3px; background: radial-gradient(circle, #241a1f, #0c080a); }
.pz-src-cell canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz-src-cell.empty { border-style: dashed; opacity: .5; }
.pz-src-arrow { display: grid; justify-self: center; width: 22px; height: 22px; margin: -6px 0; color: #6a5236; }
#panel[data-view="presets"]:has(.pz-save:not(:disabled):hover, .pz-new:focus-within, .pz-src:hover) .pz-src-arrow { color: var(--brass2); }
.pz-src-arrow svg { width: 100%; height: 100%; }
.pz-foot { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #2e2218; font-size: 13px; text-align: center; }
.pz-auto { flex: 0 1 330px; padding: 8px 10px; }
.pz-auto input { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; }
.pz-auto small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.pz-auto:has(input:disabled) { opacity: .55; cursor: default; }

.pz-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.pz-side { display: grid; gap: 10px; }
.pz-list { display: grid; gap: 4px; }
.pz-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 5px; background: #171014; color: var(--text); text-align: left; font-family: 'IM Fell English', serif; }
.pz-item:hover { background: #21181c; border-color: #4a3820; }
.pz-item.sel { background: #2b1f1d; border-color: var(--brass2); }
.pz-item-ico { position: relative; flex: none; width: 44px; height: 44px; border: 2px solid #3a2c1c; border-radius: 4px; background: radial-gradient(circle, #241a1f, #0c080a); }
.pz-item-ico canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz-item-ico.empty { border-style: dashed; }
.pz-item-tx { min-width: 0; display: grid; gap: 2px; }
.pz-item-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2e0b8; font-size: 15px; }
.pz-item.sel .pz-item-nm { color: var(--brass2); }
.pz-item-sub { display: flex; gap: 8px; color: var(--muted); font-size: 12.5px; }
.pz-auto-tag { color: #d8b878; }
.pz-live { color: #8fd07a; }
.pz-warn { color: #e89a86; }
.pz-add { width: 100%; border-style: dashed; }
.pz-full { margin: 0; font-size: 13px; text-align: center; }
.pz-new-row { display: flex; gap: 6px; }
.pz-new-row .btn { white-space: nowrap; }
.pz-new-row .btn:last-child { flex: 1; }
.ch-skills { display: flex; justify-content: center; gap: 6px; padding: 4px 0 6px; }
.ch-sk { position: relative; width: 44px; height: 44px; padding: 0; border: 2px solid #4a3820; border-radius: 6px; background: radial-gradient(circle, #241a1f, #0c080a); }
.ch-sk canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch-sk.empty { border-style: dashed; opacity: .6; }
.ch-sk:hover { border-color: var(--brass2); }
.ch-sk .key { position: absolute; left: 2px; bottom: 0; color: var(--muted); font: 700 10px 'Cinzel', serif; text-shadow: 0 1px 0 #000; }
.pz-new { display: grid; gap: 6px; padding: 10px; border: 1px dashed #5a4528; border-radius: 5px; background: #120d10; }
.pz-new-h { color: var(--muted); font: 700 12px 'Cinzel', serif; letter-spacing: 1px; text-transform: uppercase; }
.pz-new input:not([type=checkbox]) { width: 100%; min-width: 0; }

.pz-main { min-width: 0; padding: 14px 16px; border: 1px solid #4a3820; border-radius: 6px; background: #171014; }
.pz-main.pz-empty { padding: 26px 22px; text-align: center; }
.pz-main.pz-empty h3 { border: 0; margin-top: 0; }
.pz-main.pz-empty p { max-width: 34em; margin: 8px auto; line-height: 1.45; }
.pz-head { display: flex; align-items: center; gap: 10px; }
.pz-name { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; overflow-wrap: anywhere; font-size: 20px; }
.pz-rename { flex: 1; display: flex; gap: 6px; align-items: center; }
.pz-rename input { flex: 1; min-width: 0; font-size: 16px; }
.pz-status { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.pz-status.pz-live { color: #8fd07a; }
.pz-status.pz-warn { color: #e89a86; }
.pz-sec { padding: 12px 0 2px; border-top: 1px solid #2e2218; }
.pz-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pz-sec-h h4 { margin: 0; color: var(--muted); font: 700 12px 'Cinzel', serif; letter-spacing: 1px; text-transform: uppercase; }
.pz-sec-h small { font-size: 12px; }

.pz-gear { display: grid; grid-template-columns: repeat(8, minmax(0, 66px)); gap: 7px; }
.pz-cell { position: relative; aspect-ratio: 1; border: 2px solid #3a2c1c; border-radius: 5px; background: radial-gradient(circle, #241a1f, #0c080a); }
.pz-cell canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz-cell.empty { border-style: dashed; opacity: .6; }
.pz-cell.missing { border-style: dashed; border-color: #8a3a2c; }
.pz-x { position: absolute; inset: 0 0 12px; display: grid; place-items: center; color: #e89a86; font: 700 20px 'Cinzel', serif; }
.pz-sl { position: absolute; bottom: 1px; width: 100%; text-align: center; font-size: 10px; color: var(--muted); text-shadow: 0 1px 0 #000; pointer-events: none; }
.pz-cell.chg::after, .pz-sk.chg .pz-sk-ico::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 11px 11px 0; border-color: transparent var(--brass2) transparent transparent; border-top-right-radius: 2px; }

.pz-skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pz-sk { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.pz-sk-ico { position: relative; width: 50px; height: 50px; border: 2px solid #4a3820; border-radius: 6px; background: radial-gradient(circle, #241a1f, #0c080a); }
.pz-sk-ico canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz-sk.empty .pz-sk-ico { border-style: dashed; opacity: .6; }
.pz-sk-ico .key { position: absolute; left: 2px; bottom: 0; color: var(--muted); font: 700 10px 'Cinzel', serif; text-shadow: 0 1px 0 #000; }
.pz-sk-nm { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: center; line-height: 1.15; font-size: 12.5px; color: var(--text); }
.pz-sk.empty .pz-sk-nm { color: var(--muted); }

.pz-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #53402e; border-radius: 4px; overflow: hidden; }
.pz-seg-b { padding: 6px 14px; border: 0; border-right: 1px solid #53402e; background: #120d10; color: var(--muted); font-size: 13px; }
.pz-seg-b:last-child { border-right: 0; }
.pz-seg-b:hover { color: var(--text); background: #1d1518; }
.pz-seg-b.on { background: #36251c; color: var(--brass2); cursor: default; }
.pz-use-help { margin: 6px 0 4px; font-size: 13px; }

.pz-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #2e2218; }
.pz-apply { margin-left: auto; padding-inline: 18px; }
.pz-note { margin: 8px 0 0; font-size: 13px; }
.pz-item:focus-visible, .pz-qbtn:focus-visible, .pz-seg-b:focus-visible { outline: 2px solid var(--brass2); outline-offset: 1px; }

@media (max-width: 720px) {
  .pz-layout { grid-template-columns: minmax(0, 1fr); }
  .pz-side { display: contents; }
  .pz-new { order: 2; }
  .pz-list { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: thin; }
  .pz-item { flex: 0 0 auto; width: auto; max-width: 15em; }
  .pz-main { padding: 12px; }
  .pz-gear { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pz-auto { flex-basis: 100%; }
  .pz-actions .btn { flex: 1 1 auto; }
  .pz-apply { margin-left: 0; }
  .pz-src-gear { flex: 0 1 auto; grid-template-columns: repeat(9, 28px); }
  .pz-src-arrow { display: none; }
}
.preset-secondary { background: transparent; border-color: #624d37; box-shadow: none; }
.preset-delete { color: #eeb0a0; }
.preset-rule { display: grid; grid-template-columns: 6em minmax(0, 1fr); align-items: center; gap: 6px; margin-top: 6px; }
.preset-rule select { width: 100%; }
.prof-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 14px; }
.prof-row .n { width: 120px; }
.prof-row .bar { flex: 1; height: 10px; margin: 0; }
.prof-row .bar > div { background: linear-gradient(90deg, #3f8f7f, #7fe0c8); }
.prof-row b { width: 46px; text-align: right; color: var(--brass2); }
.prof-row.cur .n { color: var(--brass2); }


.floor-list { display: flex; flex-direction: column; gap: 10px; }
.biome { border: 1px solid #3a2c1c; border-radius: 5px; padding: 8px 10px; background: rgba(0, 0, 0, .25); }
.biome-h { display: grid; grid-template-columns: min(410px, 55%) minmax(0, 1fr); align-items: center; gap: 12px; }
.biome-creatures { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: 84px; gap: 4px; place-items: center; }
.biome-creatures canvas { display: block; max-width: 100%; height: auto; }
.depth-creature { position: relative; max-width: 100%; }
.depth-creature canvas {
  position: absolute; left: 50%; top: 50%; width: 300%; max-width: none;
  transform: translate(-50%, -50%); pointer-events: none;
}
.depth-creatures + .biome-description, .depth-floors { position: relative; }
.biome-description { justify-self: end; padding-inline-end: 10px; text-align: right; }
.biome-h .bn { font-family: 'Cinzel'; font-size: 16px; color: #f2e0b8; }
.biome-h .bm { font-size: 12px; color: var(--muted); }
.floors { display: flex; gap: 6px; margin-top: 6px; }
.depth-floors { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); }
.floors button { flex: 1; }
.biome.locked { opacity: .55; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font-family: 'Cinzel'; font-size: 12px; color: var(--muted); text-align: left; border-bottom: 1px solid #4a3820; padding: 5px; }
td { padding: 5px; border-bottom: 1px solid #241a1c; vertical-align: middle; }
tr:hover td { background: rgba(224, 183, 100, .05); }
td canvas { width: 40px; height: 40px; display: block; border-radius: 3px; border: 1px solid #3a2c1c; }
.price { color: var(--brass2); white-space: nowrap; }

/* tooltip */
:is(#tooltip, #tooltip-eq) { position: fixed; z-index: 100; pointer-events: none; min-width: 230px; max-width: 320px; background: rgba(14, 9, 12, .97); border: 2px solid #6b5230; border-radius: 4px; padding: 10px 12px; font-size: 13px; box-shadow: 0 8px 26px #000; }
:is(#tooltip, #tooltip-eq, .forge-tip) .tn { font-family: 'Cinzel'; font-weight: 700; font-size: 15px; }
:is(#tooltip, #tooltip-eq, .forge-tip) .tr { font-size: 12px; margin-bottom: 6px; }
:is(#tooltip, #tooltip-eq, .forge-tip) .tm { color: #f2e0b8; font-size: 14px; }
:is(#tooltip, #tooltip-eq, .forge-tip) .ta { color: #8fd0ff; }
/* atributo transmutado de outra raridade: cor da raridade de origem (vence a cor padrão do atributo) */
:is(#tooltip, #tooltip-eq, .forge-tip) .ta.t0, .ta.t0 { color: var(--r0); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t1, .ta.t1 { color: var(--r1); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t2, .ta.t2 { color: var(--r2); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t3, .ta.t3 { color: var(--r3); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t4, .ta.t4 { color: var(--r4); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t5, .ta.t5 { color: var(--r5); } :is(#tooltip, #tooltip-eq, .forge-tip) .ta.t6, .ta.t6 { color: var(--r6); }
:is(#tooltip, #tooltip-eq, .forge-tip) .ts { color: #7fe0c8; margin-top: 6px; border-top: 1px solid #2e2218; padding-top: 5px; }
:is(#tooltip, #tooltip-eq, .forge-tip) .tq { color: var(--muted); font-size: 12px; margin-top: 6px; }
.thash { margin-top: 4px; color: var(--muted); opacity: .75; font: 11px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .02em; word-break: break-all; user-select: all; }
:is(#tooltip, #tooltip-eq, .forge-tip) .cmp { margin-top: 6px; border-top: 1px solid #2e2218; padding-top: 5px; font-size: 12px; }
:is(#tooltip-eq) .teq { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.pos { color: #6f6; } .neg { color: #f66; }

#toasts { position: fixed; top: 110px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
body:has(#panel[data-view="presets"]:not(.hidden)) #toasts { top: auto; bottom: 14px; }
.toast { background: rgba(14, 9, 12, .92); border: 1px solid #6b5230; padding: 7px 18px; border-radius: 3px; font-family: 'Cinzel'; font-size: 15px; color: #f2e0b8;
  animation: lootIn .25s, fade .8s 3.2s forwards; text-shadow: 0 1px 0 #000; box-shadow: 0 4px 14px #000; }
.toast.lvl { border-color: var(--brass2); color: var(--brass2); font-size: 18px; }
.toast.boss { border-color: #c02020; color: #ff8a6a; }
.toast.death { border-color: #800; color: #f66; }
.toast.err { border-color: #800; color: #f88; }
.toast.hold { animation: lootIn .25s; border-color: #800; color: #f88; }   /* fixo enquanto a saída espera (sem fade) */
.toast.skill { border-color: #3f8f7f; color: #9fe8d8; }
#modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; }
.modal-box { padding: 22px 30px; min-width: 380px; text-align: center; }
/* #modal (offline / boas-vindas / presente): cabe na tela; o corpo rola, o rodapé (.dlg-foot) fica sempre visível */
#modal .modal-box { position: relative; display: flex; flex-direction: column; max-width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px 24px 14px; }
#modal .modal-box:has(#modalBody.two) { max-width: min(1000px, calc(100vw - 24px)); }
#modalX { position: absolute; top: 8px; right: 8px; }
#modalBody { min-height: 0; overflow: auto; overscroll-behavior: contain; }
#modalBody h2 { margin: 0 28px 8px; font-size: 22px; }
#modalBody .stat { padding: 3px 0; }
#modalBody .tq { margin: 6px 0; }
#modal .dlg-foot { flex: none; margin-top: 10px; padding-top: 10px; }
/* duas seções (offline + presente) lado a lado quando há largura */
@media (min-width: 860px) {
  #modalBody.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; align-items: start; }
  #modalBody.two > * + .mdl-sec { margin-top: 0 !important; border-top: 0 !important; padding-top: 0 !important; padding-left: 26px; border-left: 1px solid #3a2c1e; }
}
.modal-box h2 { font-family: 'Cinzel Decorative'; color: var(--brass2); margin-top: 0; }
.modal-box .stat { text-align: left; }
/* escolha da arma inicial (ui.js starterPick): opção marcada só muda a borda */
.pick-dlg { width: min(560px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 18px; color: var(--text); background-color: #1b1418; overflow: auto; }
.pick-dlg::backdrop { background: #000a; }
.pick-intro { margin: 2px 0 14px; color: #cbbd9e; font-size: 15px; line-height: 1.4; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 12px 8px; text-align: center; cursor: pointer;
  background: #150f12; border: 1px solid #3a2c1e; border-radius: 3px; }
.pick-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pick-opt .cell { width: 56px; height: 56px; pointer-events: none; }
.pick-opt b { color: #f2e0b8; font-weight: normal; font-size: 15px; }
.pick-opt small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pick-opt:hover { border-color: #6b5230; }
.pick-opt:has(input:checked) { border-color: var(--brass2); background: #261b12; }
.pick-opt:has(input:focus-visible) { outline: 2px solid var(--brass2); outline-offset: 1px; }
.pick-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pick-grid.three canvas { width: 56px; height: 56px; pointer-events: none; }
@media (max-width: 520px) {
  .pick-grid.three { grid-template-columns: 1fr; }
  .pick-grid.three .pick-opt { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; text-align: left; align-items: start; }
  .pick-grid.three canvas { grid-row: 1 / span 2; }
}
@media (max-width: 520px) { .pick-grid:not(.three) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 420px) { .pick-dlg { padding: 10px 18px; } .pick-intro { margin-bottom: 8px; } .pick-opt { padding: 8px; gap: 4px; } .pick-dlg .dlg-foot { margin-top: 8px; padding-top: 8px; } }
/* dica de novato: uma por vez acima da barra de skills (ui.js coach). Sem brilho nem faixa lateral. */
.coach { position: absolute; bottom: 132px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px;
  max-width: min(560px, calc(100% - 24px)); padding: 6px 6px 6px 12px; background: rgba(20, 14, 17, .94); border: 1px solid #6b5230; border-radius: 4px; color: #f0dcae; font-size: 14px; }
.coach.hidden { display: none; }
.coach .coach-t { flex: 1; min-width: 0; }
.coach .x { flex: none; background: none; border: 0; color: #b89a6a; font-size: 16px; cursor: pointer; padding: 2px 6px; }
body.in-lobby .coach { display: none; }
/* tutorial do PC (tutorial.js): contorno simples no elemento + cartão ao lado. Sem brilho. */
body.tut-run .coach { display: none; }
.tut-on { outline: 2px solid #e8c070; outline-offset: 3px; border-radius: 4px; }
.tut-card { position: fixed; z-index: 60; width: 280px; padding: 10px 12px; background: rgba(28, 20, 16, .97); border: 1px solid #a08050;
  border-radius: 4px; color: #f0dcae; font-size: 14px; }
.tut-card .tut-top { display: flex; justify-content: space-between; align-items: center; color: #b89a6a; font-size: 12px; }
.tut-card .x { background: none; border: 0; color: #b89a6a; font-size: 16px; cursor: pointer; padding: 0 4px; }
.tut-card .tut-h { font-weight: 600; margin: 4px 0 2px; }
.tut-card .tut-x { color: #d8c8a4; line-height: 1.45; }
.tut-card .dlg-foot { margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; }
/* presente de boas-vindas: o que veio hoje em células grandes + trilha de 7 dias com ícones.
   Raridade só pela moldura da célula (.rN) e cor do texto; sem brilho. */
#modalBody > * + .wg { margin-top: 16px; border-top: 1px solid #3a2c1e; padding-top: 14px; }
.wg { max-width: 470px; margin: 0 auto; }
/* card do presente de boas-vindas: canto inferior direito, pula até ser clicado */
.wg-card { position: fixed; right: 16px; bottom: 96px; z-index: 80; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px;
  border: 1px solid #6b5230; border-radius: 6px; background: #1d1510; color: #f2e0b8; font: inherit; text-align: left; cursor: pointer;
  animation: wg-bounce 1.6s ease-in-out infinite; }
.wg-card:hover { border-color: #c9a35a; animation-play-state: paused; }
.wg-card-ico { width: 32px; height: 32px; display: grid; place-items: center; }
.wg-card > span:last-child { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; }
.wg-card b { font-weight: normal; }
.wg-card small { color: var(--muted); font-size: 11px; }
@keyframes wg-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } 45% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .wg-card { animation: none; } }
.wg-prog { display: flex; gap: 4px; margin: 4px auto 6px; max-width: 280px; }
.wg-prog i { flex: 1; height: 6px; border-radius: 2px; background: #2a1f17; border: 1px solid #3f2f20; }
.wg-prog i.on { background: linear-gradient(180deg, #e2bd6a, #a07a32); border-color: #6b5230; }
.wg-sub { margin: 0 0 10px; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.wg-got { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 18px; margin: 4px 0 14px; }
.wg-got-it { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 120px;
  animation: wg-in .45s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(.15s + var(--d) * .14s); }
.wg-got-it .cell { width: 64px; height: 64px; cursor: default; }
.wg-got-it > span { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; }
.wg-got-it b { font-weight: normal; color: #f2e0b8; overflow-wrap: anywhere; }
.wg-got-it small { color: var(--muted); font-size: 11px; }
@keyframes wg-in { from { transform: translateY(10px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.wg-ico { cursor: default; display: grid; place-items: center; }
.wg-svg { position: absolute; inset: 0; display: grid; place-items: center; }
.wg-svg svg { width: 62%; height: 62%; }
.wg-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 6px; }
.wg-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px 6px;
  border: 1px solid #4a3826; border-radius: 4px; background: #160f0c; font-size: 11px; line-height: 1.25; color: var(--muted); min-width: 0; }
.wg-day .cell { width: 44px; height: 44px; }
.wg-day.last { grid-column: span 2; flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 10px; background: #1d1410; }
.wg-day.last .wg-n { width: 100%; text-align: center; }
.wg-day.last .cell { width: 56px; height: 56px; }
.wg-n { color: #f2e0b8; font-weight: normal; font-size: 12px; }
.wg-lbl { display: flex; flex-direction: column; align-items: center; overflow-wrap: anywhere; text-align: center; }
.wg-day.done { opacity: .5; }
.wg-day.done .cell canvas, .wg-day.done .wg-svg { filter: grayscale(.7); }
.wg-day.today { border-color: var(--brass2); background: #261b12; animation: wg-in .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.wg-ok { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 13px; color: #8fbf6a; }
@media (prefers-reduced-motion: reduce) { .wg-got-it, .wg-day.today { animation: none; } }
@media (max-width: 560px) { .modal-box { min-width: 0; } .wg-got-it { width: 104px; } }
#floorFeeDialog, #confirmDialog { position: fixed; width: min(360px, calc(100% - 32px)); padding: 18px 22px; color: var(--text); }
#floorFeeDialog::backdrop, #confirmDialog::backdrop { background: rgba(0, 0, 0, .6); }
#floorFeeDialog h2, #confirmDialog h2 { margin: 0; color: var(--brass2); font-size: 18px; }
#floorFeeDialog form, #confirmDialog form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#confirmDialog { z-index: 95; }
#confirmDialog form { flex-wrap: nowrap; justify-content: space-between; }
#potDialog { position: fixed; width: min(380px, calc(100% - 32px)); padding: 18px 22px; color: var(--text); }
#potDialog::backdrop { background: rgba(0, 0, 0, .6); }
#potDialog h2 { margin: 0 0 6px; color: var(--brass2); font-size: 18px; }
#potDialog form { display: flex; justify-content: flex-end; gap: 8px; }
.pot-info { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.pot-kind { margin: 0 0 6px; font-size: 13px; }
.elixir-ico { display: inline-flex; vertical-align: -0.2em; font-style: normal; }
.elixir-ico svg { width: 1.2em; height: 1.2em; }
.pot-qty { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.pot-qty input[type=range] { flex: 1; accent-color: var(--brass2); }
.pot-qty input[type=number] { width: 90px; text-align: center; font-size: 16px; }
.pot-total { text-align: center; font-size: 16px; }
.pot-total.short b { color: #ff6060; }
#confirmDialog p { white-space: pre-line; line-height: 1.45; }
@media (max-width: 1250px) {
  #hud { --menu-button-height: calc(52px * var(--fs, 1)); }
  #floorTitle { top: max(84px, calc(32px + var(--menu-button-height))); left: auto; right: 14px; transform: none; text-align: right; }
  .ft-floor { font-size: 20px; }
  #menu { max-width: calc(100vw / var(--hud-zoom, 1) - 24px); }
  #menu button { width: calc(56px * var(--fs, 1)); } #menu button span { display: none; }
  #chat { width: 320px; height: 150px; }
  #lootFeed { right: 240px; width: 240px; }
}
@media (max-height: 700px) {
  #chat { height: 120px; }
  #mapHud { width: 180px; }
  .sk { width: 50px; height: 50px; }
}
::-webkit-scrollbar { width: 9px; } ::-webkit-scrollbar-track { background: #0e0a0c; } ::-webkit-scrollbar-thumb { background: #4a3820; border-radius: 4px; }

/* ================= PERSONAGEM / SKILLS (v2) ================= */
.ch-head { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border: 1px solid #3a2c1c; border-radius: 6px; background: linear-gradient(180deg, rgba(90, 62, 24, .18), rgba(0, 0, 0, .25)); }
.ch-portrait { width: 86px; height: 86px; flex: none; border: 2px solid #6b5230; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2a2a, #0e0a0c); }
.ch-id { flex: 1; min-width: 0; }
.ch-name { font-family: 'Cinzel Decorative', serif; font-size: 22px; color: #f2e0b8; text-shadow: 0 2px 0 #000; }
.ptitle { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; }
.ch-id .ptitle { font-size: 13px; }
/* Acessórios: slot extra no boneco (abre o modal #accDialog). Selecionado = moldura de latão, sem brilho. */
.acc-slot { display: grid; place-items: center; outline: none; }
.acc-slot canvas { position: static; inset: auto; width: 70px; height: 56px; margin-top: -10px; }
.acc-slot:hover, .acc-slot:focus-visible { border-color: var(--brass2); }
.acc-slot-ico { font-size: 22px; color: #6a5030; margin-top: -10px; font-variant-emoji: text; }
#accDialog { width: min(520px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; color: var(--text); }
#accDialog .dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#accDialog .dlg-head h2 { margin: 0; color: var(--brass2); }
.acc-dlg { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; }
.acc-dlg-cv { width: 200px; height: 230px; border: 1px solid #3a2a1e; border-radius: 4px; background: radial-gradient(ellipse at 50% 70%, #241a1f, #0c080a 80%); }
.acc-dlg-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.acc-dlg-gt { font: 700 11px 'Cinzel', serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.acc-dlg-group { display: flex; flex-direction: column; gap: 4px; }
.acc-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 3px 8px 3px 3px; text-align: left;
  border: 1px solid #3a2a1e; border-radius: 4px; background: #150f12; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.acc-opt:hover { border-color: #7a5a2c; }
.acc-opt.on { border-color: var(--brass2); color: var(--brass2); background: #1f1712; }
.acc-opt-pic { flex: none; display: grid; place-items: center; width: 56px; height: 42px; border-radius: 3px; background: #0c080a; }
.acc-opt-none { width: 24px; height: 24px; border: 2px dashed #4a3820; border-radius: 50%; }
.acc-opt-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #0a0608; outline: 1px solid #4a3820; }
.acc-opt-title { font-size: 16px; font-variant-emoji: text; }
.acc-dlg-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
@media (max-width: 560px) {
  .acc-dlg { grid-template-columns: 1fr; }
  .acc-dlg-cv { width: 150px; height: 172px; justify-self: center; }
  .acc-dlg-list { max-height: none; }
}
.ch-xp { height: calc(13px * var(--fs, 1)); margin-top: 8px; }
.ch-kpis { display: flex; gap: 8px; }
.ch-kpis div { min-width: 74px; text-align: center; padding: 6px 8px; background: rgba(0, 0, 0, .35); border: 1px solid #2e2218; border-radius: 4px; }
.ch-kpis b { display: block; font-family: 'Cinzel'; font-size: 17px; color: var(--brass2); }
.ch-kpis span { font-size: 10px; color: var(--muted); letter-spacing: .5px; }
.doll { display: grid; grid-template-columns: repeat(3, 74px); gap: 8px; justify-content: center; padding: 10px 0 4px; }
.slot.empty { border-style: dashed; opacity: .75; }
.slot:hover { border-color: var(--brass2); }
.pts { float: right; font-family: 'IM Fell English'; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.pts.has { color: #0c0806; background: var(--brass2); padding: 0 8px; border-radius: 9px; font-weight: bold; }
.attr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.attr-reset { margin-top: 8px; }
.attr-card { position: relative; padding: 8px 10px; border: 1px solid #3a2c1c; border-radius: 5px; background: rgba(0, 0, 0, .28); }
.attr-card .an { font-family: 'Cinzel'; font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.attr-card .av { font-family: 'Cinzel'; font-size: 26px; color: #f2e0b8; line-height: 1.1; }
.attr-card .ar { font-size: 12px; color: var(--muted); } .attr-card .ar.main { color: var(--brass2); }
.attr-card .aw span.sec { border: 1px dashed #8a7550; border-radius: 4px; opacity: .85; }
.attr-card .ad { font-size: 11px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.attr-card .ab { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.stat.has-tip { cursor: help; }
.stat.has-tip > b { text-decoration: underline dotted rgba(255, 216, 106, .45); text-underline-offset: 3px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ch-foot { display: flex; gap: 18px; align-items: center; margin-top: 16px; padding-top: 10px; border-top: 1px solid #3a2c1c; font-size: 13px; color: var(--muted); }
.ch-foot b { color: #f2e0b8; font-weight: normal; } .ch-foot .btn { margin-left: auto; }

.sk-hint { font-size: 12px; color: var(--muted); padding: 5px 10px; border-left: 3px solid #4a3820; background: rgba(0, 0, 0, .2); margin-bottom: 10px; }
.sk-hint.on { color: #f2e0b8; border-color: var(--brass2); background: rgba(224, 183, 100, .1); }
.chips { display: flex; gap: 6px; margin-bottom: 4px; }
.pips { display: flex; gap: 2px; } .pips i { width: 8px; height: 5px; background: #2a2018; border: 1px solid #4a3820; border-radius: 1px; } .pips i.f { background: var(--brass2); border-color: var(--brass2); }
/* modal de skills: faixa da barra, abas, grade de cartões com chips e painel de detalhes */
#panel[data-view="skills"] { --skm-px: calc(1px * var(--fs, 1)); --panel-width: max(820px, calc(820 * var(--skm-px))); }
.skm-loadout { margin: 0 0 10px; padding: 10px 12px 2px; border: 1px solid #3a2c1c; border-radius: 5px; background: rgba(0, 0, 0, .28); }
.skm-loadout-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-family: 'Cinzel'; color: var(--brass2); font-size: 13px; letter-spacing: .04em; }
.skm-loadout-h small { font-family: 'IM Fell English'; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.skm-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.skm-lslot { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; border: 1px solid #4a3820; border-radius: 5px; background: #140f12; cursor: pointer; transition: border-color .1s, transform .1s; }
.skm-lslot:hover { border-color: var(--brass2); transform: translateY(-1px); }
.skm-lslot.sel { border-color: #fff; }
.skm-lslot.drop-target { border-color: var(--brass2); background: #241a12; }
.skm-lslot.empty { border-style: dashed; }
.skm-lslot.bad, .skm-lslot.bad:hover { border-color: #c0302a; }
.skm-lslot[draggable="true"], .skm-card[draggable="true"] { cursor: grab; }
.skm-lslot .sk, .skm-sig .sk { width: min(100%, calc(48 * var(--skm-px))); height: auto; aspect-ratio: 1; flex: none; }
.skm-lslot .sk.empty { border-style: dashed; }
/* signature da arma: passiva, fora da barra (ativa = moldura de latão; travada = tracejada e apagada) */
.skm-sig { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px; margin-bottom: 8px; border: 1px dashed #4a3820; border-radius: 5px; background: #140f12; cursor: help; }
.skm-sig.on { border-style: solid; border-color: var(--brass2); }
.skm-sig.off .sk canvas { opacity: .45; filter: grayscale(.8); }
.skm-sig .sk { display: flex; align-items: center; justify-content: center; }
.skm-ltx { min-width: 0; }
.skm-ltx .nm { font-family: 'Cinzel'; color: #f2e0b8; font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.skm-ltx .mt { font-size: 11px; color: var(--muted); }
.skm-tabs { margin-bottom: 10px; }
.skm-tabs .tab { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.skm-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #2a2018; color: var(--muted); font-size: 11px; line-height: 1.55; }
.skm-tabs .tab.active .skm-count { background: #5a3e18; color: #ffecc0; }
.skm-count.hot { background: var(--blood); color: #fff; }
.skm-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.skm-search { flex: 1 1 12em; min-width: 0; }
.skm-weapon { flex: 0 1 12em; min-width: 0; }
.skm-sort { display: flex; align-items: center; gap: 6px; margin: 0; }
.skm-sort > span { font-size: 12px; color: var(--muted); }
.skm-dir { min-width: 32px; padding: 5px 8px; }
.inv-sortbox { display: inline-flex; align-items: center; gap: 4px; }
.skm-dir:disabled, .skm-scrolls .btn:disabled, .skm-scroll-h .btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.skm-kinds { flex-wrap: wrap; margin-bottom: 10px; }
.skm-layout { display: grid; grid-template-columns: minmax(0, 1fr) min(50%, calc(260 * var(--skm-px))); gap: 12px; align-items: start; }
.skm-info { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.skm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(210 * var(--skm-px))), 1fr)); gap: 8px; }
.skm-card { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 8px 9px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(0, 0, 0, .25); cursor: pointer; }
.skm-card:hover { border-color: var(--brass2); }
.skm-card.eq { background: rgba(224, 183, 100, .07); }
.skm-card.on { border-color: #fff; background: rgba(224, 183, 100, .13); }
.skm-card.dim { border-color: #6a2a24; background: rgba(163, 20, 28, .16); }
.skm-card.dim:hover { border-color: #c0443a; }
.skm-card.dim.on { border-color: #ff9a8a; background: rgba(163, 20, 28, .26); }
.skm-card.dim .skm-title .nm { color: #f0b4a8; }
.skm-card.dim .skm-head canvas { filter: grayscale(.5) sepia(.4) hue-rotate(-30deg); }
.skm-card.locked { opacity: .7; }
.skm-card.locked:not(.dim) .skm-head canvas { filter: grayscale(.55); }
.skm-card.locked.on { opacity: 1; }
.skm-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.skm-head canvas, .skm-dhead canvas { flex: none; border-radius: 5px; background: radial-gradient(circle, #2a1e22, #0e0a0c); border: 1px solid #3a2c1c; }
.skm-head canvas { width: calc(44 * var(--skm-px)); height: auto; aspect-ratio: 1; }
/* raridade pela moldura do ícone (como as células de item), sem brilho nem faixa lateral */
.skm-card .skm-head canvas, .skm-dhead canvas { border: 2px solid #5a564e; }
.skm-card.tier1 .skm-head canvas, .skm-dhead.tier1 canvas { border-color: var(--r1); }
.skm-card.tier2 .skm-head canvas, .skm-dhead.tier2 canvas { border-color: var(--r3); }
.skm-card.tier3 .skm-head canvas, .skm-dhead.tier3 canvas { border-color: var(--r4); }
.skm-card.tier4 .skm-head canvas, .skm-dhead.tier4 canvas { border-color: var(--r6); }
.skm-tier { font-size: 11px; }
.skm-tier.t1 { color: var(--r1); } .skm-tier.t2 { color: var(--r3); } .skm-tier.t3 { color: var(--r4); } .skm-tier.t4 { color: var(--r6); }
.skm-title { flex: 1; min-width: 0; }
.skm-title .nm, .skm-dhead .nm { font-family: 'Cinzel'; color: #f2e0b8; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.skm-title .mt, .skm-dhead .mt, .skm-foot .mt { font-size: 11px; color: var(--brass2); }
.skm-slot { flex: none; width: 1.67em; height: 1.67em; border-radius: 50%; background: var(--brass2); color: #1a1008; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.skm-chips { display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.4; }
.skm-chip { color: #d8c8a4; }
.skm-cd { margin-left: auto; color: #9fe8d8; }
.skm-chip.more { color: var(--muted); }
.skm-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: auto; font-size: 11px; }
.skm-detail[hidden] { display: none; }
.skm-detail { position: sticky; top: 0; display: flex; flex-direction: column; gap: calc(8 * var(--skm-px)); padding: calc(12 * var(--skm-px)); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; border: 1px solid #3a2c1c; border-radius: 5px; background: #120c10; }
.skm-detail h4 { margin: 4px 0 0; font-family: 'Cinzel'; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .05em; }
.skm-detail p { margin: 0; }
.skm-dhead { display: flex; align-items: center; gap: calc(10 * var(--skm-px)); }
.skm-dhead canvas { width: calc(58 * var(--skm-px)); height: auto; aspect-ratio: 1; }
.skm-dhead > div { min-width: 0; }
.skm-dhead .nm { font-size: 15px; }
.skm-lvl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: calc(8 * var(--skm-px)); font-size: 12px; color: #f2e0b8; }
.skm-lvl .pips { gap: calc(2 * var(--skm-px)); max-width: 100%; }
.skm-lvl .pips i { width: calc(8 * var(--skm-px)); height: calc(5 * var(--skm-px)); }
.skm-note { font-size: 12px; color: var(--muted); }
.skm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(6 * var(--skm-px)); }
.skm-stat { padding: calc(4 * var(--skm-px)) calc(8 * var(--skm-px)); border: 1px solid #3a2c1c; border-radius: 3px; background: #1a1216; }
.skm-stat span { display: block; font-size: 11px; color: var(--muted); }
/* Cinzel: a IM Fell usa algarismos baixos (9.0s parecia menor que o texto ao lado) */
.skm-stat b { color: #f2e0b8; font-family: 'Cinzel', serif; font-size: 14px; font-weight: 600; }
.skm-effects { margin: 0; padding-inline-start: calc(16 * var(--skm-px)); font-size: 12px; color: #d8c8a4; }
.skm-effects li + li { margin-top: 2px; }
.skm-effects.up { color: #8fd07a; }
.skm-detail .btn { min-height: calc(28 * var(--skm-px)); max-width: 100%; white-space: normal; }
.skm-equip { display: flex; flex-wrap: wrap; gap: calc(5 * var(--skm-px)); }
.skm-equip .btn { min-width: calc(34 * var(--skm-px)); padding: calc(5 * var(--skm-px)) calc(9 * var(--skm-px)); }
.skm-equip .btn.on { border-color: var(--brass2); background: #3a2a1e; box-shadow: none; }
.skm-remove { margin-left: auto; }
.skm-read { align-self: flex-start; }
.skm-scroll-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.skm-scrolls { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }
.skm-scroll { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(0, 0, 0, .25); }
.skm-scroll.maxed { opacity: .6; }
.skm-scroll .cell { position: relative; width: 56px; height: 56px; }
.skm-scroll .cell canvas { width: 52px; height: 52px; }
.skm-qty { position: absolute; right: -6px; bottom: -6px; padding: 0 5px; border-radius: 8px; background: var(--brass2); color: #1a1008; font-size: 11px; font-weight: 700; }
.skm-scroll-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.skm-scroll-info .nm { font-family: 'Cinzel'; font-size: 13px; overflow-wrap: anywhere; }
.skm-scroll-info .mt { font-size: 11px; color: var(--muted); }
.skm-new { color: #8fd07a; } .skm-up { color: var(--brass2); }
.skm-scroll-act { display: flex; flex-direction: column; gap: 5px; }
.skm-scroll-act .btn { min-width: 70px; }
@media (max-width: 720px) {
  .skm-layout { grid-template-columns: minmax(0, 1fr); }
  .skm-detail { position: static; }
  .skm-grid > .skm-detail { grid-column: 1 / -1; margin: -4px 0 4px; border-color: var(--brass2); }
  .skm-grid > .skm-detail .skm-dhead { display: none; }
}
.scroll-item { display: flex; flex-direction: column; gap: 4px; align-items: center; }
@media (max-width: 1250px) { .ch-kpis { display: none; } }

/* painel de detalhes do item no inventário */
/* coluna de ações cresce com o tamanho da fonte (--fs) para os botões não vazarem com letra grande */
.inv-detail { margin-top: 14px; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) calc(240px * var(--fs, 1)); gap: 16px; align-items: start; }
.inv-detail .inv-info { min-width: 0; padding-right: 28px; }
.inv-fav { position: absolute; top: 10px; right: calc(240px * var(--fs, 1) + 28px); width: 28px; height: 28px; padding: 0; border: 1px solid #4a3820; border-radius: 50%;
  background: #1a1216; color: #8a7a60; font-size: 16px; line-height: 1; cursor: pointer; }
.inv-fav:hover { color: #ffd84a; border-color: #8a6428; }
.inv-fav.on { color: #ffd84a; border-color: #b08a3a; }
.inv-actions { display: flex; flex-direction: column; gap: 8px; }
.inv-actions { min-width: 0; }
.inv-actions .btn { padding: 7px 10px; max-width: 100%; }
/* sem espaço, o segundo botão (Selecionar / Anunciar) desce para a linha de baixo em vez de vazar */
.inv-row { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-row > .btn { flex: 1 1 0; min-width: fit-content; }
.inv-market { align-items: center; padding: 6px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(0, 0, 0, .25); }
.inv-market .inv-cur { color: #c9a45a; padding-left: 2px; }
.inv-market input { flex: 1 1 calc(80px * var(--fs, 1)); min-width: 0; width: auto; }
.inv-market .btn { flex: 1 0 auto; }
.inv-market input.inv-qty { flex: 0 0 52px; }
/* linha de anúncio (aba Vender): nome, [× qtd / total], preço, desmonte e Anunciar numa linha só */
.toolbar.mk-sell { flex-wrap: nowrap; }
.toolbar.mk-sell > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar.mk-sell > span { white-space: nowrap; flex: none; }
.toolbar.mk-sell > span:first-of-type { flex: 0 1 auto; font-size: 16px; }
.toolbar.mk-sell input { width: 110px; flex: none; }
.toolbar.mk-sell input.mk-qty { width: 56px; }
.toolbar.mk-sell .btn { flex: none; }
@media (max-width: 640px) {
  .inv-detail { grid-template-columns: auto 1fr; }
  .inv-actions { grid-column: 1 / -1; }
  .inv-fav { right: 12px; }
}

/* barra do modo de seleção do inventário */
.inv-count { padding: 2px 8px; border: 1px solid #3a2c1c; border-radius: 10px; background: rgba(0, 0, 0, .3); }
.inv-selbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -2px 0 10px; padding: 6px 8px;
  border: 1px solid #8a6428; border-radius: 4px; background: linear-gradient(180deg, rgba(232, 194, 90, .12), rgba(0, 0, 0, .25)); }
.inv-selbar .sp { flex: 1; }
.inv-selcount { color: #e8c25a; font-weight: bold; }

/* ================= LOGIN: conta e painel lateral ================= */
.login-wrap { position: relative; display: flex; gap: 18px; align-items: flex-start; max-width: 96vw; max-height: 96vh; overflow-y: auto; padding: 4px; }
.login-side { width: 280px; display: flex; flex-direction: column; gap: 12px; }
.side-card { padding: 12px 14px; }
.side-card h3 { margin: 0 0 8px; font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 1px; color: var(--brass2); }
.srv { font-size: 13px; color: var(--text); }
.srv .dot, .side-rank i.on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #777; vertical-align: middle; }
.srv .dot.on, .side-rank i.on { background: #5fbf4a; box-shadow: 0 0 6px #5fbf4a; }
.srv .dot.off { background: #c33; }
.side-rank { margin: 0; padding-left: 22px; font-size: 13px; }
.side-rank li { padding: 3px 0; border-bottom: 1px dashed #3a2c1c; }
.side-rank li::marker { color: var(--brass2); font-family: 'Cinzel', serif; }
.side-rank .rn { color: var(--text); }
.side-rank .rl { float: right; color: var(--muted); font-size: 12px; }
.side-news { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.side-news li + li { margin-top: 10px; padding-top: 10px; border-top: 1px solid #3a2c1c; }
.side-news .nd { display: block; color: var(--muted); font-size: 11px; }
.side-news b { color: var(--text); }
.side-news p { margin: 2px 0 0; color: var(--muted); }
.muted { color: var(--muted); }
.remember { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; }
.remember input { display: inline; width: auto; margin: 0; }
.okmsg { color: #7fe07f; }

.acc-head { display: flex; gap: 16px; align-items: center; }
#accHero { background: radial-gradient(ellipse at 50% 75%, #3a2a24, #120c10 70%); border: 2px solid #4a3820; border-radius: 4px; flex: none; }
.acc-id { flex: 1; min-width: 0; }
.acc-name { font-family: 'Cinzel', serif; font-size: 26px; color: #f2e6c8; }
.acc-sub { color: var(--muted); font-size: 13px; }
.acc-xp { height: 8px; margin: 8px 0 4px; background: #1a1216; border: 1px solid #4a3820; border-radius: 4px; overflow: hidden; }
.acc-xp i { display: block; height: 100%; background: linear-gradient(90deg, #8a6428, var(--brass2)); }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 10px; }
.acc-stat { padding: 6px 10px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(0, 0, 0, .25); }
.acc-stat span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.acc-stat b { color: var(--text); font-size: 16px; }
.acc-stat.gold b, .acc-notes .gold { color: #ffd84a; }
.acc-notes { font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.acc-notes b { color: var(--text); }
.acc-actions { display: flex; gap: 10px; align-items: flex-end; }
.acc-actions .btn.big { flex: 1; }
.acc-actions #btnAccOut { margin-top: 10px; padding: 10px 16px; }
.acc-pass { margin-top: 12px; border-top: 1px solid #3a2c1c; padding-top: 8px; }
.acc-pass summary { cursor: pointer; color: var(--brass2); font-family: 'Cinzel', serif; font-size: 14px; }
@media (max-width: 1100px) {
  #login { overflow-y: auto; align-items: flex-start; padding: 12px; }
  .login-wrap { flex-direction: column; align-items: center; max-height: none; overflow: visible; margin: auto; }
  .login-side { width: min(760px, 94vw); }
}
@media (max-width: 560px) { .acc-stats { grid-template-columns: repeat(2, 1fr); } }

/* login com Google (aparece só com o ID de cliente configurado) */
#googleLogin { display: none; }
#googleLogin.on { display: block; }
#googleLogin .or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
#googleLogin .or::before, #googleLogin .or::after { content: ''; flex: 1; height: 1px; background: #4a3820; }
#googleBtn { display: flex; justify-content: center; min-height: 44px; }
/* "Jogar agora" (convidado) no topo do Entrar; aviso do navegador embutido; diálogo de salvar a conta */
.guest-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.guest-box .btn { width: 100%; }
.guest-box small a { color: var(--brass2); }
.guest-box .or { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.guest-box .or::before, .guest-box .or::after, .claim-google .or::before, .claim-google .or::after { content: ''; flex: 1; height: 1px; background: #4a3820; }
.inapp-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inapp-note span { flex: 1 1 200px; }
.claim-dlg { width: min(440px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 18px; color: var(--text); background-color: #1b1418; overflow: hidden; }
.claim-dlg[open] { display: flex; flex-direction: column; }
.claim-dlg::backdrop { background: #000a; }
.claim-dlg .ws-head { flex: none; }
.claim-form { display: flex; flex-direction: column; min-height: 0; }
.claim-body { min-height: 0; overflow-y: auto; }
.claim-intro { margin: 2px 0 16px; color: #cbbd9e; font-size: 15px; line-height: 1.4; }
.claim-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.claim-fields .wide { grid-column: 1 / -1; }
.claim-fields label { margin: 0; color: #cbbd9e; }
.claim-fields input { height: 40px; padding: 6px 10px; font-size: 16px; }
.claim-fields input:focus { box-shadow: none; }
.claim-form .dlg-foot { flex: none; margin-top: 0; }
@media (max-width: 420px) { .claim-fields { grid-template-columns: minmax(0, 1fr); } }
.claim-google .or { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.claim-gbtn { display: flex; justify-content: center; height: 40px; overflow: hidden; color-scheme: light; }
.claim-err { flex: none; min-height: 18px; margin: 8px 0; font-size: 13px; line-height: 18px; }
.google-note { margin: 4px 0 10px; padding: 8px 10px; border: 1px solid #3f8f7f; border-radius: 4px; background: rgba(63, 143, 127, .15); color: #9fe0cf; font-size: 13px; }

/* ================= SAGUÃO: depósito, desafio de chefes, PVP ================= */
canvas#lobbyCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body.in-lobby #floorTitle, body.in-lobby #profBadge, body.in-lobby #skillBar, body.in-lobby #buffBar, body.in-lobby #minimap, body.in-lobby #lootFeed { display: none; }
body:not(.in-lobby) #menu .lobby-only, body.in-lobby #menu .floor-only { display: none; }
body.in-lobby #btnHome { display: none; }
#lobbyTitle { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); text-align: center; pointer-events: none; text-shadow: 0 2px 6px #000; }
#lobbyTitle b { display: block; font-family: 'Cinzel Decorative', serif; font-size: 26px; color: var(--brass2); letter-spacing: 2px; }
#lobbyTitle small { color: var(--muted); }
.pc-res .hg b { color: #9fe8f0; }
.lead { color: var(--muted); margin: 0 0 10px; }
.lead b { color: var(--brass2); }
/* depósito: inventário à esquerda, baú de latão rebitado à direita (sem rolagem do painel) */
.vault-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.vault-top .hgbal { font-family: Cinzel, serif; color: #9fe8f0; font-weight: 700; margin-right: auto; }
.vault-pages { display: flex; gap: 4px; flex-wrap: wrap; }
.vault-pages button { min-width: 30px; padding-inline: 8px; }
.vault-pages button.buy { color: var(--text); }
.vault-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.vault-filter .chips { display: flex; gap: 3px; flex-wrap: wrap; }
/* raridade = moldura na cor do tier, igual às células de item; nada de bloco cheio */
.vault-filter .chips.rar button { width: 28px; padding: 0; border: 2px solid var(--rc, #4a3820); background: #120c0e; opacity: .6; }
.vault-filter .chips.rar button:first-child { width: auto; padding: 4px 10px; border-width: 1px; opacity: 1; }
.vault-filter .chips.rar button.on { opacity: 1; background: #3a2a1e; }
.vault-actions { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; min-height: 26px; }
.vault-actions .sp { flex: 1; }
.vault-hint { font-size: 12px; }
.vault-layout { display: flex; gap: 12px; align-items: flex-start; }
.vault-inv { flex: none; width: 262px; padding: 6px; border: 1px dashed #5a4528; border-radius: 4px; }
.vault-inv.drop { outline: 2px solid var(--brass2); }
.vault-inv .vi-head { font-family: Cinzel, serif; color: var(--brass2); margin-bottom: 5px; }
.vault-invgrid { display: grid; grid-template-columns: repeat(5, 46px); gap: 4px; max-height: 372px; overflow-y: auto; padding-right: 2px; }
.vc { position: relative; width: 46px; height: 46px; border: 2px solid #3a2c1c; border-radius: 4px; background: radial-gradient(circle, #221a1e, #0c080a); cursor: pointer; }
.vc canvas { position: absolute; inset: 1px; width: 40px; height: 40px; }
.vc .fav { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #ffd84a; text-shadow: 0 0 2px #000; pointer-events: none; }
.vc.r0 { border-color: var(--r0); } .vc.r1 { border-color: var(--r1); } .vc.r2 { border-color: var(--r2); } .vc.r3 { border-color: var(--r3); }
.vc.r4 { border-color: var(--r4); } .vc.r5 { border-color: var(--r5); } .vc.r6 { border-color: var(--r6); }
.vc.dim, .vs.dim { opacity: .28; }
.vc.picked, .vs.picked { outline: 2px solid #e8c25a; box-shadow: inset 0 0 10px rgba(232, 194, 90, .45); }
.vault-box { position: relative; flex: 1; padding: 22px 10px 10px; border-radius: 8px; border: 3px solid #7a5a2a;
  background: repeating-linear-gradient(90deg, #3a2414 0 38px, #2e1c10 38px 40px), #2e1c10;
  box-shadow: inset 0 0 0 2px #1a0e06, inset 0 0 40px rgba(0, 0, 0, .8), 0 6px 20px rgba(0, 0, 0, .6); }
.vault-box::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 11px; border-bottom: 3px solid #7a5a2a;
  background: linear-gradient(180deg, #a07a3a, #5a3e18); border-radius: 5px 5px 0 0; }
.vault-box::after { content: '⚙'; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 26px; height: 22px; line-height: 22px; text-align: center;
  background: radial-gradient(circle at 40% 35%, #ffe6a8, #8a6428 70%); border: 2px solid #2a1a08; border-radius: 4px; color: #2a1a08; font-size: 14px; }
.vault-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.vs { position: relative; aspect-ratio: 1; min-width: 0; border: 1px solid #1a0e06; background: rgba(10, 6, 4, .65); border-radius: 3px; box-shadow: inset 0 0 8px #000; cursor: pointer; }
.vs canvas { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.vs.drop { outline: 2px solid var(--brass2); }
.vs.r0 { border-color: var(--r0); } .vs.r1 { border-color: var(--r1); } .vs.r2 { border-color: var(--r2); } .vs.r3 { border-color: var(--r3); }
.vs.r4 { border-color: var(--r4); } .vs.r5 { border-color: var(--r5); } .vs.r6 { border-color: var(--r6); }
.hg-note { margin-top: 8px; padding: 6px 10px; border-left: 3px solid #4fb0c0; background: rgba(40, 90, 100, .15); color: var(--muted); font-size: 12px; }
/* desafio de chefes */
.boss-filter { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; cursor: pointer; color: var(--text, #e8dcc4); }
.boss-filter input { width: 18px; height: 18px; margin: 0; accent-color: #c59548; }
.boss-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.boss-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px solid #5a4528; border-radius: 5px; background: linear-gradient(180deg, #241a1f, #140e11); min-width: 0; }
.boss-card.locked { opacity: .5; filter: grayscale(.8); }
.boss-card canvas { flex: none; width: 96px; height: 110px; background: radial-gradient(circle at 50% 70%, #3a1a14, #0e0808 70%); border-radius: 4px; }
.boss-card .bi { flex: 1; min-width: 0; }
.boss-card .bn { font-family: Cinzel, serif; color: #ff9a7a; font-weight: 700; line-height: 1.15; }
.boss-card .bt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.boss-card .grade { display: inline-block; margin: 4px 0; padding: 1px 6px; border: 1px solid #a3141c; border-radius: 3px; color: #ffb0a0; font-size: 12px; }
.boss-card .btn { margin-top: 6px; }
/* PVP */
.pvp-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pvp-emblem { flex: none; }
.pvp-id { flex: 1; min-width: 220px; }
.pvp-id .elo { font-family: 'Cinzel Decorative', serif; font-size: 24px; font-weight: 900; }
.pvp-id .bar { height: 12px; margin: 6px 0; }
.pvp-id .bar div { background: linear-gradient(90deg, #8a6428, #e0b764); }
.pvp-btns { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.pvp-btns .btn { white-space: nowrap; width: auto; }
.pvp-season-end { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; margin-bottom: 10px; border: 1px solid #5a4528; border-radius: 4px; background: rgba(10, 6, 4, .55); }
.pvp-season-end p { margin: 0; }
.pvp-rank-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pvp-rank tr.me td { color: var(--brass2); }
.pvp-rank tr.gap td { text-align: center; color: var(--muted); }
/* escada de elos: trilho fino na cor do elo (cheio = já passou; parcial = onde você está), nome embaixo */
.pvp-ladder { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 12px 0; }
.pvp-ladder .pl { min-width: 0; text-align: center; }
.pvp-ladder .tr { height: 5px; border-radius: 1px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.pvp-ladder .tr i { display: block; height: 100%; background: var(--tc); }
.pvp-ladder .pl span { display: block; margin-top: 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.pvp-ladder .past span { color: #b8a888; }
.pvp-ladder .next span { opacity: .7; }
.pvp-ladder .cur span { color: var(--tc); font-weight: 700; font-size: 12px; overflow: visible; }
.pvp-hist td.w { color: #6fdc6f; } .pvp-hist td.l { color: #ff7a6a; }

#btnGiveUp { position: absolute; right: 12px; top: 84px; z-index: 12; padding: 5px 14px; font-size: 13px; }
body.in-challenge #floorTitle { top: calc(150px / var(--hud-zoom, 1)); }   /* abaixo da barra + nome do chefe (canvas, 92–132px) */
#trainBar { position: absolute; right: 12px; top: 84px; z-index: 12; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.train-btns { display: flex; gap: 6px; }
#trainBar .btn { padding: 5px 12px; font-size: 13px; }
#trainHold { display: inline-flex; align-items: center; gap: 7px; min-width: 168px; justify-content: center; }
#trainHold i { font-style: normal; font-size: 12px; }
#trainHold kbd { font: 600 10px/1 sans-serif; padding: 2px 5px; border: 1px solid currentColor; border-radius: 3px; opacity: .6; }
.train-state { padding: 3px 9px; font-size: 12px; color: #f0b4a8; background: rgba(16, 12, 20, .82); border-radius: 3px; }
.train-state.on { color: #9fe8d8; }
@media (pointer: coarse) { #trainHold kbd { display: none; } }
body.in-training #floorTitle { top: 150px; }
/* boneco de treino: modal de configuração (tela única: linhas, 4 slots de skill, ajustes avançados) */
#houseShop.dummy-dlg { width: min(580px, calc(100vw - 32px)); }
.bt-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.bt-art { flex: none; width: 96px; height: 108px; background: rgba(0, 0, 0, .22); border: 1px solid #2e2218; border-radius: 3px; }
.bt-state { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bt-state .ph-sub { margin: 0 !important; }
.bt-form { display: flex; flex-direction: column; gap: 9px; }
.bt-row, .bt-check { margin: 0; }
.bt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; font-size: 13px; color: var(--muted); }
.bt-row input, .bt-row select { margin: 0; height: 28px; padding-top: 0; padding-bottom: 0; }
.bt-row input[type=number], .bt-row select { width: 150px; flex: none; }
.bt-row .seg button { min-width: 64px; padding: 4px 10px; font-size: 13px; }
.bt-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.bt-check input { width: auto; margin: 0; flex: none; }
.bt-skrow { align-items: flex-start; }
.bt-skrow > span { padding-top: 12px; }
.bt-slots { display: flex; gap: 6px; }
.bt-slot { width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #4a3820; border-radius: 4px; background: #140f12; color: var(--muted); font-size: 20px; cursor: pointer; }
.bt-slot.empty { border-style: dashed; }
.bt-slot:hover, .bt-slot.sel { border-color: var(--brass2); }
.bt-slot canvas { width: 44px; height: 44px; border-radius: 3px; }
.bt-picker { padding: 8px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(0, 0, 0, .25); }
.bt-picker-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.bt-picker-h b { color: var(--brass2); font-weight: 600; }
.bt-picklist { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.bt-pick { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; text-align: left; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--text); cursor: pointer; }
.bt-pick:hover:not(:disabled), .bt-pick.on { border-color: #5a4528; background: rgba(224, 183, 100, .08); }
.bt-pick:disabled { opacity: .45; cursor: default; }
.bt-pick canvas { flex: none; width: 32px; height: 32px; border-radius: 3px; border: 2px solid #5a564e; }
.bt-pick.tier1 canvas { border-color: var(--r1); } .bt-pick.tier2 canvas { border-color: var(--r3); }
.bt-pick.tier3 canvas { border-color: var(--r4); } .bt-pick.tier4 canvas { border-color: var(--r6); }
.bt-pick span { display: flex; flex-direction: column; min-width: 0; }
.bt-pick b { font-size: 13px; font-weight: 600; } .bt-pick b.uniq { color: #e8c060; }
.bt-pick small { font-size: 11px; color: var(--muted); }
.bt-more { margin-top: 6px; }
.bt-adv { margin-top: 12px; border-top: 1px solid #2e2218; padding-top: 8px; }
.bt-adv summary { cursor: pointer; font-size: 13px; color: var(--brass2); }
.bt-adv[open] { display: flex; flex-direction: column; gap: 8px; }
.bt-note { font-size: 11px; color: var(--muted); }
.bt-sum { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .bt-art { width: 72px; height: 82px; }
  .bt-row input[type=number], .bt-row select { width: 120px; }
  .bt-slot { width: 42px; height: 42px; } .bt-slot canvas { width: 38px; height: 38px; }
}

/* build PVP */
.cell .pvpb, .slot .pvpb, .vs .pvpb { position: absolute; left: 2px; bottom: 0; z-index: 1; font-size: 12px; color: #ff6a5a; text-shadow: 0 0 3px #000; pointer-events: none; }
.pvp-bound { color: #ff7a6a; font-size: 12px; margin: 2px 0; }
.pvp-doll { display: grid; grid-template-columns: repeat(auto-fill, 62px); gap: 6px; margin: 6px 0; }
.pvp-doll .slot { width: 62px; height: 62px; position: relative; cursor: pointer; }
.pvp-doll .slot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pvp-doll .slot.sel { outline: 2px solid #ff6a5a; }
.pvp-pick { margin: 6px 0 10px; padding: 8px; border: 1px dashed #6a3a2a; border-radius: 4px; }

/* ---- skills únicas: clarão de tela e faixa com o nome ---- */
.u-flash { position: fixed; inset: 0; pointer-events: none; z-index: 15; mix-blend-mode: screen; opacity: 0; animation: uflash .65s ease-out; }
@keyframes uflash { 0% { opacity: var(--a, .4); } 100% { opacity: 0; } }
.u-banner { position: fixed; left: 50%; top: 26%; transform: translateX(-50%); pointer-events: none; z-index: 16; text-align: center; white-space: nowrap; animation: ubanner 2.2s cubic-bezier(.2, .9, .3, 1) forwards; }
.u-banner .ub-t { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 900; font-size: 46px; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--c1), #ffffff 45%, var(--c2) 60%, var(--c1)); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px var(--c1)) drop-shadow(0 3px 0 #000); animation: ushine 1.1s linear infinite; }
.u-banner .ub-s { font-family: 'Cinzel', serif; font-size: 15px; letter-spacing: 6px; color: var(--c2); text-shadow: 0 0 8px var(--c1), 0 2px 0 #000; margin-top: 2px; }
@keyframes ubanner { 0% { opacity: 0; transform: translateX(-50%) scale(2.2); } 12% { opacity: 1; transform: translateX(-50%) scale(.94); } 20% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(1.04); } }
@keyframes ushine { 0% { background-position: 0% 0; } 100% { background-position: 220% 0; } }
@media (max-width: 700px) { .u-banner .ub-t { font-size: 28px; } }
/* drop de skill única: faixa dourada no feed e no chat */
.loot.unique-drop { background: linear-gradient(90deg, rgba(48, 224, 224, .25), rgba(255, 90, 208, .2)); box-shadow: 0 0 14px rgba(48, 224, 224, .55); }
.c-unique { color: #30e0e0; text-shadow: 0 0 6px #30e0e0; font-weight: 700; }
.boss-card .keys { color: #ff6060; }
.boss-card .keys.have { color: #6fdc6f; }

/* ---- build PVP: cabeçalho, importação e barra de skills do duelo ---- */
.pvp-build-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pvp-build-h small { font-family: inherit; font-size: 12px; }
.pvp-pick .cell.worn { border-color: #5fbf4a; box-shadow: 0 0 0 1px #5fbf4a, 0 0 6px #5fbf4a88; }
.pvp-sk-h { margin: 14px 0 6px; font-family: 'Cinzel', serif; color: #f2e0b8; font-size: 14px; }
.pvp-sk-h small { font-family: system-ui, sans-serif; font-size: 11px; margin-left: 6px; }
.pvp-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pvp-slot { position: relative; min-height: 112px; padding: 8px 6px 6px; border: 1px solid #3a2c1e; border-top: 3px solid var(--sc); border-radius: 4px; cursor: pointer;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--sc) 22%, transparent), rgba(10, 6, 4, .55) 70%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; transition: transform .12s, box-shadow .12s; }
.pvp-slot:hover { transform: translateY(-2px); box-shadow: 0 0 12px color-mix(in srgb, var(--sc) 45%, transparent); }
.pvp-slot.empty { border-style: dashed; border-top-style: dashed; background: rgba(10, 6, 4, .35); justify-content: center; }
.pvp-slot.sel, .pvp-slot.drop { outline: 2px solid var(--brass2); outline-offset: 1px; }
.pvp-slot.bad { opacity: .55; }
.pvp-slot.uq { box-shadow: 0 0 14px rgba(48, 224, 224, .35), inset 0 0 12px rgba(255, 90, 208, .15); }
.pvp-slot .n { position: absolute; left: 5px; top: 3px; font: 700 11px 'Cinzel', serif; color: var(--muted); }
.pvp-slot .nm { font: 600 12px 'Cinzel', serif; color: #f2e0b8; line-height: 1.15; }
.pvp-slot .mt { font-size: 10px; color: var(--muted); }
.pvp-slot .x { position: absolute; right: 3px; top: 1px; background: none; border: 0; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 3px; }
.pvp-slot .x:hover { color: #ff7a6a; }
.pvp-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid #2e2218; border-radius: 4px; background: rgba(0, 0, 0, .2); }
.pvp-card { position: relative; display: flex; gap: 7px; align-items: center; padding: 4px 6px; border: 1px solid #3a2c1e; border-left: 3px solid var(--sc); border-radius: 3px; cursor: pointer; background: rgba(20, 12, 8, .5); }
.pvp-card:hover { background: color-mix(in srgb, var(--sc) 14%, rgba(20, 12, 8, .6)); }
.pvp-card.on { opacity: .6; }
.pvp-card.uq { box-shadow: inset 0 0 10px rgba(48, 224, 224, .2); }
.pvp-card canvas { flex: none; }
.pvp-card .nm { font: 600 12px 'Cinzel', serif; color: #f2e0b8; }
.pvp-card .mt { font-size: 10px; color: var(--muted); }
.pvp-card .slotn { position: absolute; right: 5px; top: 4px; font: 700 11px 'Cinzel', serif; color: var(--brass2); }
@media (max-width: 700px) { .pvp-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---- PVP: abas, estado da build, atributos, peças herdadas, seletor ---- */
.pvp-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pvp-status .st { margin-right: auto; padding: 3px 9px; border: 1px solid #4a3820; border-radius: 3px; color: var(--muted); font-size: 13px; }
.pvp-status .st.on { color: #ff9a8a; border-color: #8a3a2a; background: rgba(160, 50, 30, .15); }
.pvp-status .btn.secondary { margin-left: 0; }
.pvp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; padding: 8px 10px; border: 1px solid #2e2218; border-radius: 4px; background: rgba(0, 0, 0, .2); }
.pvp-stats .ps { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.pvp-stats .ps span { color: var(--muted); flex: 1; }
.pvp-stats .ps b { color: #f2e0b8; font-weight: 600; }
.pvp-stats .ps i { font-style: normal; font-size: 11px; min-width: 46px; text-align: right; }
.pvp-stats .up { color: #6fdc6f; } .pvp-stats .dn { color: #ff7a6a; }
.pvp-note { margin: 4px 0 0; }
.pvp-doll .slot.inh { border-style: dashed; opacity: .6; }
.pvp-doll .slot .inh-tag { position: absolute; left: 0; right: 0; top: 0; z-index: 1; text-align: center; font-size: 8px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #d8c8a0; background: rgba(0, 0, 0, .55); pointer-events: none; }
.pvp-pick { display: flex; flex-direction: column; gap: 6px; }
.pvp-pick-h { display: flex; align-items: center; gap: 10px; font-family: 'Cinzel', serif; color: #f2e0b8; }
.pvp-pick-h .btn.secondary { margin-left: auto; }
.pvp-own { align-self: flex-start; }
.pvp-cands { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; }
.pvp-cand { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 66px; }
.pvp-cand small { font-size: 10px; text-align: center; }
.pvp-cand .cell.lock { opacity: .4; }
.pvp-bar.inh .pvp-slot:not(.sel) { opacity: .6; border-style: dashed; }
.pvp-slot .fx, .pvp-card .fx { font-size: 10px; line-height: 1.25; color: #b9a88a; }
.pvp-slot .fx b, .pvp-card .fx b { color: #e0b764; font-weight: 600; }
.pvp-slot { min-height: 150px; }
.pvp-loadout { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 10px 0; padding: 6px 8px; border: 1px solid #3a2c1e; border-radius: 4px; background: rgba(20, 12, 8, .5); }
.pvp-mini { display: flex; gap: 3px; align-items: center; }
.pvp-mini.pvp-mini-skills { padding-left: 10px; border-left: 1px solid #3a2c1e; }
.pvp-mini-it, .pvp-mini-sk { flex: 0 0 auto; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border: 1px solid #4a3a28; border-radius: 3px; background: rgba(0, 0, 0, .35); cursor: help; }
.pvp-mini-sk { border-color: transparent; background: none; }
.pvp-mini-it.empty { border-style: dashed; opacity: .45; cursor: default; }
.pvp-mini canvas { position: static; width: 22px; height: 22px; display: block; }
.pvp-loadout .wp { font-size: 14px; }
.pvp-loadout .pvp-preset { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pvp-loadout .pvp-preset select { min-width: 140px; max-width: 200px; }
.pvp-loadout .pw { margin-left: 8px; color: var(--muted); font-size: 12px; }
.pvp-loadout .ics { display: flex; gap: 4px; }
.pvp-loadout .btn.secondary { margin-left: auto; }


/* ---- duelo PVP em modal (no andar; a escalada continua atrás) ---- */
#duelModal { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(6, 3, 2, .55); padding: 16px; }
#duelModal.hidden { display: none; }
.dm-box { width: min(900px, 100%); max-height: 100%; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-box canvas { width: 100%; height: auto; aspect-ratio: 860 / 380; border: 1px solid #3a2a1a; border-radius: 4px; display: block; background: #120a08; }
.dm-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.dm-side .nm { font: 700 15px 'Cinzel', serif; color: #f2e0b8; }
.dm-side .nm small { color: var(--muted); font-weight: 400; }
.dm-side .tq { font-size: 11px; }
.dm-side.r { text-align: right; }
.dm-vs { font: 900 22px 'Cinzel Decorative', serif; color: #c01818; text-shadow: 0 2px 0 #000; }
.dm-hp { position: relative; height: 14px; margin-top: 4px; background: #1a0e0a; border: 1px solid #3a2416; border-radius: 3px; overflow: hidden; }
.dm-hp div { height: 100%; width: 100%; background: linear-gradient(90deg, #2a8a3a, #6fdc6f); transition: width .15s; }
.dm-side.r .dm-hp div { margin-left: auto; }
.dm-hp span { position: absolute; inset: 0; font-size: 10px; line-height: 14px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.dm-foot { display: flex; align-items: center; gap: 8px; }
.dm-foot .sp { flex: 1; }
#dmInfo { color: var(--muted); }
.dm-sk, .dm-ch { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.dm-side.r .dm-sk, .dm-side.r .dm-ch { justify-content: flex-end; }
.dm-ch { min-height: 20px; }
.dm-ski { --c: #e0b764; width: 30px; height: 30px; border: 1px solid var(--c); border-radius: 4px; background: rgba(10, 6, 4, .7); display: grid; place-items: center; }
.dm-ski canvas { width: 26px; height: 26px; display: block; }
.dm-ski { position: relative; overflow: hidden; }
.dm-ski > i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0, 0, 0, .62); pointer-events: none; }
.dm-ski > b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; pointer-events: none; }
.dm-ski:not(.cd) > i { height: 0 !important; }
.dm-ski.fire { animation: dmfire .55s ease-out; }
@keyframes dmfire { 0% { transform: scale(1.45); box-shadow: 0 0 14px 3px var(--c); background: var(--c); } 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; } }
.dm-chip { --c: #ffd86a; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 5px; border: 1px solid var(--c); border-radius: 10px; background: rgba(10, 6, 4, .75); color: var(--c); font-size: 12px; line-height: 1; }
.dm-chip canvas { width: 16px; height: 16px; }
.dm-chip b { font: 700 11px system-ui, sans-serif; color: #f2e0b8; }
.dm-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 6px 8px; border: 1px solid #3a2a1a; border-radius: 4px; background: rgba(10, 6, 4, .55); font-size: 12px; }
.dm-sum.hidden { display: none; }
.dm-sum .dm-tip { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dm-sum .nm { font: 700 13px 'Cinzel', serif; color: #f2e0b8; margin-bottom: 2px; }
.dm-sum .r { text-align: right; }
.dm-sum .ln { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); line-height: 1.35; }
.dm-sum .ln b { color: #f2e0b8; font-weight: 600; }
@media (max-width: 700px) { .dm-side .tq { display: none; } .dm-vs { font-size: 16px; } .dm-ski { width: 28px; height: 28px; } .dm-ski canvas { width: 24px; height: 24px; } }

/* ================= CONFIGURAÇÕES ================= */
#hud :is(#playerCard, #profBadge, #skillBar, #buffBar, #menu, #chat, #lootFeed, #mapHud, #floorTitle, #btnGiveUp, #trainBar) { zoom: var(--hud-zoom, 1); }
body.no-chat #chat, body.no-map #minimap, body.no-loot #lootFeed { display: none; }
#settingsDialog { width: min(420px, calc(100vw - 32px)); padding: 18px; color: var(--text); }
#settingsDialog::backdrop { background: #000a; }
#settingsDialog h2 { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px solid #6b5230; color: var(--brass2); font: 700 18px 'Cinzel', serif; }
.set-grid { display: grid; gap: 8px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid #53402e; border-radius: 4px; background: #120d10; cursor: pointer; }
.set-row select { width: auto; min-width: 140px; }
.set-row input[type=checkbox] { width: 20px; height: 20px; accent-color: #c59548; }
.set-row input[type=range] { width: min(42%, 140px); accent-color: #c59548; }
.set-range { display: flex; align-items: center; gap: 8px; width: min(58%, calc(190px * var(--fs, 1))); }
.set-range input[type=range] { flex: 1; width: auto; min-width: 0; }
.set-range b { flex: none; min-width: 3.2em; text-align: right; color: var(--brass2); font-variant-numeric: tabular-nums; }
#settingsDialog form { display: flex; justify-content: flex-end; gap: 8px; }
/* Boss Diário */
.wb-card {
  border: 1px solid #856137; border-radius: 6px; padding: 12px 16px;
  background: linear-gradient(120deg, #30201b, #191117 72%); color: #f4e2be;
}
.wb-card[data-phase="warning"], .wb-card[data-phase="active"] { border-color: #d08b50; }
.wb-card[data-phase="warning"] [data-wb="status"], .wb-card[data-phase="active"] [data-wb="status"] { color: #ffb677; }
.wb-heading, .wb-timing { display: grid; gap: 3px; min-width: 0; }
.wb-heading h2 { margin: 0; color: var(--brass2); font: 700 14px 'Cinzel', serif; letter-spacing: .08em; }
.wb-heading > strong { font: 700 21px 'Cinzel', serif; overflow-wrap: anywhere; }
.wb-heading > span, .wb-timing small { color: var(--muted); font-size: 13px; }
.wb-timing { align-content: center; text-align: right; }
.wb-timing > time { font: 700 24px 'Cinzel', serif; font-variant-numeric: tabular-nums; }
.wb-timing > time:empty { display: none; }
#worldBossOpen {
  grid-row: 3; margin-top: 10px; zoom: var(--hud-zoom, 1);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-align: left;
  padding: 8px 12px; min-width: 175px; min-height: 44px; pointer-events: auto;
}
#worldBossOpen b { grid-column: 1; color: var(--brass2); font: 700 13px 'Cinzel', serif; }
#worldBossOpen small { grid-column: 1; color: var(--muted); }
#worldBossOpen [data-wb="timer"] { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
#worldBossOpen:focus-visible, #worldBossOpen:hover { border-color: var(--brass2); }
body.in-world-boss #floorTitle { top: calc(150px / var(--hud-zoom, 1)); left: 50%; right: auto; text-align: center; transform: translateX(-50%); }
/* movimento manual (WASD) em sala de chefe: botão do bonequinho + joystick no mobile */
#manualMove { position: absolute; right: 12px; bottom: 200px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; }
#mapHud > #manualMove { right: 0; bottom: calc(100% + 6px); }
#manualMove[hidden] { display: none; }
#manualMove svg { width: 16px; height: 16px; }
#manualMove kbd { font: 600 10px/1 sans-serif; padding: 2px 4px; border: 1px solid currentColor; border-radius: 3px; opacity: .6; }
#manualMove[aria-pressed="true"] { background: #4a3a1e; border-color: var(--brass2); color: #ffe7b0; }
#manualPad { position: absolute; left: 18px; bottom: 120px; z-index: 3; width: 112px; height: 112px; border-radius: 50%;
  background: rgba(18, 12, 16, .55); border: 2px solid rgba(200, 160, 100, .55); touch-action: none; }
#manualPad[hidden] { display: none; }
#manualPad i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(200, 160, 100, .75); border: 2px solid #ffe7b0; pointer-events: none; }
@media (pointer: coarse) { #manualMove kbd { display: none; } }
#worldBossRoster {
  /* --wbr-top: fim do último cartão de evento visível (world-boss.js placeRoster), para não ficar por cima deles */
  --wbr-y: max(calc(235px * var(--hud-zoom, 1)), var(--wbr-top, 0px));
  position: absolute; top: var(--wbr-y); left: 12px;
  width: min(178px, 42%); max-height: max(54px, calc(100% - var(--wbr-y) - 230px));
  overflow: auto; margin: 0; padding: 0; list-style: none; overscroll-behavior: contain;
}
#worldBossRoster li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center;
  gap: 6px; margin-bottom: 4px; padding: 3px 6px 3px 3px;
  background: rgba(18, 12, 16, .92); border: 1px solid #725639; border-radius: 5px;
}
#worldBossRoster canvas { display: block; width: 36px; height: 36px; border-radius: 4px; background: #2b1e21; }
#worldBossRoster strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
#worldBossRoster .wb-player-health { display: block; font-size: 11px; font-variant-numeric: tabular-nums; }
#worldBossRoster progress { display: block; width: 100%; height: 5px; accent-color: #c6473e; }
:is(#worldBossDialog, #worldBossResult) { width: min(510px, calc(100vw - 24px)); padding: 20px; color: var(--text); }
:is(#worldBossDialog, #worldBossResult)::backdrop { background: #0a0308a6; }
.wb-detail { display: flex; justify-content: space-between; align-items: start; gap: 8px 18px; flex-wrap: wrap; }
.wb-detail .wb-heading { flex: 1 1 140px; }
.wb-life { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px; margin-top: 16px; }
.wb-life progress { grid-column: 1 / -1; width: 100%; height: 12px; accent-color: #c6473e; }
.wb-contribution { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0 12px; }
.wb-contribution > div { background: #140d11; border: 1px solid #5a402b; border-radius: 4px; padding: 8px 10px; }
.wb-contribution dt { color: var(--muted); }
.wb-contribution dd { margin: 4px 0 0; color: var(--brass2); font-size: 19px; font-variant-numeric: tabular-nums; }
:is(#worldBossDialog, #worldBossResult) form { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#worldBossResult [data-result="items"] { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
#worldBossResult .wb-item { display: block; padding: 0; cursor: help; }

/* painel de administração: menu de áreas à esquerda, uma área por vez, tamanho fixo */
#traceDialog { width: min(1040px, calc(100vw - 32px)); max-width: none; height: min(720px, calc(100dvh - 32px)); max-height: none; padding: 18px; color: var(--text); overflow: hidden; flex-direction: column; }
#traceDialog[open] { display: flex; }
#traceDialog::backdrop { background: #000a; }
#traceDialog [hidden] { display: none; }
.adm-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 164px minmax(0, 1fr); gap: 18px; }
.adm-nav { display: flex; flex-direction: column; gap: 2px; padding-right: 12px; border-right: 1px solid #3d2f22; overflow-y: auto; }
.adm-nav b { margin: 12px 0 3px 8px; color: var(--muted); font: 700 11px 'Cinzel', serif; }
.adm-nav b:first-child { margin-top: 0; }
.adm-nav button { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--text); font: 13px/1.2 'Cinzel', serif; text-align: left; }
.adm-nav button:hover { border-color: #4a3820; }
.adm-nav button.on { border-color: var(--brass2); background: #3a2a1e; color: #ffecc0; }
.adm-count { color: #ffb677; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.adm-pane > h3, .adm-out h4 { margin: 0 0 10px; color: var(--brass2); font: 700 16px 'Cinzel', serif; }
.adm-out { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: 8px; font: 14px/1.45 'Segoe UI', system-ui, sans-serif; align-content: start; user-select: text; } /* dados densos: fonte limpa, números alinhados */
.adm-out :is(input, textarea) { font: inherit; }
.adm-out .tr-card { font: 13px 'IM Fell English', Georgia, serif; }
.adm-out h4 { margin: 18px 0 8px; font-size: 14px; }
.adm-out > h4:first-child { margin-top: 0; }
.adm-out p { margin: 0 0 10px; }
.adm-out a { color: var(--brass2); }
.adm-out .tq { color: var(--muted); font-size: 13px; }
.adm-out code { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.adm-empty { display: grid; place-items: center; height: 100%; margin: 0 !important; color: var(--muted); text-align: center; }
.adm-foot { flex: none; }
.tr-search { flex: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tr-search input { flex: 1 1 200px; min-width: 0; }
.tr-search .seg { display: flex; flex-wrap: wrap; gap: 4px; }
#traceInput { font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.adm-form { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.adm-form label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.adm-form :is(input, select) { width: 100%; min-height: 34px; }
.adm-metric { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid #2e2218; }
.adm-metric > div { flex: 1 1 200px; display: grid; gap: 2px; }
.adm-metric b { font: 700 15px 'Cinzel', serif; }
.adm-metric .ws-state { align-self: auto; }
.adm-kv { margin: 0 0 14px; }
.adm-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #2e2218; }
.adm-kv dt { color: var(--muted); }
.adm-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.adm-kv dd:empty::before { content: '—'; color: var(--muted); }
.adm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #3d2f22; }
.adm-sum dt { color: var(--muted); font-size: 12px; }
.adm-sum dd { margin: 2px 0 0; color: #f2e0b8; font-size: 19px; font-variant-numeric: tabular-nums; }
.adm-sum dd.neg { color: #f08080; }
.adm-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.adm-who .tr-name { font: 700 19px 'Cinzel', serif; }
/* uma compra: cabeçalho, barra usado/estornado/resta, números e onde foi usado */
.hg-list { list-style: none; margin: 0; padding: 0; }
.hg-buy { padding: 12px 0; border-bottom: 1px solid #2e2218; }
.hg-buy:first-child { padding-top: 0; }
.hg-buy.focus { margin: 0 -8px; padding: 12px 8px; background: #221711; border-radius: 4px; }
.hg-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.hg-top > :first-child { font-size: 15px; font-weight: 600; }
.hg-top .hg-price { margin-left: auto; color: #f2e0b8; font-size: 16px; font-variant-numeric: tabular-nums; }
.hg-bar { display: flex; height: 6px; margin: 8px 0 6px; background: #2a201a; border-radius: 2px; overflow: hidden; }
.hg-bar i { flex: 0 0 auto; }
.hg-c-used { background: #c98a3a; } .hg-c-back { background: #9c3a3a; } .hg-c-left { background: #4f8f52; }
.hg-nums { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hg-nums > span { color: var(--muted); }
.hg-nums b { color: var(--text); }
.hg-nums i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 1px; }
.hg-nums > :last-child { margin-left: auto; }
.hg-use { margin: 6px 0 0 !important; font-size: 13px; line-height: 1.5; color: var(--muted); }
.hg-use b { color: var(--text); }
.hg-use .warn { color: #ffb84a; }
.adm-page { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.adm-out .ws-wrap { min-height: 0; overflow-x: auto; }
.adm-out .ws-table { font-size: 13px; }
.adm-out .ws-table th { cursor: default; }
.adm-out td.hg-det { white-space: normal; min-width: 130px; color: var(--muted); }
.adm-out td small.tq { margin-left: 3px; }
.tr-top { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tr-card { background: rgba(14, 9, 12, .97); border: 2px solid #6b5230; border-radius: 4px; padding: 10px 12px; font-size: 13px; }
.tr-card .tn { font-family: 'Cinzel'; font-weight: 700; font-size: 15px; }
.tr-card .tr { font-size: 12px; margin-bottom: 6px; }
.tr-card .tm { color: #f2e0b8; font-size: 14px; }
.tr-card .tq { color: var(--muted); font-size: 12px; margin-top: 6px; }
.tr-hash { color: var(--brass2); font: 12px ui-monospace, Consolas, monospace; word-break: break-all; }
.tr-list { list-style: none; margin: 0; padding: 0; }
.tr-ev { padding: 9px 0; border-bottom: 1px solid #2e2218; display: grid; gap: 2px; }
.tr-ev.alert { margin: 0 -8px; padding: 9px 8px; background: #231013; border-radius: 4px; }
.tr-head { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.tr-when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tr-kind { font-weight: 700; color: #f2e0b8; }
.tr-kind.warn { color: #ffb84a; }
.tr-name { color: #f2e0b8; }
.adm-out .rp-item { padding: 12px 0; border: 0; border-bottom: 1px solid #2e2218; border-radius: 0; background: none; }
.adm-out .rp-text { margin: 6px 0; }
#rpAdminList { gap: 0; }
@media (max-width: 720px) {
  #traceDialog { width: calc(100vw - 16px); height: calc(100dvh - 16px - var(--safe-top, 0px) - var(--safe-bottom, 0px)); padding: 12px; }
  .tr-top, .adm-form { grid-template-columns: minmax(0, 1fr); }
  .hg-nums > :last-child { margin-left: 0; }
  .adm-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .adm-foot { margin-top: 10px; padding-top: 10px; }
  /* movimentos viram blocos: a tabela não cabe */
  .adm-stack :is(tbody, tr, td) { display: block; }
  .adm-stack tr:first-child { display: none; }
  .adm-stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px; border-bottom: 1px solid #241a16; }
  .adm-stack.ws-table td { padding: 0; border: 0; white-space: normal; }
  .adm-stack td:nth-child(1), .adm-stack td:nth-child(4) { color: var(--muted); font-size: 12px; }
  .adm-stack td:nth-child(2) { grid-area: 1 / 1; } .adm-stack td:nth-child(3) { grid-area: 1 / 2; }
  .adm-stack td:nth-child(1) { grid-area: 2 / 1; } .adm-stack td:nth-child(5) { grid-area: 2 / 2; }
  .adm-stack td:nth-child(4) { grid-area: 3 / 1 / 4 / 3; } .adm-stack td:nth-child(6) { grid-area: 4 / 1 / 5 / 3; }
  .adm-stack td:nth-child(5)::before { content: '= '; color: var(--muted); }
}
@media (max-width: 720px) and (orientation: portrait) {
  .adm-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
  .adm-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 0; border: 0; overflow: visible; }
  .adm-nav b { display: none; }
  .adm-nav button { justify-content: center; min-height: 36px; padding: 4px 2px; border-color: #4a3820; font-size: 11px; text-align: center; flex-wrap: wrap; gap: 0 4px; }
}
@media (max-height: 500px) {
  #traceDialog { height: calc(100dvh - 12px); padding: 10px 12px; }
  .adm-body { gap: 12px; }
  .adm-pane > h3 { display: none; }
  .tr-search, .ws-head { margin-bottom: 8px; }
  .adm-foot { margin-top: 8px; padding-top: 8px; }
}
/* métricas de armas (admin) */
.ws-state { align-self: center; color: var(--muted); font-size: 13px; }
.ws-state.on { color: #8fd07a; }
#wsDialog, #ssDialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px; color: var(--text); display: none; flex-direction: column; }
#wsDialog[open], #ssDialog[open] { display: flex; }
#wsDialog::backdrop, #ssDialog::backdrop { background: #000a; }
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid #6b5230; }
.ws-head h2 { margin: 0; color: var(--brass2); font: 700 18px 'Cinzel', serif; }
.ws-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 13px; }
.ws-filters label { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ws-by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
.ws-by .seg { display: flex; flex-wrap: wrap; gap: 4px; }
#wsInfo { margin: 8px 0; font-size: 12px; }
.ws-wrap { flex: 1 1 auto; min-height: 120px; overflow: auto; border: 1px solid #3d2f22; border-radius: 4px; }
.ws-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.ws-table th { position: sticky; top: 0; background: #1d1418; color: var(--brass2); font: 700 12px 'Cinzel', serif; text-align: right; padding: 6px 8px; border-bottom: 1px solid #6b5230; cursor: pointer; user-select: none; }
.ws-table th.dim, .ws-table td.dim { text-align: left; }
.ws-table th.sort { color: #ffecc0; }
.ws-table td { padding: 5px 8px; text-align: right; border-bottom: 1px solid #241a16; font-variant-numeric: tabular-nums; }
.ws-table tr:hover td { background: #1a1214; }
.ws-table tr.low td { color: var(--muted); }


/* ---------------------------------------------------------------- casas */
body:is(.in-house, .in-guild) #lobbyTitle { display: none; }
.ghall-head, .house-head { position: absolute; left: 50%; top: 88px; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 6px #000; white-space: nowrap; z-index: 2; }
.ghall-head b, .house-head b { display: block; font-family: 'Cinzel Decorative', serif; font-size: 24px; color: var(--brass2); letter-spacing: 1px; }
.ghall-head small, .house-head small { color: var(--muted); }
#houseBar { position: absolute; left: 50%; top: 177px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: max-content; max-width: 94vw; z-index: 2; }
.house-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 58px; padding: 4px 6px; background: linear-gradient(180deg, #2a1e22, #160f12); border: 2px solid #6b5230; border-radius: 6px; color: var(--text); cursor: pointer; font: inherit; }
.house-btn:hover { border-color: var(--brass2); }
.house-btn i { font-style: normal; font-size: 26px; line-height: 1; }
.house-btn span { font-size: 12px; }
.house-btn small { font-size: 11px; color: var(--muted); }
.house-btn em { font-style: normal; font-size: 11px; color: #9fe8d8; }
.house-btn.active { border-color: var(--verd); box-shadow: 0 0 10px rgba(63, 143, 127, .55); }
.house-btn.add { border-style: dashed; }
.house-btn.out { border-color: #6b3030; }
.house-own { padding: 10px 14px; margin-bottom: 12px; }
.house-own h3 { margin: 0; color: var(--brass2); font-family: Cinzel, serif; }
.house-own .toolbar { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.house-own input { width: 130px; }
.house-info { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.house-ico { font-size: 28px; text-align: center; }
#houseShop { width: min(560px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; color: var(--text); } /* largura fixa: o nome do pet não muda o tamanho do modal */
#houseShop h2 { margin-top: 0; }
.house-shop { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 60vh; overflow: auto; }
.house-shop-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; background: rgba(0, 0, 0, .25); border-radius: 4px; }
.house-shop-acts { display: flex; gap: 6px; align-items: center; }
.house-shop-row > i { font-style: normal; font-size: 24px; text-align: center; }
.buff.home { border-color: var(--brass); color: var(--brass2); }
.buff.rookie { border-color: #ffb84a; color: #ffd27a; }
@media (max-width: 900px), (max-height: 500px) {
  #houseBar { gap: 4px; }
  .house-btn { min-width: 42px; padding: 3px 4px; }
  .house-btn i { font-size: 20px; }
  .ghall-head b, .house-head b { font-size: 18px; }
}
@media (max-width: 1440px) { body.in-house #chat { width: min(24vw, 290px); height: 125px; } }
@media (max-width: 620px) {
  .ghall-head, .house-head { top: 122px; }
  #houseBar { top: 205px; }
}
/* casa: ícones sempre monocromáticos (mesmo se a fonte trocar o símbolo por emoji) */
#houseBar, #houseShop, .house-own, .house-ico, .house-lot, .buff.home, #panelBody .tabs .tab { font-variant-emoji: text; }
.house-btn i, .house-shop-row > i, .house-ico { filter: grayscale(1) brightness(1.4); color: var(--brass2); }
#guildCv, #houseCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* casa: ícone SVG do menu */
#menu button i { display: flex; align-items: center; justify-content: center; height: 1.25em; line-height: 1; }
#menu button i.ico-svg svg { width: .9em; height: .9em; }
/* casa: bairro e lotes */
.district { display: flex; gap: 14px; align-items: center; padding: 10px 14px; margin: 8px 0; }
.district-art { width: 116px; height: 94px; flex: none; }
.district-art canvas, .lot-art canvas, .house-ico canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.district-info { flex: 1; min-width: 0; }
.district-info h3 { margin: 0 0 6px; font-family: Cinzel, serif; color: var(--brass2); }
.district-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.district-chips .chip { display: flex; flex-direction: column; padding: 4px 10px; background: rgba(0, 0, 0, .3); border: 1px solid #4a3a2c; border-radius: 4px; }
.district-chips .chip small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.district-chips .chip b { color: var(--text); font-size: 14px; }
.district-occ { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.district-occ .bar { flex: 1; height: 6px; background: rgba(0, 0, 0, .45); border: 1px solid #4a3a2c; border-radius: 3px; overflow: hidden; }
.district-occ .bar > div { height: 100%; background: linear-gradient(90deg, var(--copper), var(--brass2)); }
.lot-bar { gap: 8px; align-items: center; }
.lot-bar .seg { display: inline-flex; gap: 4px; }
.house-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(166px, 1fr)); gap: 8px; margin: 8px 0; }
.house-lot { display: grid; grid-template-columns: 60px 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 8px 10px; background: linear-gradient(180deg, rgba(42, 30, 34, .9), rgba(22, 15, 18, .95)); border: 1px solid #4a3a2c; border-radius: 5px; }
.house-lot .lot-art { grid-row: span 2; width: 60px; height: 56px; }
.house-lot .lot-txt { display: flex; flex-direction: column; min-width: 0; }
.house-lot .lot-txt b { font-family: Cinzel, serif; color: var(--text); }
.house-lot .lot-txt small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.house-lot .btn { grid-column: 2; justify-self: start; padding: 2px 10px; }
.house-lot.free { border-color: #6b5230; }
.house-lot.free .lot-txt small { color: #9fe8d8; }
.house-lot.taken { opacity: .75; }
.house-lot.mine { opacity: 1; border-color: var(--brass2); }
.house-up-title { margin: 14px 0 4px; font-family: Cinzel, serif; color: var(--brass2); }
/* escada de tiers: quebra para 2 colunas antes de espremer; nome numa linha só, com reticências se faltar espaço */
.house-tiers { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.house-tiers .house-lot { grid-template-columns: 48px minmax(0, 1fr); gap: 2px 8px; min-width: 0; }
.house-tiers .lot-art { width: 48px; height: 44px; }
.house-tiers .lot-txt b, .house-tiers .lot-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .house-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .house-tiers .house-lot { grid-template-columns: 40px minmax(0, 1fr); padding: 6px 8px; gap: 2px 6px; } .house-tiers .lot-art { width: 40px; height: 38px; } .house-tiers .lot-txt b { font-size: 12px; } }
.house-own .district-info p { margin: 0; }
.house-ico canvas { width: 62px; }
.house-ico:has(canvas) { filter: none; }
#panel[data-view="pet"] { width: min(560px, 96vw); }
#panel[data-view="pet"] .panel-head { padding-bottom: 10px; }
#panel[data-view="pet"] #panelBody { padding: 14px; }
.pet-sheet { display: grid; gap: 12px; }
.pet-equipped, .pet-sheet-skill, .pet-sheet-progress, .pet-sheet-stats, .pet-sheet-empty {
  background: linear-gradient(155deg, #241a21, #171119 75%);
  border: 1px solid #594735;
  border-radius: 6px;
}
.pet-equipped {
  display: grid; grid-template-columns: minmax(100px, 34%) minmax(0, 1fr); align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #2a1f28, #171119 75%);
}
.pet-sheet-portrait {
  min-height: 155px; display: grid; place-items: center; position: relative; isolation: isolate;
  border-inline-end: 1px solid #40313b;
}
.pet-sheet-portrait::before {
  content: ''; position: absolute; width: min(76%, 124px); aspect-ratio: 1; z-index: -1; border-radius: 50%;
  border: 1px solid #594735;
  background: #211724;
}
.pet-sheet-portrait canvas { display: block; width: min(96%, 144px); height: auto; }
.pet-sheet h3, .pet-sheet-empty h3 { margin: 0; border: 0; padding: 0; letter-spacing: .025em; }
.pet-sheet-identity { display: grid; justify-items: start; gap: 10px; padding: 15px 18px; }
.pet-sheet-identity h3 { font-size: clamp(16px, 2.5vw, 24px); line-height: 1.22; color: #fff0d3; overflow-wrap: anywhere; }
.pet-sheet-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; font-size: 13px; color: #cbbda5; }
.pet-sheet-rarity {
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--pet-rarity) 48%, #372b36);
  background: color-mix(in srgb, var(--pet-rarity) 14%, #211822);
  color: color-mix(in srgb, var(--pet-rarity) 54%, #fff4df);
}
.pet-sheet-identity .btn { padding: 5px 12px; font-size: 11px; }
.pet-sheet-skill { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 12px; padding: 13px; }
.pet-sheet-skill canvas { width: 58px; height: 58px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--pet-skill-color) 54%, #31232e); }
.pet-sheet-skill-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; }
.pet-sheet-skill h3 { color: color-mix(in srgb, var(--pet-skill-color) 44%, #fff0cf); font-size: 15px; }
.pet-sheet-skill p { margin: 5px 0; line-height: 1.32; color: #eadfc9; }
.pet-sheet-cooldown, .pet-sheet-mode { color: #c2ad91; font-size: 12px; }
.pet-sheet-cooldown { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pet-sheet-progress { padding: 13px; }
.pet-sheet-progress-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; }
.pet-sheet-progress h3 { font-size: 13px; }
.pet-sheet-progress-head span { color: #d7e9c7; font-variant-numeric: tabular-nums; }
.pet-sheet-progress progress { appearance: none; display: block; width: 100%; height: 8px; margin: 8px 0; accent-color: #82cba3; border: 0; border-radius: 8px; overflow: hidden; background: #100b12; }
.pet-sheet-progress progress::-webkit-progress-bar { background: #100b12; }
.pet-sheet-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #49987d, #b6edce); }
.pet-sheet-progress p { margin: 4px 0; color: #cbbda5; font-size: 13px; }
.pet-sheet-progress strong { display: inline-block; margin-top: 4px; color: #b6edce; font-size: 13px; }
.pet-sheet-effects { margin: 4px 0 0; padding-inline-start: 17px; color: #b6edce; font-size: 13px; }
.pet-sheet-stats { padding: 13px; }
.pet-sheet-stats h3 { font-size: 13px; }
.pet-sheet-attributes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 9px 0 0; }
.pet-sheet-attributes > div {
  display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 33px;
  padding: 5px 8px; border: 1px solid #443541; border-radius: 4px; background: #1a141e;
}
.pet-sheet-attributes dt { color: #e2d4c2; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.pet-sheet-attributes dd { margin: 0; color: #b6edce; font: 700 14px Cinzel, Georgia, serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* afinidade: texto longo ("+6% de velocidade de movimento") ocupa a linha inteira e pode quebrar */
.pet-sheet-attributes > div.aff { grid-column: 1 / -1; }
.pet-sheet-attributes > div.aff dt { flex: none; }
.pet-sheet-attributes > div.aff dd { white-space: normal; text-align: right; min-width: 0; font-size: 13px; }
.pet-sheet-empty { padding: 18px; }
.pet-sheet-empty p { color: #d6c5ae; line-height: 1.4; }
@media (max-width: 760px), (max-width: 1000px) and (max-height: 520px) { #panel[data-view="pet"] { width: auto; } }
@media (max-width: 400px) {
  .pet-sheet-portrait { min-height: 126px; }
  .pet-sheet-identity { padding: 12px; }
  .pet-sheet-attributes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .district-art { width: 74px; height: 70px; } }

/* sair da casa/guild: logo abaixo do título (no canto inferior direito tampava os botões do mapa) */
#guildExit { display: block; margin: 6px auto 0; text-shadow: none; }
/* sair da casa: centralizado embaixo, acima da barra de skills */
#houseExit { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 2; text-shadow: none; }

/* casa: quadradinhos de bônus (miniatura do móvel + relógio de tempo) */
.hbuff { position: relative; display: inline-block; width: 34px; height: 34px; flex: none; border: 2px solid #6b5230; border-radius: 5px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #3a2a24, #140d10 80%); box-shadow: inset 0 0 0 1px rgba(224, 183, 100, .25), 0 2px 4px rgba(0, 0, 0, .6); }
.hbuff img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; }
.hbuff .sweep { position: absolute; inset: 0; background: conic-gradient(transparent var(--p, 100%), rgba(8, 4, 8, .58) 0); }
.hbuff .sweep::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1px; height: 50%; background: rgba(255, 220, 140, .85); transform-origin: 0 0; transform: rotate(calc(var(--p, 100%) * 3.6 + 180deg)); }
.hbuff b { position: absolute; left: 0; right: 0; bottom: 0; font: 700 9px/11px Cinzel, serif; text-align: center; color: #9fe8d8; background: rgba(0, 0, 0, .65); }
.hbuff.done { opacity: .35; }
.hbuff.big { width: 54px; height: 54px; }
.hbuff.big b { font-size: 11px; line-height: 13px; }
.hbuff.off img { filter: saturate(.35) brightness(.75); }
#buffBar .hbuff { border-color: var(--verd); box-shadow: inset 0 0 0 1px rgba(159, 232, 216, .25), 0 2px 4px rgba(0, 0, 0, .6); }
.house-btn { position: relative; min-width: 0; padding: 4px; gap: 0; }
.house-btn .lv { position: absolute; top: 1px; right: 3px; font: 700 9px Cinzel, serif; color: var(--brass2); text-shadow: 0 1px 2px #000; }
.house-btn.active .hbuff { border-color: var(--verd); }
.house-btn.add { width: 64px; justify-content: center; }
.house-btn.add i { font-size: 30px; color: var(--brass2); }
.house-shop-row { grid-template-columns: 52px 1fr auto; }
.house-shop-row > i img { width: 52px; height: 52px; object-fit: contain; }
.house-shop-row > i:has(img), .hbuff img { filter: none; }

/* aviso de atualização no topo da tela */
#updateBar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 8px 10px 8px 14px; border: 1px solid var(--brass); border-radius: 4px;
  background: linear-gradient(180deg, #2c1f14, #160e0a); color: #ffecc0; box-shadow: 0 6px 24px rgba(0,0,0,.6), 0 0 0 1px #000 inset;
  font-size: 14px; animation: ubIn .35s ease-out; }
#updateBar[hidden] { display: none; }
#updateBar .ub-icon { color: var(--brass2); font-size: 18px; animation: ubSpin 4s linear infinite; }
#updateBar .ub-text b { color: var(--brass2); }
@keyframes ubIn { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes ubSpin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { #updateBar { font-size: 12px; gap: 6px; } }

/* ---------------------------------------------------------------- Black Market (Nightmare Gear) */
.ng-ico { font-style: normal; color: #14080f; text-shadow: 0 0 2px #c46cff, 0 0 6px #7a1fd0, 0 0 1px #000; font-weight: 700; }
.pc-res .ng-res b { color: #d9b3ff; }
.bm-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.bm-switch .bm-tab.active { color: #e2c2ff; border-color: #8e3fd8; box-shadow: 0 0 8px #6a1fb066 inset; }
.bm-bal { margin-left: auto; color: #d9b3ff; font-size: 14px; }
#panelBody.bm-body { background: radial-gradient(ellipse at top, #22102e55, transparent 70%); }
#panelBody.bm-body .price { color: #d9b3ff; }
/* Black Market: o painel inteiro fica roxo para não confundir com o mercado comum (ouro) */
#panel.bm-panel { background: linear-gradient(180deg, rgba(34, 16, 46, .97), rgba(18, 8, 26, .98)); border-color: #7a3fb0; box-shadow: 0 0 22px #6a1fb055, 0 8px 30px #000a; }
#panel.bm-panel::before, #panel.bm-panel::after { background: #b07ae0; box-shadow: none; }
#panel.bm-panel .panel-head, #panel.bm-panel #panelFoot { border-color: #4a2c5e; }
#panel.bm-panel .panel-head h2 { color: #d9b3ff; }
#panel.bm-panel #panelFoot button:not(.on) { background: #1c0f26; border-color: #4a2c5e; }
#panel.bm-panel #panelFoot button.on { color: #f0dcff; border-color: #8e3fd8; background: #3a1c52; }
#panel.bm-panel input, #panel.bm-panel select { border-color: #5a3478; }
.bm-qr { display: inline-block; padding: 8px; background: #fff; border-radius: 4px; line-height: 0; }
.bm-qr img, .bm-qr svg { width: 180px; height: 180px; image-rendering: pixelated; }
.bm-wallet { display: grid; gap: 10px; }
.bm-card { padding: 10px 12px; border: 1px solid #4a2c5e; border-radius: 4px; background: #140b14; }
.bm-card h3 { margin: 0 0 8px; color: #d9b3ff; font: 700 14px 'Cinzel', serif; }
.bm-card p { margin: 6px 0; }
.bm-balance { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.bm-big { font: 700 24px 'Cinzel', serif; color: #e2c2ff; }
.bm-sub { font-size: 13px; text-align: right; }
.bm-net { padding: 1px 6px; border: 1px solid #ffb84a; border-radius: 8px; color: #ffb84a; font-size: 11px; }
.bm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.bm-row input { width: 120px; min-width: 0; }
.bm-secret { font-size: 15px; letter-spacing: .06em; color: #f2e0b8; word-break: break-all; }
.bm-card a { color: #d9b3ff; word-break: break-all; }
.bm-table { width: 100%; font-size: 13px; }
.bm-dep { padding: 6px 8px; border: 1px dashed #6b3f8a; border-radius: 4px; }
@media (max-width: 600px) { .bm-sub { text-align: left; } .bm-bal { margin-left: 0; } }
.bm-decide { display: grid; gap: 6px; margin-top: 6px; }
.bm-decide input { width: 100%; }
.map-toolbar > button { display: inline-flex; align-items: center; justify-content: center; }
.map-toolbar > button:hover { border-color: var(--brass2); background: #36251c; }
#reportDialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px; color: var(--text); overflow: auto; }
#reportDialog::backdrop { background: #000a; }
#reportDialog h2 { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px solid #6b5230; color: var(--brass2); font: 700 18px 'Cinzel', serif; }
#reportDialog h3 { margin: 14px 0 6px; color: var(--brass2); font: 700 15px 'Cinzel', serif; }
#reportDialog form { display: flex; justify-content: flex-end; margin-top: 12px; }
#reportDialog textarea, .rp-fbin { box-sizing: border-box; width: 100%; resize: vertical; padding: 8px; border: 1px solid #53402e; border-radius: 4px; background: #120d10; color: var(--text); font: inherit; }
.rp-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.rp-kinds label { position: relative; cursor: pointer; }
.rp-kinds input { position: absolute; opacity: 0; }
.rp-kinds span { display: block; padding: 7px; border: 1px solid #53402e; border-radius: 4px; color: var(--muted); text-align: center; }
.rp-kinds input:checked + span { border-color: #a97b41; background: #36251c; color: var(--brass2); }
.rp-kinds input:focus-visible + span { outline: 2px solid var(--brass2); }
.rp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.rp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rp-item { padding: 8px 10px; border: 1px solid #53402e; border-radius: 4px; background: #120d10; }
.rp-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-fb { margin-top: 6px; padding: 6px 8px; border-left: 2px solid var(--brass2); color: var(--brass2); }
.rp-fb .rp-text { color: var(--text); }
.rp-fbin { margin-top: 6px; }
.rp-act { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.rp-nav { display: flex; gap: 8px; align-items: center; justify-content: center; }
.rp-ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 5px; }
.rp-kinds span span { display: inline; padding: 0; border: 0; }
.rp-kind { white-space: nowrap; }
/* casa: incubadora */
#houseShop h3 { margin: 14px 0 6px; font-size: 13px; color: var(--brass2); }
#houseShop .ph-sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
#houseShop .ph-note { margin: 8px 0 0; font-size: 12px; }
.ph-link { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px; background: rgba(0, 0, 0, .25); border: 1px solid #3a2c1c; border-radius: 4px; }
.ph-mid { font: 700 14px 'Cinzel', serif; color: var(--brass2); text-align: center; white-space: nowrap; }
.ph-mid.sym { font: 400 26px/1 serif; font-variant-emoji: text; }
.ph-slot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ph-slot .cell { flex: none; }
.ph-slot .cap { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ph-slot .cap b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-slot .cap small { color: var(--muted); font-size: 12px; }
.ph-vigor { display: flex; flex-direction: column; gap: 2px; }
.ph-vigor small { color: var(--muted); font-size: 12px; }
.ph-vigor small.neg { color: #ff8a7a; }
.ph-vigor progress, .ph-prog progress { width: 100%; height: 6px; }
.ph-prog { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; }
.ph-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
.ph-kv.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.ph-kv > div { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: rgba(0, 0, 0, .22); border-radius: 3px; min-width: 0; }
.ph-kv.two > div { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 8px; }
.ph-kv dt { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-kv dd { margin: 0; font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ph-kv dd.pos { color: #8deba4; }
.pet-home-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 30vh; overflow: auto; padding: 3px; /* outline da célula .sel não é cortado pelo overflow */ }
.cell.empty { display: flex; align-items: center; justify-content: center; border-style: dashed; border-color: #4a3820; color: #6b5a44; font-size: 22px; cursor: default; }
.cell .pet-g { position: absolute; left: 3px; top: 1px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 1px #000; pointer-events: none; }
.cell .pet-g.m, .pet-sheet-meta .pet-g.m, .tg.m { color: #ff9a6a; }
.cell .pet-g.f, .pet-sheet-meta .pet-g.f, .tg.f { color: #8ec8ff; }
.cell.incompat { opacity: .4; }
/* moedor de pets (painel do pet) */
#petGrindDialog { width: min(560px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; color: var(--text); font-variant-emoji: text; }
#petGrindDialog .pg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#petGrindDialog h2 { margin: 0; }
#petGrindDialog p { margin: 8px 0; font-size: 13px; line-height: 1.4; }
#petGrindDialog .pg-bar { display: block; width: 100%; height: 6px; }
#petGrindDialog .pg-rates { font-size: 12px; }
#petGrindDialog .pet-home-grid { max-height: 38vh; }
.pet-grind-auto .btn { margin: 8px 0 0; }
.cell .pg-lock { position: absolute; right: 3px; top: 1px; font-size: 12px; color: var(--brass2); pointer-events: none; }
@media (max-width: 520px) {
  .ph-link { grid-template-columns: minmax(0, 1fr); }
  .ph-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-kv.two { grid-template-columns: minmax(0, 1fr); }
}
/* Vigor do pet: barra curta + número (tooltip, ficha, Mercado). Vermelho no fim. */
.vigor { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #9fd0ec; white-space: nowrap; }
.vigor i { position: relative; width: 44px; height: 6px; border: 1px solid #3a2c1c; background: #140e10; border-radius: 2px; overflow: hidden; }
.vigor i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: #4f9cc8; }
.vigor.low { color: #ff8a7a; }
.vigor.low i::after { background: #b04a3a; }
.ph-slot.drop, .pet-home-grid.drop { outline: 2px dashed var(--brass2); outline-offset: 3px; }
.ph-slot .cell[draggable="true"], .pet-home-grid .cell[draggable="true"] { cursor: grab; }

/* incubadora: pais e requisitos no topo, abas embaixo. Tamanho fixo: o modal não rola, só a grade ou a lista de combinações por dentro */
#houseShop.pent-dlg.breed-dlg { width: min(960px, calc(100vw - 32px)); }
#houseShop.breed-dlg > .ph-link { padding: 8px 10px; }
#houseShop.breed-dlg > .br-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden auto; }
.br-tabs { margin: 8px 0 10px; }
.br-filt .seg button, .br-attr-head .seg button { padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.pent-filt.br-filt { flex: none; justify-content: flex-start; flex-wrap: nowrap; }
.pent-filt.br-filt input[type="search"] { flex: 1 1 120px; }
.br-line { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 8px 0; min-height: 2.8em; }
#houseShop .br-line .pent-ok { margin: 1px 0 0; flex: none; }
#houseShop .br-line .pent-ok input { display: inline-block; width: auto; margin: 0; }
.br-status { margin: 0; font-size: 13px; line-height: 1.4; }
.breed-dlg .pet-home-grid { flex: 1 1 0; min-height: 64px; max-height: none; overflow: hidden auto; scrollbar-gutter: stable; align-content: start;
  display: grid; grid-template-columns: repeat(auto-fill, 58px); justify-content: space-between; }
.breed-dlg .pet-home-grid > p { grid-column: 1 / -1; margin: 8px 0 0; }
.breed-dlg .ph-slot .cell.empty { cursor: pointer; padding: 0; }
.cell .br-vig { position: absolute; left: 3px; right: 3px; bottom: 2px; height: 4px; background: #140e10; border-radius: 1px; overflow: hidden; pointer-events: none; }
.cell .br-vig::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: #4f9cc8; }
.cell .br-vig.low::after { background: #c2503c; }
.cell .br-eq, .cell .br-fav { bottom: 7px; }
.br-tip-why { margin-bottom: 4px; font-weight: 700; }
.br-req, .br-notes { list-style: none; margin: 0; padding: 0; }
.breed-dlg > .br-req { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.9fr); gap: 2px 16px; margin-top: 8px; }
.br-req li { display: flex; gap: 6px; font-size: 13px; min-width: 0; }
.br-req i { flex: none; width: 14px; text-align: center; font-style: normal; font-weight: 700; color: var(--muted); }
.br-req li.ok i { color: #8deba4; }
.br-req li.bad i, .br-req li.bad b { color: #ff8a7a; }
.br-req div { display: flex; flex-direction: column; min-width: 0; }
.br-req b { font-weight: 600; }
.br-req small, .br-attrs small { color: var(--muted); font-size: 12px; }
.br-empty { margin: 0 0 8px; font-size: 13px; }
.br-notes li { margin: 3px 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.br-notes li.neg { color: #ff8a7a; }
.br-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; }
#houseShop .br-child h3 { margin-top: 10px; }
.br-odds { margin: 0 0 8px; font-size: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.br-odds > div { padding: 4px 0; border-bottom: 1px solid #2a1f16; }
.br-odds dt { color: var(--muted); font-size: 11px; }
.br-odds dd { margin: 0; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.br-odds dd > span { display: flex; justify-content: space-between; gap: 8px; }
.br-attr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 13px; color: var(--brass2); }
.br-attr-head .seg { margin-left: auto; }
.br-attrs { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.br-attrs th { padding: 2px 4px 4px; font-weight: 400; font-size: 11px; color: var(--muted); text-align: right; }
.br-attrs td { padding: 3px 4px; border-top: 1px solid #2a1f16; text-align: right; white-space: nowrap; }
.br-attrs :is(th, td):first-child { text-align: left; padding-left: 0; white-space: normal; }
.br-attrs .pos { color: #8deba4; }
.br-combo-view { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.br-combo-view .br-attr-head { flex: none; }
.br-combos { flex: 1 1 0; min-height: 0; overflow: hidden auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: min-content; gap: 0 28px; align-content: start; font-size: 13px; line-height: 1.35; }
.br-combos > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px solid #2a1f16; }
.br-combos b { flex: none; font-variant-numeric: tabular-nums; }
.br-combos small { color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
  .pent-filt.br-filt { flex-wrap: wrap; }
  .br-filt .seg { flex: 1 1 100%; }
  .br-filt .seg button { flex: 1; padding: 4px 2px; }
  .breed-dlg > .br-req { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .br-child, .br-combos { grid-template-columns: minmax(0, 1fr); }
  #houseShop.breed-dlg > .br-body { min-height: 260px; }
}
@media (max-width: 520px) {
  .pent-filt.br-filt input[type="search"] { flex-basis: 100%; }
  .pent-filt.br-filt select { flex: 1 1 0; }
  .br-line { flex-direction: column; justify-content: flex-start; gap: 6px; }
  .breed-dlg .ph-link { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-height: 94px; }
  .breed-dlg .ph-mid { display: none; }
  .breed-dlg .ph-slot { gap: 6px; }
  .br-tabs .tab { flex: 1 1 auto; font-size: 12px; padding: 8px 2px; white-space: nowrap; }
  .br-req li { min-height: 54px; } /* 2 linhas de detalhe: escolher um pet não empurra as abas */
}

@media (max-height: 600px) { #houseShop.breed-dlg > .br-body { min-height: 260px; } .breed-dlg .pet-home-grid { min-height: 140px; } } /* tela baixa (celular deitado): aqui o modal rola */
/* Círculo de Transmutação (casa): principal · anel de engrenagem com 5 pedras · sacrifício */
#houseShop.pent-dlg { width: min(860px, calc(100vw - 32px)); }
.pent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; background: rgba(0, 0, 0, .25); border: 1px solid #3a2c1c; border-radius: 4px; }
.pent-side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.pent-side b { font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pent-side small { color: var(--muted); font-size: 12px; }
.pent-side .cell.empty { width: 62px; height: 62px; }
.pent { position: relative; width: 240px; aspect-ratio: 1; }
.pent svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #8a6a3a; stroke-width: .9; }
.pent svg .outer { stroke: #8a6a3a; stroke-width: 1.4; }
.pent svg .teeth { stroke: #6b5230; stroke-width: 2.2; }
.pent svg .inner { stroke: #4a3820; stroke-dasharray: 1.5 1.5; }
.pent .pent-stone { position: absolute; width: 48px; height: 48px; transform: translate(-50%, -50%); background-color: #1a1214; }
.pent .pent-stone.empty { font-size: 18px; cursor: pointer; }
.pent .pent-stone.empty:disabled { cursor: default; opacity: .55; }
.pent-chance { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font: 700 18px 'Cinzel', serif; color: var(--brass2); font-variant-numeric: tabular-nums; }
.pent-result { margin: 0 0 8px; font-weight: 700; }
.pent-cands { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 6px 8px; background: rgba(0, 0, 0, .22); border-radius: 3px; }
.pent-bag { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.pent-bag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pent-bag-row .cell { width: 46px; height: 46px; }
.pent-bag-row .cell.faded, .pent .cell.faded { opacity: .4; }
/* números da roda numa linha só, logo abaixo do anel */
.pent-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pent-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pent-stats small { color: var(--muted); font-size: 11px; margin-right: 4px; }
.pent-stats b { color: var(--text); }
@media (max-width: 560px) {
  .pent-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pent-mid { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .pent { width: min(240px, 70vw); }
}
/* transmutar: coluna única; altura fixa e maior para caberem mais linhas de itens. A faixa .pent-info tem altura fixa:
   o que aparece ao escolher itens (motivo, atributos, corrida) não rouba espaço da grade */
#houseShop.pent-dlg.pent-tm[open] { height: min(1000px, calc(100dvh - 16px)); max-height: none; }
.pent-tm > .pent-row { grid-template-columns: minmax(0, 1fr) 260px minmax(0, 1fr); padding: 6px 10px; }
.pent-tm .pent { width: 206px; }
.pent-tm .pent .pent-stone { width: 44px; height: 44px; }
#houseShop.pent-tm > .ph-sub { margin-bottom: 4px; }
#houseShop.pent-tm > .ph-note { margin: 0 0 8px; }
.pent-info { display: flex; gap: 14px; height: 112px; margin-top: 8px; }
.pent-text { flex: 1 1 0; min-width: 0; overflow-y: auto; }
.pent-text > :first-child { margin-top: 0; }
#houseShop .pent-text .pent-why { margin: 0 0 6px; padding: 5px 10px; }
.pent-text .pent-cands { margin: 6px 0 0; }
.pent-info .pent-bag { flex: none; margin-top: 0; order: -1; } /* pedras sempre na esquerda */
.pent-info .pent-race { flex: 1; height: 100%; margin-top: 0; padding: 5px 12px; gap: 3px; }
.pent-info:has(.pent-race:not([hidden])) > :not(.pent-race) { display: none; }
.pent-inv-head { display: flex; align-items: center; gap: 6px 14px; margin: 8px 0 6px; }
#houseShop .pent-inv-head h3 { margin: 0; flex: none; }
.pent-inv-head .pent-filt { flex: 1; min-width: 0; flex-wrap: nowrap; }
.pent-tm .pent-stats { min-height: 18px; white-space: nowrap; gap: 2px 8px; }
.pent-filt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; } /* colados na direita */
.pent-filt input[type="search"] { flex: 0 1 220px; min-width: 0; }
.pent-filt select { flex: 0 1 auto; min-width: 0; }
.pent-ok { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.pent-none[hidden] { display: none; }
.pent-none { flex-basis: 100%; margin: 8px 0 0; }
#houseShop.offer-dlg > .pent-filt { margin-bottom: 6px; }
/* forja de oferendas: mesmo tamanho fixo da transmutação (grade maior, rola por dentro) */
#houseShop.pent-dlg.offer-dlg { width: min(1180px, calc(100vw - 32px)); }
#houseShop.pent-dlg.offer-dlg[open] { height: min(900px, calc(100dvh - 32px)); }
@media (max-width: 900px) {
  .pent-info { flex-direction: column; height: auto; }
  .pent-text { flex: none; overflow: visible; }
  .pent-info .pent-race { flex: none; height: 112px; }
  .pent-inv-head { flex-direction: column; align-items: stretch; }
  .pent-inv-head .pent-filt { flex: none; flex-wrap: wrap; }
  #houseShop.pent-dlg.pent-tm > .pet-home-grid { flex: none; height: 60vh; } /* altura fixa: filtrar não muda o tamanho */
}
@media (max-width: 560px) { .pent-tm > .pent-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* corrida das barras da transmutação (sucesso × falha) */
.pent-race { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 10px 12px; box-sizing: border-box; height: 134px; contain: size layout; /* tamanho fixo: texto e números mudando não mexem no modal */ background: rgba(0, 0, 0, .3); border: 1px solid #3a2c1c; border-radius: 4px; }
.pent-race[hidden] { display: none; }
.pent-bar-top { display: flex; justify-content: space-between; align-items: center; height: 18px; line-height: 18px; font: 700 13px/18px 'Cinzel', serif; margin-bottom: 3px; white-space: nowrap; }
.pent-bar-top b { font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
.pent-bar.ok .pent-bar-top { color: #8deba4; }
.pent-bar.fail .pent-bar-top { color: #ff8a7a; }
.pent-track { height: 14px; background: #140e10; border: 1px solid #3a2c1c; border-radius: 2px; overflow: hidden; }
.pent-track i { display: block; height: 100%; width: 0; }
.pent-bar.ok .pent-track i { background: linear-gradient(#5fbf4a, #3f8a30); }
.pent-bar.fail .pent-track i { background: linear-gradient(#c8463a, #8a2a22); }
.pent-bar-top span::after { content: ' ▲'; font-size: 10px; visibility: hidden; }
.pent-bar.lead .pent-bar-top span::after { visibility: visible; }
.pent-bar.won .pent-track { border-color: #e0b764; }
.pent-bar.won .pent-bar-top { color: #ffe080; }
.pent-race-msg { margin: 0; text-align: center; font-style: italic; height: 20px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* arrastar para o Círculo de Transmutação */
.pent-side.drop, .pent.drop { outline: 2px dashed var(--brass2); outline-offset: 3px; border-radius: 4px; }
.pent.drop { border-radius: 50%; }
.pent-dlg .cell[draggable="true"] { cursor: grab; }

/* motivo do bloqueio da transmutação: logo abaixo da roda, sempre à vista */
.pent-why { margin: 8px 0 0; padding: 8px 12px; border: 1px solid #6a2a22; border-radius: 4px; background: rgba(120, 30, 20, .25); color: #ffb0a0; font-weight: 700; text-align: center; }
.pent-why[hidden] { display: none; }
@media (max-width: 560px) { .toolbar.mk-sell { flex-wrap: wrap; } }
/* compra de pilha: quantidade + total + Comprar na mesma célula */
.mk-buy-qty { display: flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.mk-buy-qty input.mk-qty { width: 56px; }

/* ---------------------------------------------------------------- Mercado: lista de anúncios
   uma linha por anúncio; raridade pela moldura do ícone e pela cor do nome (sem brilho, sem faixa lateral) */
.mk-bal { color: var(--brass2); }
.mk-bal b { font: 700 15px 'Cinzel', serif; }
.mk-note { margin: 0 0 8px; font-size: 13px; }
.mk-empty { padding: 30px 10px; text-align: center; }
.mk-grid { display: grid; }
.mk-card { display: grid; grid-template-columns: 44px minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(84px, auto) minmax(96px, auto); align-items: center; gap: 12px;
  padding: 6px 8px; border-bottom: 1px solid #2a1f22; }
.mk-card:not(.mk-head):hover { background: rgba(224, 183, 100, .05); }
.mk-head { padding-top: 0; padding-bottom: 5px; border-bottom-color: #4a3820; font: 12px 'Cinzel', serif; color: var(--muted); }
.mk-head span:nth-child(5) { text-align: right; }
.mk-ico { width: 44px; height: 44px; border: 2px solid #3a2c1c; border-radius: 4px; background: radial-gradient(circle, #2a2024, #0c080a); box-shadow: none !important; animation: none !important; }
.mk-ico canvas { display: block; width: 100%; height: 100%; border: 0; border-radius: 2px; }
.mk-ico.house-ico canvas { width: 100%; }
.mk-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mk-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-name small, .mk-det small { font-size: 12px; }
.mk-det { min-width: 0; color: #b9a988; line-height: 1.3; }
.mk-side { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #cdbd9a; }
.mk-price { text-align: right; line-height: 1.2; white-space: nowrap; }
.mk-price small { font-size: 11px; }
.mk-price .mk-total { display: block; }
.mk-card > .btn, .mk-act { justify-self: end; }
.mk-card > .btn, .mk-act > .btn { min-width: 84px; }
.mk-sellbox { position: sticky; top: -12px; z-index: 2; margin: 0 0 10px; }
.mk-sellbox.on { padding: 8px 10px; border: 1px solid #4a3820; border-radius: 4px; background: #1d1518; }
.mk-sellbox .toolbar { margin: 0 0 4px; }
.mk-sellbox .mk-ico { width: 40px; height: 40px; }
.mk-sellbox > .tq { font-size: 13px; }
#panelBody.bm-body .mk-card { border-bottom-color: #2e1e38; }
#panelBody.bm-body .mk-head { border-bottom-color: #4a2c5e; }
#panelBody.bm-body .mk-sellbox.on { border-color: #4a2c5e; background: #1a0f20; }

/* barra de buffs: ícones */
#buffBar { align-items: center; }
#buffBar:not(:has(.bf, .buff, .hbuff)) { display: none; }
#buffBar .buff-icons, #buffBar .buff-chips { display: flex; gap: 6px; align-items: center; }
#buffBar .bf { position: relative; width: 32px; height: 32px; border: 1px solid #3f8f7f; border-radius: 3px; background: rgba(20, 14, 17, .9); overflow: hidden; cursor: default; }
#buffBar .bf canvas { display: block; width: 32px; height: 32px; }
#buffBar .bf-lg { border-color: #8a6a32; }
#buffBar .bf-lg .bf-t { align-items: flex-end; padding-bottom: 2px; font-size: 11px; color: #e8d9b0; }
#buffBar .bf-sweep { position: absolute; inset: 0; pointer-events: none; }
#buffBar .bf-n { position: absolute; right: 1px; bottom: 0; font: 700 10px/1 system-ui, sans-serif; color: #f0c860; text-shadow: 0 1px 2px #000; pointer-events: none; }
#buffBar .bf-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 13px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; pointer-events: none; }

/* News: tamanho da fonte */
.news-fontsize { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 16px; }
.news-fs-btn { width: 36px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid #624d37; border-radius: 4px; color: #f2e0b8; cursor: pointer;
  font: 400 18px/1 Georgia, 'Times New Roman', serif; }
.news-fs-btn:hover:not(:disabled) { border-color: var(--brass2); color: #fff1d6; }
.news-fs-btn:active:not(:disabled) { transform: translateY(1px); }
.news-fs-btn:disabled { opacity: .35; cursor: default; }
.news-list { --news-fs: 18px; font-size: var(--news-fs); }
.news-list[data-size="s"] { --news-fs: 16px; }
.news-list[data-size="m"] { --news-fs: 18px; }
.news-list[data-size="l"] { --news-fs: 21px; }
.news-list .news-date { font-size: .9em; }
.news-list .news-tag { font-size: .72em; }
.news-list .news-post h3 { font-size: 1.05em; }
.news-list .news-post li, .news-list .news-summary, .news-list .news-note { font-size: 1em; }

/* ============ Guildas (client/js/guild.js) — sem brilho, sem faixa lateral e sem pílulas (ver CLAUDE.md) ============ */
#panel[data-view="guild"] { width: min(900px, 96vw); }
.guild-head { display: flex; gap: 14px; align-items: center; padding: 12px 14px; margin-bottom: 12px; }
.guild-head-txt { flex: 1; min-width: 0; }
.guild-head h3 { margin: 0 0 4px; color: var(--brass2); }
.guild-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.guild-meta b { color: var(--text); }
.guild-champ { color: #b98aff; }
.guild-xp { max-width: 360px; }
.guild-box { padding: 10px 14px; margin-bottom: 12px; }
.guild-box h3 { margin: 0 0 8px; font-size: 15px; color: var(--brass2); }
.guild-box h4 { margin: 10px 0 4px; font-size: 13px; color: var(--brass2); }
.guild-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid #2e2218; }
.guild-row:last-child { border-bottom: none; }
.guild-row .grow { flex: 1; min-width: 0; }
.guild-tag-in { width: 80px; text-transform: uppercase; }
.guild-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.guild-table th { text-align: left; color: var(--muted); font-weight: normal; padding: 4px 6px; border-bottom: 1px solid #3a2c1c; }
.guild-table td { padding: 5px 6px; border-bottom: 1px solid #241a14; vertical-align: middle; }
.guild-table tr.mine td { color: var(--brass2); }
.guild-acts { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.guild-table td:has(> .guild-acts) { width: 1%; }
.guild-foot { justify-content: flex-end; }
.guild-missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 12px; }
.guild-mission { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gm-head { display: flex; flex-direction: column; }
.gm-head b { color: var(--brass2); }
.guild-bar > div { background: linear-gradient(180deg, #c79a48, #7a5420); }
.guild-bar .gm-mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #2a1a08; }
.guild-bar .gm-mark.on { background: #fff2c0; }
.gm-tiers { display: flex; flex-direction: column; font-size: 12px; }
.guild-buffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 6px; }
.guild-buff { display: flex; flex-direction: column; padding: 6px 8px; background: rgba(0, 0, 0, .25); border: 1px solid #3a2c1c; border-radius: 3px; }
.guild-buff b { font-size: 18px; color: var(--text); }
.guild-buff small { color: var(--muted); font-size: 11px; }
.guild-notice { width: 100%; min-height: 64px; resize: vertical; font-family: 'IM Fell English', serif; font-size: 14px; background: #0e0a0c; color: var(--text); border: 1px solid #5a4528; border-radius: 3px; padding: 6px 8px; }
.guild-furns { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.guild-furn { display: flex; gap: 10px; padding: 10px 12px; align-items: flex-start; }
.guild-furn canvas { flex: none; border: 2px solid #3a2c1c; border-radius: 4px; background: #120c10; }
.guild-furn.off canvas { border-style: dashed; }
.gf-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gf-name b { color: var(--brass2); }
.gf-txt .toolbar { margin: 2px 0 0; }
.gf-txt input[type="number"] { width: 110px; }
.guild-match { padding: 4px 0; font-size: 13px; border-bottom: 1px solid #241a14; }
.guild-match summary { cursor: pointer; }
.gm-duel { padding: 2px 0 2px 18px; font-size: 12px; }
.guild-log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.guild-log li { padding: 5px 0; border-bottom: 1px solid #241a14; }
#guildHall { width: min(560px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 24px); overflow: auto; color: var(--text); padding: 12px 14px; }
#guildHall .dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#guildHall .dlg-head h2 { margin: 0; color: var(--brass2); }
.guild-hall-side { min-height: 60px; }
.guild-hall-side .guild-furn { padding: 8px 10px; }
@media (max-width: 700px) {
  .guild-furns { grid-template-columns: 1fr; }
  .guild-table th:nth-child(5), .guild-table td:nth-child(5), .guild-table th:nth-child(7), .guild-table td:nth-child(7) { display: none; }
}

/* ---- guildas: brasão, mostradores, chave da guerra, cartão da guerra, tag no chat (sem brilho, sem faixa lateral) ---- */
.guild-head .guild-crest { flex: none; width: 76px; height: 76px; }
.guild-hall-btn { flex: none; align-self: center; }
.gcrest { flex: none; vertical-align: middle; }
img.gcrest { width: 22px; height: 22px; margin-right: 6px; }
.gl-name { white-space: nowrap; }
.gm-top { display: flex; gap: 10px; align-items: center; }
.gm-dial { flex: none; width: 64px; height: 64px; }
.gm-top .gm-head { flex: 1; min-width: 0; }
.gm-pct { font: 700 18px Cinzel, serif; color: var(--text); margin-top: 2px; }
.gw-bracket { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 10px; align-items: stretch; }
.gw-round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 210px; }
.gw-title { font: 700 12px Cinzel, serif; color: var(--brass2); letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.gw-match { background: rgba(0, 0, 0, .3); border: 1px solid #3a2c1c; border-radius: 4px; padding: 4px 6px; position: relative; }
.gw-match summary { list-style: none; cursor: inherit; }
.gw-match summary::-webkit-details-marker { display: none; }
.gw-match[open] { border-color: #6b5230; }
.gw-match:not(:last-child)::after { content: ''; position: absolute; right: -18px; top: 50%; width: 18px; border-top: 1px solid #4a3a26; }
.gw-side { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 13px; }
.gw-side .gw-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-side .gw-score { font: 700 15px Cinzel, serif; min-width: 16px; text-align: right; }
.gw-side.win .gw-name, .gw-side.win .gw-score { color: var(--brass2); }
.gw-side.lose { opacity: .55; }
.gw-side.mine .gw-name { text-decoration: underline; text-decoration-color: #ff7ab8; text-underline-offset: 3px; }
.gw-match.bye small { display: block; padding-left: 32px; }
.gw-champion { align-items: center; justify-content: center; text-align: center; min-width: 170px; }
.gw-bracket.reveal .gw-round { animation: gwIn .45s ease-out both; animation-delay: calc(var(--i) * .35s); }
@keyframes gwIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
#guildWarOpen {
  grid-row: 4; margin-top: 4px; zoom: var(--hud-zoom, 1);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-align: left;
  padding: 8px 12px; min-width: 175px; min-height: 44px; pointer-events: auto;
}
#guildWarOpen b { grid-column: 1; color: var(--brass2); font: 700 13px 'Cinzel', serif; }
#guildWarOpen small { grid-column: 1; color: var(--muted); }
#guildWarOpen [data-gw="timer"] { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
#guildWarOpen[data-phase="warning"] { border-color: #d08b50; }
#guildWarOpen[data-phase="warning"] small { color: #ffb677; }
#guildWarOpen[data-phase="champ"] { border-color: #b8467e; }
#guildWarOpen[data-phase="champ"] small { color: #ff7ab8; }
#guildWarOpen:focus-visible, #guildWarOpen:hover { border-color: var(--brass2); }
#globalQuestOpen {
  grid-row: 5; margin-top: 4px; zoom: var(--hud-zoom, 1);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-align: left;
  padding: 8px 12px; min-width: 175px; min-height: 44px; pointer-events: auto;
}
#globalQuestOpen b { grid-column: 1; color: var(--brass2); font: 700 13px 'Cinzel', serif; }
#globalQuestOpen small { grid-column: 1; color: var(--muted); }
#globalQuestOpen[data-phase="active"] small { color: #9fd48a; }
#globalQuestOpen [data-gq="timer"] { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
#globalQuestOpen:focus-visible, #globalQuestOpen:hover { border-color: var(--brass2); }
/* Blood Castle: cartão no HUD e diálogo (pontos, regras, top 5) */
#bloodOpen {
  grid-row: 6; margin-top: 4px; zoom: var(--hud-zoom, 1);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-align: left;
  padding: 8px 12px; min-width: 175px; min-height: 44px; pointer-events: auto;
}
#bloodOpen b { grid-column: 1; color: #e07a6e; font: 700 13px 'Cinzel', serif; }
#bloodOpen small { grid-column: 1; color: var(--muted); }
#bloodOpen [data-bc="pts"] { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-variant-numeric: tabular-nums; }
#bloodOpen[data-phase="in"] { border-color: #a8383a; }
#bloodOpen[data-phase="in"] small { color: #ff8c80; }
#bloodOpen:focus-visible, #bloodOpen:hover { border-color: var(--brass2); }
#bloodDialog { width: min(510px, calc(100vw - 24px)); padding: 20px; color: var(--text); }
#bloodDialog::backdrop { background: #0a0308a6; }
#bloodDialog form { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#bloodDialog form > .btn:first-child { margin-right: auto; }
#bloodDialog .wb-contribution { grid-template-columns: repeat(3, 1fr); }
#bloodDialog .wb-heading h2 { color: #e07a6e; }
#bloodDialog .wb-timing > strong { font: 700 24px 'Cinzel', serif; font-variant-numeric: tabular-nums; }
.bc-top { width: 100%; margin: 4px 0 14px; border-collapse: collapse; font-size: 13px; }
.bc-top th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid #3a2c22; }
.bc-top td { padding: 4px 6px; border-bottom: 1px solid #22191a; font-variant-numeric: tabular-nums; }
.bc-top tr.me td { color: var(--brass2); }
#globalQuestDialog { width: min(510px, calc(100vw - 24px)); padding: 20px; color: var(--text); }
#globalQuestDialog::backdrop { background: #0a0308a6; }
.gq-list { list-style: none; margin: 16px 0 12px; padding: 0; display: grid; gap: 10px; }
.gq-list li { background: #140d11; border: 1px solid #5a402b; border-radius: 4px; padding: 8px 10px; display: grid; gap: 5px; }
.gq-head, .gq-foot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gq-head b { color: var(--brass2); }
.gq-bonus { color: #9fd48a; font-weight: 700; }
.gq-bonus.off { color: var(--muted); font-weight: 400; }
.gq-list progress { width: 100%; height: 10px; accent-color: #b8893e; }
.gq-foot-row { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.gq-foot { display: flex; justify-content: flex-start; gap: 8px; }
.hbuff.gbuff { border-color: #8a6428; background: #1a1210; }
.hbuff.gbuff b { color: #ffe0a0; }
.c-gtag { color: #e0b764; }
@media (max-width: 700px) {
  .gw-round { min-width: 170px; } #guildWarOpen { display: none; }
  .guild-head { flex-wrap: wrap; } .guild-head .guild-crest { width: 56px !important; height: 56px !important; } .guild-head-txt { flex: 1 1 180px; }
  .guild-hall-btn { flex: 1 1 100%; } .gm-dial { width: 52px; height: 52px; }
}
.hbuff.ghunt { border-color: #8a6428; background: #1a1210; }
.hbuff.ghunt b { color: #ffe0a0; }
/* chave da guerra: setas, barra lateral visível e arrastar */
.gw-view { position: relative; }
.gw-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gw-nav small { flex: 1; text-align: center; }
.gw-bracket, .gw-bracket * { cursor: grab; }
.gw-bracket { scrollbar-width: thin; scrollbar-color: #8a6428 #0e0a0c; }
.gw-bracket.dragging, body.gw-grabbing, body.gw-grabbing * { cursor: grabbing !important; user-select: none; }
.gw-bracket.dragging * { pointer-events: none; }
.gw-bracket::-webkit-scrollbar { height: 10px; }
.gw-bracket::-webkit-scrollbar-thumb { background: #8a6428; border-radius: 5px; }
/* chave em árvore: cartões posicionados por coordenada, linhas em SVG por baixo */
.gw-bracket.gw-treewrap { display: block; padding: 4px 2px 12px; }
.gw-tree { position: relative; }
.gw-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.gw-lines path { fill: none; stroke: #4a3a26; stroke-width: 2; }
.gw-lines path.mine { stroke: #c45a8e; stroke-width: 2.5; }
.gw-lines path.champ { stroke: #e0b764; stroke-width: 3; }
.gw-coltitle { position: absolute; top: 0; }
.gw-node { position: absolute; background: #1a1210; z-index: 1; }
.gw-node[open] { z-index: 3; box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
.gw-node::after { display: none; }
.gw-side.champ .gw-name { color: #ff7ab8; }
.gw-champnode { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.gw-bracket.reveal .gw-node, .gw-bracket.reveal .gw-coltitle, .gw-bracket.reveal .gw-champnode { animation: gwIn .45s ease-out both; animation-delay: calc(var(--i) * .3s); }
.gw-path { margin-top: 10px; }
.gw-path h4 { margin: 8px 0 4px; }
.gw-steps { margin: 0; padding-left: 18px; font-size: 13px; }
.gw-steps li { padding: 2px 0; }

/* ================= PARTY ================= */
.pc-right { display: inline-flex; align-items: center; gap: 8px; }
.pc-party { display: inline-flex; align-items: center; gap: 3px; height: 22px; min-width: 24px; padding: 0 5px; background: #1a1214; border: 1px solid #4a3820; border-radius: 3px; color: var(--muted); cursor: pointer; font: 700 11px 'Segoe UI', Tahoma, sans-serif; }
.pc-party svg { width: 15px; height: 15px; }
.pc-party:hover { border-color: var(--brass2); color: #ffecc0; }
.pc-party.on { color: var(--brass2); border-color: #8a6a3e; }
.pc-party.bonus { color: #8fd07a; }
.pc-party.invite { color: #ffd27a; border-color: #c89a3a; background: #3a2a1e; }
.pc-party b { font-variant-numeric: tabular-nums; }
.pc-party b:empty { display: none; }
#partyDialog { width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 16px 18px; color: var(--text); }
#partyDialog::backdrop { background: #000a; }
#partyDialog h3 { margin: 14px 0 6px; color: var(--brass2); font: 700 14px 'Cinzel', serif; }
.pt-intro { margin: 0 0 8px; }
.pt-bonus { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.pt-bonus.on { color: #8fd07a; }
.pt-wrap { min-height: 0; }
.pt-table td.dim, .pt-table th.dim { text-align: left; }
.pt-table th { cursor: default; }
.pt-who { min-width: 150px; }
.pt-name { display: flex; align-items: baseline; gap: 5px; }
.pt-name b.me { color: #ffecc0; }
.pt-lead { color: var(--brass2); }
.pt-hp { height: 4px; margin-top: 4px; background: #0b0709; border: 1px solid #000; }
.pt-hp i { display: block; height: 100%; background: #b02a2a; }
.pt-dmg { position: relative; min-width: 120px; }
.pt-dmg i { position: absolute; right: 8px; bottom: 2px; height: 3px; max-width: calc(100% - 16px); background: #8a6a3e; }
.pt-dmg span { position: relative; }
.pt-act { display: flex; gap: 4px; justify-content: flex-end; }
.pt-act .btn.small { min-height: 24px; padding: 2px 8px; }
.pt-total td { color: var(--brass2); border-top: 1px solid #6b5230; font-weight: 700; }
.pt-sum { margin: 6px 0 0; font-size: 12px; }
.pt-recv-row, .pt-sent-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #241a16; }
.pt-recv-row span, .pt-sent-row span { flex: 1; }
.pt-inv-row { display: flex; gap: 8px; }
.pt-inv-row input { flex: 1; min-width: 0; }
.pt-near { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.pt-near li { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid #241a16; }
.pt-near li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-cfg .set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #241a16; }
.pt-cfg .set-row > span { display: flex; flex-direction: column; gap: 2px; }
.pt-cfg .set-row small { font-size: 11px; }
@media (max-width: 600px) { #partyDialog { padding: 12px; } .pt-near { grid-template-columns: 1fr; } }
.hbuff.pbuff { background: #1a1214; color: #8fd07a; }
.hbuff.pbuff svg { position: absolute; left: 6px; top: 2px; width: 20px; height: 20px; }
.hbuff.pbuff b { color: #8fd07a; }

/* log do boneco de treino */
#trainLogDialog { width: min(620px, calc(100vw - 32px)); }
#trainLogDialog .dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#trainLogDialog .dlg-head h2 { margin: 0; color: var(--brass2); }
#trainLogDialog form { display: flex; justify-content: flex-start; gap: 8px; margin-top: 10px; }
.tlog-filters label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tlog-filters { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tlog-list { height: min(52vh, 460px); overflow-y: auto; background: rgba(10, 8, 12, .55); border: 1px solid rgba(255, 255, 255, .08); border-radius: 3px; padding: 4px 8px; font-size: 13px; overflow-x: hidden; }
.tlog-row { padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.tlog-row:last-child { border-bottom: 0; }
.tlog-top { display: flex; gap: 8px; align-items: baseline; }
.tlog-time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 86px; }
.tlog-src { flex: 1; min-width: 0; color: var(--text); }
.tlog-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.tlog-row.out .tlog-val { color: #e8d49a; }
.tlog-row.out.crit .tlog-val { color: #ffb14a; }
.tlog-row.in .tlog-val { color: #f08a7a; }
.tlog-row.heal .tlog-val { color: #8fdc8f; }
.tlog-row.miss .tlog-val { color: var(--muted); font-weight: 400; }
.tlog-f { margin: 2px 0 0 94px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tlog-f span { display: inline-block; }
.tlog-f span + span::before { content: " · "; }
.tlog-f b { color: var(--text); font-weight: 600; }
.tlog-empty { color: var(--muted); padding: 12px 0; text-align: center; }
@media (max-width: 520px) { .tlog-f { margin-left: 0; } .tlog-time { min-width: 0; } }

/* forja de nível (abas Sacrificar / Forjar nível do Círculo de Transmutação) */
.forge-banks { display: flex; gap: 8px; margin: 6px 0 10px; }
.forge-bank { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 8px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(20, 14, 16, .6); }
.forge-bank small { color: #b8a888; }
.forge-bank b { font-family: 'Cinzel', serif; font-size: 18px; color: #f2e0b8; }
.forge-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
#houseShop .forge-head h3 { margin: 0; }
.forge-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.forge-target { display: flex; gap: 14px; align-items: stretch; margin-bottom: 8px; }
.forge-left { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.forge-item { display: flex; gap: 12px; align-items: center; }
.forge-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.forge-xp { font-size: 12px; }
.forge-costs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: auto; }
.forge-cost { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #3a2c1c; border-radius: 4px; background: rgba(20, 14, 16, .6); min-width: 0; }
.forge-cost b { display: block; font-family: 'Cinzel', serif; font-size: 15px; color: #f2e0b8; }
.forge-cost small { display: block; font-size: 11px; color: #b8a888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forge-cost.neg b { color: #e06a5a; }
.forge-cost .cell { width: 34px; height: 34px; flex: none; }
.forge-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 1px solid #6b5230; border-radius: 4px; background: #140e10; color: #e8c060; font-size: 18px; }
.forge-prev { width: 260px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.forge-prev-h { color: #b8a888; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.forge-tip { background: rgba(14, 9, 12, .97); border: 2px solid #6b5230; border-radius: 4px; padding: 8px 10px; font-size: 12px; max-height: 170px; overflow-y: auto; }
.forge-tip .forge-up { color: #8fe07a; }
.forge-tip .forge-up::after { content: ' ▲'; font-size: 10px; }
@media (max-width: 640px) { .forge-target { flex-direction: column; } .forge-prev { width: auto; } .forge-costs { grid-template-columns: 1fr; } }
.forge-track { margin-top: 4px; }
.forge-track i { background: linear-gradient(#c9a050, #8a6a30); }
/* forja: tamanho fixo nas duas abas (a lista de itens rola por dentro; o modal nunca muda de tamanho) */
#houseShop.pent-dlg[open] { height: min(780px, calc(100dvh - 32px)); display: flex; flex-direction: column; overflow-y: auto; }
#houseShop.pent-dlg > * { flex: none; }
/* colunas de ponta a ponta (a folga vai para entre as células, nunca sobra à direita); a barra de rolagem fica no respiro do modal,
   com lugar reservado: com ou sem rolagem a última coluna alinha com a borda dos filtros */
#houseShop.pent-dlg > .pet-home-grid { flex: 1 1 0; min-height: 64px; max-height: none; overflow: hidden auto; scrollbar-gutter: stable; align-content: start;
  display: grid; grid-template-columns: repeat(auto-fill, 58px); justify-content: space-between; margin: 0 -12px 0 -3px; }
#houseShop.pent-dlg > .pet-home-grid > p { grid-column: 1 / -1; }
#houseShop.pent-dlg > .dlg-foot { margin-top: auto; }
#houseShop.forge-dlg .ph-sub { margin-bottom: 8px; }
#houseShop.forge-dlg .forge-banks { margin: 0 0 8px; }
#houseShop.forge-dlg .forge-bank { flex-direction: row; justify-content: center; gap: 8px; padding: 4px 8px; }
#houseShop.forge-dlg .pent-why { margin: 0 0 4px; padding: 5px 10px; }

/* ---------------------------------------------------------------- nascimento do filhote (house.js onBorn) */
.born-ov { position: fixed; inset: 0; z-index: 9000; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: inherit; background: rgba(8, 6, 4, .82); display: flex; align-items: center; justify-content: center; animation: bornFade .3s ease-out; }
.born-stage { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.born-fx { position: fixed; inset: 0; pointer-events: none; }
.born-egg { position: absolute; width: 110px; height: 140px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 35% 30%, #f6ead0, #c9a86a 55%, #7a5a2c); border: 3px solid var(--rc);
  animation: bornShake 1.5s cubic-bezier(.36,.07,.19,.97) forwards; }
.born-egg .crack { position: absolute; left: 20%; right: 20%; top: 45%; height: 4px; background: #2a1d0e;
  clip-path: polygon(0 50%, 15% 0, 30% 100%, 45% 0, 60% 100%, 75% 0, 90% 100%, 100% 50%); opacity: 0; animation: bornCrack 1.5s forwards; }
.born-ov.pop .born-egg { animation: bornBurst .35s ease-out forwards; }
.born-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(92vw, 360px);
  max-height: 92vh; overflow-y: auto; padding: 18px 16px 14px; background: var(--panel, #1d1710); border: 2px solid var(--rc); border-radius: 6px;
  opacity: 0; transform: scale(.4) translateY(40px); pointer-events: none; }
.born-ov.pop .born-card { animation: bornRise .6s cubic-bezier(.18,1.4,.4,1) .15s forwards; pointer-events: auto; }
.born-head { font-size: 30px; font-weight: 800; letter-spacing: 2px; color: var(--rc); text-transform: uppercase; }
.born-ov.pop .born-head { animation: bornPulse 1.2s ease-in-out .8s 3; }
.born-card .cell.big { width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; }
.born-ov.pop .born-card .cell.big { animation: bornSpin .9s ease-out .3s both; }
.born-tip { width: 100%; font-size: 13px; text-align: left; }
.born-notes p { margin: 2px 0; color: #f3d27a; font-weight: 700; text-align: center; }
.born-card .dlg-foot { width: 100%; display: flex; justify-content: flex-end; }
@keyframes bornFade { from { opacity: 0 } }
@keyframes bornShake { 0%,100% { transform: rotate(0) } 10% { transform: rotate(-4deg) } 20% { transform: rotate(4deg) } 30% { transform: rotate(-7deg) }
  40% { transform: rotate(7deg) } 55% { transform: rotate(-11deg) scale(1.04) } 70% { transform: rotate(11deg) scale(1.08) } 85% { transform: rotate(-14deg) scale(1.12) } 95% { transform: rotate(14deg) scale(1.16) } }
@keyframes bornCrack { 0%,40% { opacity: 0 } 60% { opacity: 1 } 100% { opacity: 1; height: 8px } }
@keyframes bornBurst { to { transform: scale(2.2); opacity: 0 } }
@keyframes bornRise { to { opacity: 1; transform: none } }
@keyframes bornPulse { 50% { transform: scale(1.12) } }
@keyframes bornSpin { from { transform: rotate(-200deg) scale(0) } to { transform: none } }
@media (prefers-reduced-motion: reduce) { .born-egg, .born-card, .born-head, .born-card .cell.big { animation-duration: .01s !important; } }

/* variante da transmutação: núcleo de latão com dentes girando no lugar do ovo */
.born-egg.core { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f3d27a, #a5772f 55%, #4a3315);
  border: 10px dotted var(--rc); animation: bornCore 1.5s cubic-bezier(.5,0,.9,.6) forwards; }
.born-egg.core .crack { display: none; }
@keyframes bornCore { from { transform: rotate(0) scale(.8) } to { transform: rotate(900deg) scale(1.2) } }
.born-ov::backdrop { background: transparent; }

/* ---------------------------------------------------------------- forja de oferendas (house.js forgeDialog)
 * Arco de 10 vagas sobre a fornalha animada (canvas) + painel de chances. Sem brilho: a cor da raridade vai no texto e no preenchimento das barras. */
.offer-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 12px; align-items: center; padding: 10px; background: rgba(0, 0, 0, .25); border: 1px solid #3a2c1c; border-radius: 4px; }
.offer-arc { position: relative; width: min(420px, 100%); aspect-ratio: 6 / 5; justify-self: center; }
.offer-arc .offer-furnace { position: absolute; left: 50%; bottom: 0; width: 58%; aspect-ratio: 220 / 210; transform: translateX(-50%); }
.offer-arc .offer-slot { position: absolute; width: 48px; height: 48px; transform: translate(-50%, -50%); background-color: #1a1214; transition: transform .55s cubic-bezier(.5, -0.3, .8, .4), opacity .55s ease-in; }
.offer-arc .offer-slot.empty { font-size: 16px; color: #6b5230; display: grid; place-items: center; }
.offer-arc .offer-slot.fly { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.15) rotate(220deg); opacity: 0; }
.offer-arc.roar { animation: offerRoar .12s linear infinite; }
.offer-arc.drop { outline: 1px dashed #c79a48; outline-offset: 4px; border-radius: 8px; }
.offer-count { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); font: 700 16px 'Cinzel', serif; color: var(--brass2); font-variant-numeric: tabular-nums; }
.offer-odds { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.offer-h { color: #b8a888; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.offer-big { font: 700 34px/1.05 'Cinzel', serif; font-variant-numeric: tabular-nums; }
.offer-rar { font-weight: 700; font-size: 15px; margin-top: -2px; }
.offer-split { display: flex; height: 12px; background: #140e10; border: 1px solid #6b5230; border-radius: 3px; overflow: hidden; }
.offer-split i { display: block; height: 100%; transition: width .35s ease; }
.offer-split i + i { border-left: 1px solid #140e10; }
.offer-split.type i.w { background: #b8893f; }
.offer-split.type i.e { background: #5a6b7a; }
.offer-leg { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-leg .offer-w { color: #e0b060; }
.offer-leg .offer-e { color: #9fb2c4; }
.offer-meta { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 12px; }
.offer-meta b { margin-right: 10px; color: var(--brass2); font-variant-numeric: tabular-nums; }
.offer-odds .ph-note { margin: 6px 0 0; }
@keyframes offerRoar { 0% { translate: 0 0; } 25% { translate: -1px 1px; } 50% { translate: 1px 0; } 75% { translate: 0 -1px; } 100% { translate: 0 0; } }
@media (max-width: 640px) { .offer-stage { grid-template-columns: 1fr; } .offer-arc .offer-slot { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .offer-arc.roar { animation: none; } }

/* revelação da forja: lingote em brasa (cor da raridade) que treme antes do estouro */
.born-egg.ingot { width: 150px; height: 70px; border-radius: 6px; border: 3px solid var(--rc);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #fff0c8 0%, #ffb347 30%, var(--rc) 75%, #3a1208 100%); }
.born-egg.ingot .crack { top: 40%; left: 15%; right: 15%; background: #fff6dc; }

/* Hora Treze (skill suprema): HUD do desfile, badalada final e despertar. Sem brilho: só contorno escuro no texto */
.u-flash.calm { mix-blend-mode: normal; }   /* tela inteira com blend pesa no meio do desfile */
.h13-skill { border-color: #e8c060 !important; }
.h13-pips { display: flex; gap: 2px; margin-top: 4px; }
.h13-pips i { flex: 1; max-width: 9px; height: 6px; border-radius: 1px; }
.skm-sig .btn { margin-left: auto; flex: none; }
.h13-hud { position: fixed; inset: 0; pointer-events: none; z-index: 14; font-family: 'Cinzel', serif; }
.h13-top { position: absolute; left: 50%; top: 17%; transform: translateX(-50%); width: min(440px, 78vw); text-align: center; }
.h13-name { font-weight: 900; font-size: clamp(17px, 3vw, 28px); min-height: 1.3em; -webkit-text-stroke: 4px #0b070a; paint-order: stroke fill; }
.h13-bar { height: 7px; margin-top: 4px; background: #120c10; border: 1px solid #6b5230; overflow: hidden; }
.h13-fill { height: 100%; background: #e8c060; transform-origin: left; }
.h13-combo { position: absolute; right: 24%; top: 34%; text-align: center; opacity: 0; color: #f2e0b8; -webkit-text-stroke: 4px #0b070a; paint-order: stroke fill; }
.h13-combo.on { opacity: 1; }
.h13-n { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 900; font-size: clamp(34px, 6vw, 68px); line-height: 1; }
.h13-lbl { font-size: 13px; letter-spacing: 2px; }
.h13-pow { font-size: 16px; font-weight: 700; color: #e8c060; }
.h13-combo[data-lv="1"] .h13-n { color: #ffd36a; } .h13-combo[data-lv="2"] .h13-n { color: #ff9a3a; }
.h13-combo[data-lv="3"] .h13-n { color: #ff5a3a; } .h13-combo[data-lv="4"] .h13-n { color: #ff4fd8; }
@keyframes h13pop { 0% { transform: scale(1.55); } 100% { transform: scale(1); } }
.h13-result { position: fixed; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; z-index: 17; animation: h13res 3.6s ease-out forwards; -webkit-text-stroke: 7px #0b070a; paint-order: stroke fill; }
.h13-sum { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 900; font-size: clamp(38px, 9vw, 104px); line-height: 1.1; color: #fff0c0; }
.h13-info { font-family: 'Cinzel', serif; font-size: 18px; color: #e8c060; -webkit-text-stroke-width: 4px; }
@keyframes h13res { 0% { transform: scale(2.2); opacity: 0; } 7% { transform: scale(.94); opacity: 1; } 11%, 78% { transform: scale(1); opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
.h13-awaken { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(6, 4, 8, .93); cursor: pointer; animation: h13in .3s; transition: opacity .4s; }
.h13-awaken.out { opacity: 0; }
.h13-a-t, .h13-a-s { opacity: 0; text-align: center; }
.h13-a-t { font-family: 'Cinzel Decorative', 'Cinzel', serif; font-weight: 900; font-size: clamp(34px, 8vw, 72px); color: #f2d58a; }
.h13-a-s { font-family: 'Cinzel', serif; font-size: 17px; color: #d8c8a8; }
.h13-awaken.full .h13-a-t { opacity: 1; animation: h13pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.h13-awaken.full .h13-a-s { opacity: 1; transition: opacity .8s .5s; }
@keyframes h13in { from { opacity: 0; } }
@media (max-width: 700px) { .h13-combo { right: 6%; } .h13-top { top: 23%; } }
