:root {
  --fundo: #17110d;
  --painel: #241a13;
  --painel2: #2e2219;
  --borda: #5a4330;
  --borda-clara: #8a6a45;
  --texto: #eadfca;
  --texto2: #b6a588;
  --ouro: #f0c35a;
  --vida: #c9433b;
  --xp: #4f9be0;
  --bom: #6fcf62;
  --ruim: #e2685d;
  --botao: #7a4d22;
  --botao2: #a0672c;
  --sombra: 0 2px 0 #0008;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fundo);
  background-image: linear-gradient(#17110de8, #17110df2), url(../arte/chao_pedra.png);
  background-size: auto, 128px;
  image-rendering: auto;
  color: var(--texto);
  font: 14px/1.45 Inter, system-ui, sans-serif;
  min-height: 100vh;
}
img.px, .px img, .spr { image-rendering: pixelated; }
h1, h2, h3, .titulo { font-family: Cinzel, Georgia, serif; letter-spacing: .5px; margin: 0 0 10px; color: var(--ouro); }
h2 { font-size: 20px; }
h3 { font-size: 15px; color: #e7c98a; }
a { color: var(--ouro); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
.mut { color: var(--texto2); }
.peq { font-size: 12px; }
.bom { color: var(--bom); }
.ruim { color: var(--ruim); }
.ouro { color: var(--ouro); }

/* ---------- layout ---------- */
#app { max-width: 1180px; margin: 0 auto; padding: 12px 16px 40px; }
.topo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  background: var(--painel); border: 2px solid var(--borda); border-radius: 10px; padding: 10px 14px; box-shadow: var(--sombra);
}
.logo { font-family: Cinzel, serif; font-weight: 800; font-size: 26px; color: var(--ouro); text-shadow: 0 2px 0 #000; }
.barras { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; min-width: 0; }
.barra { position: relative; height: 18px; background: #0006; border: 1px solid var(--borda); border-radius: 9px; overflow: hidden; }
.barra > i { position: absolute; inset: 0 auto 0 0; background: var(--vida); border-radius: 9px; transition: width .3s; }
.barra.xp > i { background: var(--xp); }
.barra > span { position: relative; display: block; text-align: center; font-size: 11px; font-weight: 700; line-height: 16px; text-shadow: 0 1px 1px #000; }
.recursos { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; font-weight: 700; }
.recursos > span { white-space: nowrap; }
.timers { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.timer { background: #0004; border: 1px solid var(--borda); border-radius: 6px; padding: 3px 9px; font-size: 12px; }
.timer b { color: var(--ouro); }
.timer.pronto b { color: var(--bom); }

.corpo { display: grid; grid-template-columns: 190px 1fr; gap: 14px; margin-top: 14px; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu button {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  background: var(--painel); border: 1px solid var(--borda); font-weight: 600; position: relative;
}
.menu button:hover { background: var(--painel2); border-color: var(--borda-clara); }
.menu button.on { background: linear-gradient(#7a4d22, #5a3716); border-color: var(--ouro); color: #fff; }
.menu .ic { width: 22px; text-align: center; }
.badge { margin-left: auto; background: var(--ruim); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.tela { min-width: 0; }
.painel { background: var(--painel); border: 2px solid var(--borda); border-radius: 10px; padding: 14px; box-shadow: var(--sombra); margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* ---------- botões ---------- */
.btn {
  appearance: none; border: 1px solid #c58a45; background: linear-gradient(var(--botao2), var(--botao)); color: #fff;
  font: 700 13px Inter, sans-serif; padding: 7px 14px; border-radius: 7px; cursor: pointer; box-shadow: var(--sombra); white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.btn.verm { background: linear-gradient(#b0443a, #7c2a23); border-color: #e2685d; }
.btn.verde { background: linear-gradient(#4e9a42, #2f6a28); border-color: #7fd46f; }
.btn.cinza { background: linear-gradient(#5a4d40, #3b3129); border-color: #7b6a58; }
.btn.peq { padding: 4px 9px; font-size: 12px; }
input[type=text], input[type=number], textarea, select {
  background: #0005; border: 1px solid var(--borda-clara); color: var(--texto); border-radius: 7px; padding: 7px 10px; font: inherit;
}
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.abas button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--borda); background: #0003; font-weight: 600; font-size: 13px; }
.abas button.on { border-color: var(--ouro); color: var(--ouro); background: #0006; }

/* ---------- retratos e sprites ---------- */
.ret { display: inline-block; position: relative; flex: none; border-radius: 50%; background: radial-gradient(hsl(var(--h, 30deg) 45% 38%), hsl(var(--h, 30deg) 40% 13%)); overflow: hidden; vertical-align: middle; }
.ret img { width: 100%; height: 100%; image-rendering: pixelated; transform: scale(1.35) translateY(8%); }
.ret-spr { display: block; width: 100%; height: 100%; background-size: 800% 100%; background-position: 0 0; background-repeat: no-repeat; image-rendering: pixelated; transform: scale(1.35) translateY(8%); }
.ret.grande { border-radius: 50%; }
.moldura { position: relative; display: inline-block; }
.moldura > .ret { position: absolute; inset: 12%; width: 76% !important; height: 76% !important; }
.moldura > img.mold { position: relative; width: 100%; height: 100%; image-rendering: pixelated; z-index: 1; pointer-events: none; }
.spr { display: inline-block; background-repeat: no-repeat; flex: none; }
.emo { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.on-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6b5d50; margin-right: 5px; vertical-align: middle; }
.on-dot.sim { background: var(--bom); box-shadow: 0 0 6px var(--bom); }

/* ---------- itens ---------- */
.slot {
  width: 58px; height: 58px; border-radius: 8px; border: 2px solid #4a3a2c; background: #0005; display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer; font-size: 28px;
}
.slot img { width: 46px; height: 46px; image-rendering: pixelated; }
.slot .vazio { font-size: 10px; color: #7d6c5a; text-align: center; line-height: 1.1; }
.slot:hover { border-color: var(--borda-clara); }
.slot .nv { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px #000; }
.boneco { display: grid; grid-template-columns: repeat(3, 58px); gap: 8px; justify-content: center; }
.mochila { display: grid; grid-template-columns: repeat(auto-fill, 58px); gap: 6px; }
.lista-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.item-linha { display: flex; gap: 10px; align-items: center; background: #0003; border: 1px solid var(--borda); border-radius: 8px; padding: 8px; }
.item-linha .info { flex: 1; min-width: 0; }
.item-linha .nome { font-weight: 700; font-size: 13px; }

.dica {
  position: fixed; z-index: 50; max-width: 270px; background: #120d09f5; border: 2px solid var(--borda-clara); border-radius: 8px; padding: 10px 12px;
  pointer-events: none; font-size: 13px; box-shadow: 0 6px 20px #000a;
}
.dica .nome { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.dica hr { border: 0; border-top: 1px solid var(--borda); margin: 6px 0; }

/* ---------- tabelas ---------- */
table.tab { width: 100%; border-collapse: collapse; }
.tab th { text-align: left; font-size: 12px; color: var(--texto2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--borda); }
.tab td { padding: 6px 8px; border-bottom: 1px solid #3a2b1f; vertical-align: middle; }
.tab tr.eu td { background: #f0c35a1a; }
.tab tr:hover td { background: #ffffff08; }
.quem { display: flex; align-items: center; gap: 8px; }
.tag { color: var(--texto2); font-size: 12px; }
.rolar { overflow-x: auto; }

/* ---------- atributos ---------- */
.atr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.atr .v { font-weight: 700; text-align: right; }
.atr .v small { color: var(--bom); font-weight: 600; }
.treino-linha { display: grid; grid-template-columns: 1fr 90px 110px auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #3a2b1f; }

/* ---------- expedições ---------- */
.locais { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.local { all: unset; cursor: pointer; background: #0003; border: 1px solid var(--borda); border-radius: 8px; padding: 10px; text-align: center; }
.local.on { border-color: var(--ouro); background: #f0c35a14; }
.local.bloq { opacity: .45; cursor: not-allowed; }
.local .ic { font-size: 26px; display: block; }
.inimigos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.inimigo { background: #0004; border: 1px solid var(--borda); border-radius: 10px; padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.inimigo .figura { height: 84px; display: flex; align-items: center; justify-content: center; }
.passos { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.passos i { width: 14px; height: 14px; border-radius: 50%; background: #0006; border: 1px solid var(--borda-clara); }
.passos i.feito { background: var(--bom); }
.passos i.atual { background: var(--ouro); }

/* ---------- mensagens ---------- */
.msg { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid #3a2b1f; cursor: pointer; }
.msg:hover { background: #ffffff08; }
.msg.nova { background: #f0c35a12; }
.msg.nova .t { color: var(--ouro); }
.msg .t { font-weight: 700; }
.msg .txt { color: var(--texto2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .meio { flex: 1; min-width: 0; }
.conversa { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding: 6px; background: #0003; border-radius: 8px; margin-bottom: 10px; }
.bolha { max-width: 75%; padding: 8px 12px; border-radius: 12px; background: var(--painel2); border: 1px solid var(--borda); white-space: pre-wrap; }
.bolha.eu { align-self: flex-end; background: #5a3716; border-color: #a0672c; }
.bolha .h { display: block; font-size: 10px; color: var(--texto2); margin-top: 2px; }
.enviar { display: flex; gap: 8px; }
.enviar input { flex: 1; min-width: 0; }
.rapidas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chat { max-height: 380px; overflow-y: auto; background: #0003; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.chat p { margin: 3px 0; }
.chat .sis { color: var(--texto2); font-style: italic; }

/* ---------- modal e relatório ---------- */
.modal { position: fixed; inset: 0; z-index: 40; background: #000b; display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.caixa { background: var(--painel); border: 2px solid var(--borda-clara); border-radius: 12px; padding: 18px; width: 100%; max-width: 640px; box-shadow: 0 10px 40px #000; position: relative; }
.caixa .fechar { position: absolute; right: 10px; top: 8px; all: unset; cursor: pointer; font-size: 22px; color: var(--texto2); }
.caixa .fechar { position: absolute; right: 12px; top: 8px; }
.duelo { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 10px; align-items: center; text-align: center; margin-bottom: 12px; }
.duelo .lado { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.duelo .vs { font-family: Cinzel, serif; font-size: 24px; color: var(--ouro); }
.duelo .barra { width: 100%; max-width: 200px; }
.rounds { max-height: 260px; overflow-y: auto; background: #0004; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.rounds p { margin: 2px 0; }
.rounds .crit { color: var(--ouro); font-weight: 700; }
.resultado { text-align: center; font-family: Cinzel, serif; font-size: 22px; margin: 10px 0 4px; }
.ganhos { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; font-weight: 700; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hit { animation: hit .25s; }
@keyframes hit { 0% { transform: translateX(0); filter: brightness(2) } 50% { transform: translateX(-5px) } 100% { transform: translateX(0) } }

.avisos { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.aviso { background: #241a13f5; border: 1px solid var(--borda-clara); border-left: 4px solid var(--ouro); border-radius: 8px; padding: 10px 14px; box-shadow: 0 6px 20px #000a; animation: entra .25s; max-width: 340px; }
.aviso.erro { border-left-color: var(--ruim); }
@keyframes entra { from { transform: translateY(10px); opacity: 0 } }

/* ---------- criação ---------- */
.criacao { max-width: 460px; margin: 8vh auto; text-align: center; }
.criacao .logo { font-size: 46px; margin-bottom: 4px; }
.criacao input[type=text] { width: 100%; font-size: 16px; text-align: center; margin: 8px 0; }
.criacao input[type=range] { width: 100%; }

.bio { background: linear-gradient(#2e2219, #241a13); border: 1px solid var(--borda-clara); border-radius: 10px; padding: 14px 16px; text-align: center; line-height: 1.5; }
.bio > div { margin: 3px 0; overflow-wrap: anywhere; }
.bio-lema { font-family: Cinzel, Georgia, serif; font-weight: 800; font-size: 22px; color: var(--ouro); text-shadow: 0 2px 0 #000; }
.bio-medieval { font-family: MedievalSharp, 'Pirata One', Georgia, serif; font-size: 24px; color: #e7c98a; }
.bio-grito { font-family: 'Pirata One', Impact, sans-serif; font-size: 22px; color: var(--ruim); text-transform: uppercase; letter-spacing: 1px; }
.bio-cit { font-family: Georgia, serif; font-style: italic; font-size: 16px; color: #d8c8a8; }
.bio-cit::before { content: '“'; } .bio-cit::after { content: '”'; }
.bio-peq { font-size: 12px; color: var(--texto2); }
.bio-vazio { height: 6px; }
.ataque-rodape { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.ataque-rodape .btn { font-size: 18px; padding: 12px 34px; }
/* ---------- sede da guilda ---------- */
.sede { position: relative; width: 100%; max-width: 820px; margin: 0 auto; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: url(../arte/grama.png) 0 0 / 96px; image-rendering: pixelated; border: 3px solid var(--borda-clara); box-shadow: inset 0 0 40px #0008; }
.sede-rua { position: absolute; background: url(../arte/rua.png) 0 0 / 64px; image-rendering: pixelated; opacity: .95; }
.sede-rua.h { left: 0; right: 0; top: 52%; height: 9%; }
.sede-rua.v { top: 0; bottom: 0; left: 46%; width: 8%; }
.sede-arvore { position: absolute; width: 7%; aspect-ratio: 1; transform: translate(-50%, -60%); background: url(../arte/arvore.png) 0 0 / 300% 100% no-repeat; image-rendering: pixelated; pointer-events: none; }
.sede-predio { position: absolute; transform: translate(-50%, -55%); text-align: center; cursor: pointer; transition: transform .15s; }
.sede-predio:hover { transform: translate(-50%, -58%) scale(1.06); z-index: 3; }
.sede-predio.solto { position: relative; transform: none; cursor: default; }
.sede-predio img { width: 100%; display: block; margin: 0 auto; filter: drop-shadow(0 4px 2px #0007); }
.sede-predio.salao { z-index: 2; }
.sede-svg { width: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 0 #0004); }
.sede-praca { position: absolute; left: 50%; top: 45%; width: 34%; height: 40%; transform: translate(-50%, -50%); border-radius: 50%;
  background: url(../arte/chao_pedra.png) 0 0 / 32px; image-rendering: pixelated; box-shadow: 0 0 0 3px #6d5a45, 0 0 24px #0006 inset; opacity: .95; }
.sede-obra { position: absolute; top: -6%; left: 50%; transform: translateX(-50%); z-index: 2; background: #f0c35aee; color: #241a13; font-weight: 800;
  font-size: clamp(9px, 1.3vw, 12px); padding: 1px 6px; border-radius: 6px; white-space: nowrap; box-shadow: 0 2px 4px #0008; }
.sede-casas { display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.sede-casas img { width: 60%; margin: 0 -8%; }
.sede-base { position: relative; width: 100%; aspect-ratio: 1.2; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: url(../arte/chao_pedra.png) 0 0 / 32px; image-rendering: pixelated; border: 2px solid #5a4636; box-shadow: 0 5px 0 #2a1f17, 0 8px 10px #0008; }
.sede-base.vazio { background: #6b5a3a88; border-style: dashed; box-shadow: none; }
.sede-base.vazio span { font-size: clamp(18px, 4vw, 34px); opacity: .8; }
.sede-base.est2 { border-color: #a0672c; }
.sede-base.est3 { border-color: var(--ouro); box-shadow: 0 5px 0 #6b4a12, 0 0 16px #f0c35a88; }
.sede-ic { font-size: clamp(20px, 5vw, 46px); filter: drop-shadow(0 3px 0 #0008); }
.sede-band { position: absolute; top: -14%; left: 0; right: 0; font-size: clamp(9px, 1.6vw, 16px); letter-spacing: -2px; }
.sede-placa { display: inline-block; margin-top: 4px; background: #241a13ee; border: 1px solid var(--borda-clara); border-radius: 6px; padding: 1px 7px;
  font-size: clamp(9px, 1.4vw, 12px); white-space: nowrap; color: var(--texto); }
.sede-placa b { color: var(--ouro); }
.sede-placa.grande { font-family: Cinzel, serif; font-size: clamp(10px, 1.7vw, 14px); border-color: var(--ouro); }

.menu-abas { display: flex; gap: 4px; margin: 6px 0 2px; }
.menu-abas button { flex: 1; padding: 6px 4px !important; justify-content: center; font-size: 12px; }
.menu-sep { height: 6px; }
.abas-perfil { margin-bottom: 14px; }
.abas-perfil button { font-size: 14px; padding: 8px 14px; }
.drops { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; font-size: 11px; color: var(--texto2); }
.cmp { display: grid; grid-template-columns: 1fr 150px 1fr; column-gap: 10px; margin: 0 0 12px; text-align: center; align-items: center; }
.cmp > span { padding: 4px 6px; border-bottom: 1px solid #3a2b1f; font-weight: 600; }
.cmp > span.mut { font-weight: 400; }
.estandarte { flex: none; filter: drop-shadow(0 2px 2px #0008); }
@media (max-width: 760px) { .menu-abas { flex: none; } .menu-sep { display: none; } }

.com-dica { cursor: help; }
.atr-barra { grid-column: 1 / -1; display: flex; height: 5px; margin: -2px 0 4px; background: #0007; border-radius: 3px; overflow: hidden; border: 1px solid #3a2b1f; }
.atr-barra i { display: block; height: 100%; }
.atr-barra .b { background: #3f8f35; }
.atr-barra .it { background: #8fe07a; }
.atr-barra.cheio .it { background: #f0a43a; }
.com-dica:hover { color: var(--ouro); }

.selos { display: flex; flex-wrap: wrap; gap: 4px; }
.selo { font-size: 11px; padding: 1px 6px; border-radius: 10px; border: 1px solid #4a3a2c; color: var(--texto2); opacity: .7; }
.selo.ok { border-color: var(--ouro); color: var(--ouro); opacity: 1; }

.voltar { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 6px 14px; border-radius: 8px;
  background: var(--painel); border: 1px solid var(--borda-clara); font-weight: 700; color: var(--ouro); }
.voltar:hover { background: var(--painel2); }

.tb { display: flex; align-items: center; gap: 6px; background: #0004; border: 1px solid var(--borda); border-radius: 8px; padding: 3px 6px 3px 8px; }
.tb-ic { font-size: 16px; }
.tb-n { font-size: 13px; min-width: 42px; text-align: center; color: var(--ouro); }
.tb-barra { all: unset; cursor: pointer; position: relative; width: 140px; height: 20px; border-radius: 4px; overflow: hidden; background: #2a0f0d; border: 1px solid #6b2a20; }
.tb-barra i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#7a2a20, #5a1a14); }
.tb-barra span { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 700; line-height: 20px; color: #f3e6cf; text-shadow: 0 1px 1px #000; font-variant-numeric: tabular-nums; }
.tb-barra.pronto { background: linear-gradient(#3f8a35, #2a5f24); border-color: #7fd46f; }
.tb-barra.pronto i { display: none; }
.tb-barra:hover { filter: brightness(1.15); }
@media (max-width: 760px) { .tb-barra { width: 104px; } }

.titulo-tag { color: #e7c98a; font-family: Cinzel, Georgia, serif; font-size: 12px; margin-left: 4px; white-space: nowrap; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  #app { padding: 8px 10px 40px; }
  .topo { grid-template-columns: 1fr; }
  .logo { display: none; }
  .recursos { justify-content: flex-start; }
  .corpo { grid-template-columns: 1fr; }
  .menu { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .menu button { flex: none; padding: 8px 10px; }
  .menu .txt { display: none; }
  .cols { grid-template-columns: 1fr; }
  .treino-linha { grid-template-columns: 1fr auto; }
  .treino-linha .custo { grid-column: 1; }
  .hide-cel { display: none; }
}

/* perfil: barras de vida e experiência */
.atr-barra.vida { height: 7px; } .atr-barra.vida i { background: linear-gradient(90deg, #a3271c, #d9442f); }
.atr-barra.xpb i { background: linear-gradient(90deg, #b8921f, #f0c35a); }

/* artes novas da sede (alta resolução: sem pixelar ao reduzir) */
.sede-img { width: 100%; display: block; margin: 0 auto; filter: drop-shadow(0 4px 3px #0008); }

/* conquistas por categoria */
.conq-topo { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.conq-total { font-family: Cinzel, serif; font-size: 30px; color: var(--ouro); line-height: 1; }
.conq-ultimas { display: flex; flex-wrap: wrap; gap: 6px; }
.conq-cat { border: 1px solid var(--borda); border-radius: 8px; margin-bottom: 8px; background: #0003; }
.conq-cat > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-weight: 700; font-family: Cinzel, serif; }
.conq-cat > summary::-webkit-details-marker { display: none; }
.conq-cat[open] > summary { border-bottom: 1px solid var(--borda); }
.conq-linha { display: grid; grid-template-columns: 1fr auto auto 46px; gap: 12px; align-items: center; padding: 6px 12px; border-bottom: 1px solid #ffffff0d; }
.conq-linha:last-child { border-bottom: 0; }
.conq-prog { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.conq-bs { display: flex; gap: 4px; }
.conq-b { width: 12px; height: 12px; border-radius: 50%; background: #3a2b1f; border: 1px solid #5a4630; display: inline-block; }
.conq-b.ok { background: radial-gradient(circle at 35% 35%, #ffe08a, #c9921f); border-color: #f0c35a; box-shadow: 0 0 4px #f0c35a88; }
.conq-pts { justify-self: end; min-width: 38px; text-align: center; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 12px; background: #2a2016; border: 1px solid var(--borda); }
.conq-pts small { color: var(--mut, #a99); font-weight: 400; }
.conq-pts.cheio { background: linear-gradient(#f0c35a, #b8861f); color: #2a1a08; border-color: #ffe08a; }
@media (max-width: 640px) { .conq-linha { grid-template-columns: 1fr auto; } .conq-bs { grid-column: 1; } }

/* torneio: chaveamento */
.tn-chave { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.tn-col { display: flex; flex-direction: column; min-width: 170px; flex: 1 0 170px; }
.tn-titulo { text-align: center; font-family: Cinzel, serif; font-weight: 700; font-size: 13px; padding: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 6px; color: var(--mut, #a99); }
.tn-titulo.atual { color: var(--ouro); }
.tn-jogos { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: 6px; }
.tn-jogo { position: relative; border: 1px solid var(--borda); border-radius: 6px; background: #0004; overflow: hidden; }
.tn-jogo.proximo { border-color: #8a6a3a; }
.tn-jogo.meu { border-color: var(--ouro); box-shadow: 0 0 8px #f0c35a55; }
.tn-jogo[data-a] { cursor: pointer; }
.tn-jogo::after { content: ''; position: absolute; right: -15px; top: 50%; width: 14px; border-top: 1px solid var(--borda); }
.tn-col:nth-last-child(2) .tn-jogo::after { width: 14px; }
.tn-col:last-child .tn-jogo::after { display: none; }
.tn-lado { position: relative; display: flex; justify-content: space-between; gap: 6px; padding: 3px 7px 4px; font-size: 12px; line-height: 1.3; }
.tn-lado + .tn-lado { border-top: 1px solid #ffffff12; }
.tn-lado.vazio { color: #6d5d4a; font-style: italic; }
.tn-lado.venc { background: #f0c35a1c; }
.tn-lado.venc .tn-nome, .tn-lado.venc .tn-nome a { color: var(--ouro); font-weight: 700; }
.tn-lado.perd { opacity: .5; }
.tn-lado.perd .tn-nome { text-decoration: line-through; }
.tn-lado.eu .tn-nome b { color: #7fd46f; }
.tn-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-nv { color: var(--mut, #a99); font-size: 11px; }
.tn-hp { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #0006; }
.tn-hp b { display: block; height: 100%; background: #c0392b; }
.tn-ver { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--ouro); opacity: .8; }
.tn-campeao { text-align: center; font-size: 28px; border: 1px solid var(--ouro); border-radius: 8px; padding: 10px 6px; background: #f0c35a14; }
.tn-campeao a, .tn-campeao b { font-size: 13px; }

/* cabeçalho de tabela clicável pra ordenar */
th.ordena { cursor: pointer; user-select: none; white-space: nowrap; }
th.ordena:hover { color: var(--ouro, #e8c36a); }
th.ordena.on { color: var(--ouro, #e8c36a); }

/* conquistas: os 5 níveis de cada linha com meta e título */
.conq-bloco { border-bottom: 1px solid #ffffff0d; padding-bottom: 6px; }
.conq-bloco:last-child { border-bottom: 0; }
.conq-bloco .conq-linha { border-bottom: 0; }
.conq-nome small { font-weight: 400; font-size: 12px; }
.conq-nivs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 2px; }
.conq-niv { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: #1a130d; border: 1px solid #3a2b1f; color: #9c8b78; }
.conq-niv b { color: #c9a873; margin-right: 2px; }
.conq-niv.ok { background: #3a2a10; border-color: #c9921f; color: #ffe08a; }
.conq-niv.prox { border-color: #f0c35a; color: #f3e6d0; box-shadow: 0 0 4px #f0c35a55; }

/* ---------- celular (ajustes finos) ---------- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  /* grades montadas na própria tela (arena, guilda, VIP...) viram uma coluna */
  .tela div[style*="grid-template-columns"]:not(.treino-linha):not(.cmp):not(.conq-linha) { grid-template-columns: 1fr !important; }
  /* tabela larga rola dentro do painel, não a página inteira */
  .painel { overflow-x: auto; }
  .tab { min-width: 100%; }
  .tab th, .tab td { padding: 5px 5px; }
  .enviar { flex-wrap: wrap; }
  .enviar input { min-width: 0; flex: 1 1 140px; }
  .item-linha { flex-wrap: wrap; }
  .abas button { padding: 6px 9px; font-size: 12px; }
  .btn { touch-action: manipulation; }
  .modal { padding: 12px 6px; }
  .modal > div { max-width: 100%; }
  .cmp { grid-template-columns: 1fr 96px 1fr; font-size: 13px; }
  .tb-barra { width: 90px; }
  .timers { gap: 5px; }
}

/* ---------- celular: cara de app ---------- */
.navcel, .folha { display: none; }
@media (max-width: 760px) {
  #app { padding: 6px 8px 84px; }
  .menu { display: none !important; }
  .corpo { margin-top: 8px; gap: 8px; }
  /* topo compacto */
  .topo { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px; }
  .barras { grid-template-columns: 1fr 1fr; gap: 4px 10px; }
  .barras .peq { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .barra { height: 15px; } .barra > span { font-size: 10px; line-height: 13px; }
  .recursos { justify-content: space-between; gap: 8px; font-size: 13px; }
  .timers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .timers > * { min-width: 0; }
  .tb { padding: 3px 5px; }
  .tb-n { min-width: 34px; font-size: 12px; }
  .tb-barra { flex: 1; width: auto; min-width: 0; }
  .tb-barra span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
  .timer { text-align: center; }
  /* painéis e títulos */
  .painel { padding: 10px; border-radius: 9px; margin-bottom: 10px; }
  h2 { font-size: 19px; } h3 { font-size: 15px; }
  .abas { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .abas::-webkit-scrollbar { display: none; }
  .abas button { flex: none; }
  .acoes { flex-wrap: wrap; }
  .inimigos { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  /* barra fixa embaixo */
  .navcel { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; background: linear-gradient(#2a1d13, #1a120b); border-top: 2px solid var(--borda); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 12px #0008; }
  .navcel button { all: unset; flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 3px; border-radius: 8px; font-size: 10.5px; font-weight: 600; color: var(--texto2); cursor: pointer; }
  .navcel button .ic { font-size: 20px; line-height: 1.1; }
  .navcel button.on { color: var(--ouro); background: #f0c35a14; }
  .navcel .badge { position: absolute; top: 1px; right: calc(50% - 22px); }
  /* menu em grade (folha que sobe) */
  .folha { display: block; position: fixed; inset: 0; z-index: 35; background: #000a; }
  .folha[hidden] { display: none; }
  .folha-caixa { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; background: var(--painel); border-top: 2px solid var(--ouro); border-radius: 16px 16px 0 0; padding: 10px 12px calc(76px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px #000c; }
  .folha-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-family: Cinzel, serif; color: var(--ouro); font-size: 18px; }
  .folha h4 { margin: 10px 2px 6px; font-size: 12px; color: var(--texto2); text-transform: uppercase; letter-spacing: .06em; }
  .folha-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .folha-grade button { all: unset; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 4px; text-align: center; border-radius: 10px; background: #0004; border: 1px solid var(--borda); cursor: pointer; }
  .folha-grade button .ic { font-size: 24px; }
  .folha-grade button .nm { font-size: 12px; font-weight: 600; line-height: 1.15; }
  .folha-grade button.on { border-color: var(--ouro); background: #f0c35a14; color: var(--ouro); }
  .folha-grade .badge { position: absolute; top: 4px; right: 6px; }
  .fechar-x { all: unset; cursor: pointer; font-size: 20px; padding: 2px 8px; color: var(--texto2); }
  .voltar { margin-bottom: 6px; }
}
.tb-barra em { font-style: normal; }
.so-cel { display: none; }
@media (max-width: 760px) { .so-pc { display: none; } .so-cel { display: inline; } }
@media (max-width: 760px) {
  .tab { font-size: 13px; }
  .tab .btn.peq { padding: 5px 8px; }
  .quem { gap: 6px; }
}
