* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: #f4efe4;
  font-family: Georgia, "Times New Roman", serif;
  background: #07080c;
}
button, input { font: inherit; color: inherit; }
a { color: #f4efe4; }
img { max-width: 100%; display: block; }
.erro { color: #ffb4a8; min-height: 1.2em; text-shadow: 0 1px 2px #000; }
.ok { color: #d7ecc8; min-height: 1.2em; text-shadow: 0 1px 2px #000; }

/* === pweb tokens — Zephira World (pweb.world SPA) === */
:root {
  --pweb-gold: #d4b865;
  --pweb-gold-soft: #e2c56f;
  --pweb-gold-deep: #b99c5a;
  --pweb-bg: #07080c;
  --pweb-panel: rgba(12, 14, 13, 0.94);
  --pweb-panel-soft: rgba(16, 19, 18, 0.92);
  --pweb-border: rgba(210, 170, 90, 0.42);
  --pweb-border-strong: rgba(224, 194, 116, 0.68);
  --pweb-text: #f4efe4;
  --pweb-muted: #c7c2b5;
  --pweb-halo-gold: 212, 184, 101;
  --pweb-halo-green: 123, 164, 75;
  --pweb-halo-blue: 112, 190, 230;
}

/* cursor pweb — arte original do cliente com fallback auto */
html { cursor: url("/assets/game/gui/Cursor/DefaultCursor.tga"), auto; }
body, button, input, a, .btn, .field, .cs-slot, .cs-tribe, .cs-facebtn {
  cursor: url("/assets/game/gui/Cursor/DefaultCursor.tga"), auto;
}
button:active, a:active, .btn:active { cursor: url("/assets/game/gui/Cursor/DefaultCursor.tga"), pointer; }

/* canvas WebGL full-screen — pweb.world #gl (fundo não deve cobrir inputs) */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: #07080c;
  pointer-events: none;
  transform: none;
}

/* UI fixa 800x600 centralizada — pweb.world #ui (scale via JS --ui-scale) */
#ui {
  width: 800px;
  height: 600px;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--ui-scale, 1));
  transform-origin: 0 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  /* halo/gradiente base do palco pweb */
  background:
    radial-gradient(ellipse 68% 52% at 50% 46%, rgba(var(--pweb-halo-gold), 0.09), transparent 62%),
    radial-gradient(ellipse 92% 78% at 72% 22%, rgba(91, 125, 65, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.96), rgba(7, 8, 12, 0.98));
  border: 1px solid rgba(210, 170, 90, 0.22);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
#ui.interactive, #ui:has(.layer) { pointer-events: auto; }

/* layer — camada absoluta dentro de #ui (pweb .layer) */
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.layer.interactive, .layer[data-interactive="true"] { pointer-events: auto; }
.layer--hud { z-index: 2; }
.layer--modal { z-index: 3; display: grid; place-items: center; padding: 16px; }

/* .field — campo pweb (compatível com .campo legado) */
.field {
  position: absolute;
  border: 1px solid rgba(210, 170, 90, 0.38);
  border-radius: 3px;
  background: rgba(9, 11, 12, 0.82);
  color: #f7f2e8;
  padding: 6px 8px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.field::placeholder { color: rgba(247, 242, 232, 0.52); }
.field:hover { border-color: rgba(210, 170, 90, 0.58); }
.field:focus { border-color: var(--pweb-gold); box-shadow: 0 0 0 2px rgba(var(--pweb-halo-gold), 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.45); }
.field:focus-visible { outline: 2px solid #f2d88a; outline-offset: 2px; }

/* .btn — botão pweb com gradiente + halo */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(210, 170, 90, 0.58);
  border-radius: 3px;
  color: #e8dfca;
  background: linear-gradient(180deg, #303128 0%, #1e211b 55%, #151713 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-shadow: 0 1px 1px #000;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.btn:hover { border-color: var(--pweb-gold-soft); background: linear-gradient(180deg, #3d4032 0%, #25281e 55%, #191c16 100%); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), 0 0 16px rgba(var(--pweb-halo-gold), 0.12); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn:disabled { cursor: wait; filter: grayscale(0.8); opacity: 0.55; }
.btn--primary { color: #fff5cf; border-color: var(--pweb-gold); background: linear-gradient(180deg, #3a3d2b, #1d2118); box-shadow: 0 0 18px rgba(160, 196, 96, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.btn--ghost { background: rgba(8, 10, 11, 0.56); border-color: rgba(210, 170, 90, 0.32); }
.btn:focus-visible { outline: 2px solid #f2d88a; outline-offset: 3px; }

/* .msgbox — caixa de mensagem pweb (compatível com .selecao-mensagem) */
.msgbox {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  padding: 10px 14px;
  border: 1px solid rgba(186, 164, 100, 0.52);
  border-radius: 4px;
  background: rgba(12, 15, 14, 0.92);
  color: #e5dbc0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 2px #000;
  pointer-events: auto;
}
.msgbox--error { border-color: rgba(218, 101, 87, 0.7); color: #ffc0b7; }
.msgbox--success { border-color: rgba(134, 188, 102, 0.7); color: #d7ecc8; }
.msgbox[hidden] { display: none !important; }

/* .plate — painel com gradiente + borda dourada (pweb .plate) */
.plate {
  border: 1px solid var(--pweb-border);
  border-radius: 4px;
  background: linear-gradient(145deg, var(--pweb-panel-soft), rgba(6, 8, 10, 0.86));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42), inset 0 0 28px rgba(199, 160, 79, 0.035);
  backdrop-filter: blur(2px);
}

/* .card — cartão genérico pweb com halo hover */
.card {
  border: 1px solid rgba(185, 156, 90, 0.22);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(41, 47, 39, 0.72), rgba(13, 15, 16, 0.76));
  color: #eee6d4;
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { border-color: var(--pweb-border-strong); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 14px rgba(var(--pweb-halo-gold), 0.08); }

/* .cs-slot — slot de personagem (pweb char-select) */
.cs-slot {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 1px solid rgba(185, 156, 90, 0.22);
  border-radius: 3px;
  text-align: left;
  background: linear-gradient(90deg, rgba(41, 47, 39, 0.72), rgba(13, 15, 16, 0.76));
  color: #eee6d4;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.cs-slot:hover { border-color: rgba(224, 194, 116, 0.68); transform: translateX(3px); }
.cs-slot.is-selected, .cs-slot[aria-selected="true"], .cs-slot[aria-pressed="true"] {
  border-color: var(--pweb-gold);
  background: linear-gradient(90deg, rgba(73, 85, 52, 0.92), rgba(20, 24, 20, 0.88));
  box-shadow: inset 3px 0 var(--pweb-gold), 0 0 18px rgba(var(--pweb-halo-green), 0.12);
}
.cs-slot img, .cs-slot .cs-slot__avatar {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(215, 188, 116, 0.4);
  border-radius: 2px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.48);
}
.cs-slot__text { min-width: 0; display: grid; gap: 3px; }
.cs-slot__text strong { overflow: hidden; text-overflow: ellipsis; font-size: 15px; font-weight: 500; }
.cs-slot__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b9b7ab; font-size: 12px; }
.cs-slot--empty { opacity: 0.78; border-style: dashed; }
.cs-slot:focus-visible { outline: 2px solid #f2d88a; outline-offset: 2px; }

/* .cs-tribe — opção de tribo */
.cs-tribe {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 170, 90, 0.38);
  border-radius: 3px;
  color: #f1ead9;
  text-align: left;
  background: #101310;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.cs-tribe:hover, .cs-tribe:focus-visible { border-color: #ddc16d; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32), 0 0 12px rgba(var(--pweb-halo-gold), 0.09); }
.cs-tribe img { width: 100%; height: 92px; object-fit: cover; background: #050706; }
.cs-tribe__label { display: grid; gap: 2px; padding: 8px 9px; }
.cs-tribe__label strong { font-size: 14px; font-weight: 500; }
.cs-tribe__label small { color: #aaa99f; font-size: 11px; }
.cs-tribe.is-selected { border-color: var(--pweb-gold); box-shadow: inset 0 0 0 1px var(--pweb-gold), 0 0 14px rgba(var(--pweb-halo-gold), 0.12); }

/* .cs-facebtn — botão de rosto (face select) */
.cs-facebtn {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 170, 90, 0.38);
  border-radius: 3px;
  color: #f1ead9;
  text-align: left;
  background: #101310;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.cs-facebtn:hover, .cs-facebtn:focus-visible { border-color: #ddc16d; transform: translateY(-2px); }
.cs-facebtn img { width: 100%; height: 125px; object-fit: contain; background: #050706; image-rendering: auto; }
.cs-facebtn__label { display: grid; gap: 2px; padding: 8px 9px; }
.cs-facebtn.is-selected { border-color: var(--pweb-gold); box-shadow: inset 0 0 0 1px var(--pweb-gold); }

/* halos / gradientes utilitários — pweb world aura */
.halo {
  position: relative;
}
.halo::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(var(--pweb-halo-gold), 0.16), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}
.halo--green::before { background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(var(--pweb-halo-green), 0.14), transparent 68%); }
.halo--blue::before { background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(var(--pweb-halo-blue), 0.12), transparent 68%); }
.gradient-gold {
  background: linear-gradient(145deg, rgba(16, 19, 18, 0.92), rgba(6, 8, 10, 0.86));
  border: 1px solid rgba(210, 170, 90, 0.42);
}
.gradient-stage {
  background:
    radial-gradient(circle at 72% 22%, rgba(91, 125, 65, 0.22), transparent 34%),
    linear-gradient(rgba(4, 7, 7, 0.56), rgba(4, 5, 8, 0.93)),
    #07080c;
}

/* fallback 2D canvas preview — mantém compatibilidade */
canvas#preview { background: transparent; }

.login-body { min-height: 100%; }
.fundo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.login-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 12px 40px;
}
.janela {
  position: relative;
  width: min(92vw, 760px);
  aspect-ratio: 518 / 209;
  margin: 0;
}
.janela-arte {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.campo {
  position: absolute;
  top: 78%;
  height: 13%;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 6px;
  outline: none;
}
.campo.conta { left: 10%; width: 25%; }
.campo.senha { left: 38%; width: 24%; }
.hit-login {
  position: absolute;
  left: 64.5%;
  top: 66%;
  width: 22%;
  height: 26%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.legenda {
  margin: 0;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  text-shadow: 0 2px 6px #000;
}
.linha-botoes {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.botao-arte {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.botao-arte img { height: 42px; width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; text-shadow: 0 1px 2px #000; }

.selecao {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 22%, rgba(91, 125, 65, 0.22), transparent 34%),
    linear-gradient(rgba(4, 7, 7, 0.56), rgba(4, 5, 8, 0.93)),
    #07080c url("/g/login/bg1.png") center / cover no-repeat fixed;
}
.selecao [hidden] { display: none !important; }
.selecao button:focus-visible, .selecao input:focus-visible {
  outline: 2px solid #f2d88a;
  outline-offset: 3px;
}
.selecao button:disabled { cursor: wait; filter: grayscale(0.8); opacity: 0.55; }
.selecao-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
  cursor: grab;
  background: transparent;
}
.selecao-canvas.arrastando { cursor: grabbing; }
.selecao-canvas-2d {
  z-index: 1;
  pointer-events: none;
  cursor: default;
}
.selecao-com-3d .selecao-canvas-2d { display: none !important; }
.selecao:not(.selecao-com-3d) #palco { visibility: hidden; }
.selecao-hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.selecao-barra,
.selecao-mensagem,
.lista-personagens,
.acoes-personagem,
.criacao {
  pointer-events: auto;
}
.selecao-barra {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px clamp(14px, 3vw, 36px) 0;
  text-shadow: 0 2px 10px #000;
}
.selecao-barra h1 {
  margin: 2px 0 0;
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 500;
  letter-spacing: 0.025em;
}
.selecao-sobretitulo {
  margin: 0;
  color: #d7bd72;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.selecao-conta { margin: 5px 0 0; color: #c8d1c3; font-size: 14px; }
.selecao-dica {
  margin: 8px 0 0;
  color: rgba(232, 223, 196, 0.72);
  font-size: 12px;
}
.selecao-com-3d .selecao-dica { display: block; }
.selecao:not(.selecao-com-3d) .selecao-dica { display: none; }
.selecao-mensagem {
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 340px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(186, 164, 100, 0.52);
  border-radius: 4px;
  background: rgba(12, 15, 14, 0.9);
  color: #e5dbc0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}
.selecao-mensagem.erro { border-color: rgba(218, 101, 87, 0.7); color: #ffc0b7; }
.selecao-mensagem.sucesso { border-color: rgba(134, 188, 102, 0.7); color: #d7ecc8; }
.lista-personagens {
  position: absolute;
  top: 108px;
  left: clamp(12px, 2vw, 28px);
  width: min(320px, calc(100% - 24px));
  max-height: calc(100% - 200px);
  overflow: auto;
  padding: 13px;
  border: 1px solid rgba(210, 170, 90, 0.42);
  background: linear-gradient(145deg, rgba(16, 19, 18, 0.92), rgba(6, 8, 10, 0.86));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42), inset 0 0 28px rgba(199, 160, 79, 0.035);
}
.lista-cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid rgba(210, 170, 90, 0.25);
}
.lista-cabecalho h2 { margin: 0; font-size: 18px; font-weight: 500; }
.lista-cabecalho span { color: #cdb46e; font-size: 13px; }
.slots { display: grid; gap: 8px; padding-top: 10px; }
.slot-personagem {
  width: 100%;
  min-height: 75px;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 1px solid rgba(185, 156, 90, 0.22);
  border-radius: 3px;
  color: #eee6d4;
  text-align: left;
  background: linear-gradient(90deg, rgba(41, 47, 39, 0.72), rgba(13, 15, 16, 0.76));
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.slot-personagem:hover { border-color: rgba(224, 194, 116, 0.68); transform: translateX(3px); }
.slot-personagem.selecionado {
  border-color: #d4b865;
  background: linear-gradient(90deg, rgba(73, 85, 52, 0.92), rgba(20, 24, 20, 0.88));
  box-shadow: inset 3px 0 #d4b865, 0 0 18px rgba(123, 164, 75, 0.12);
}
.slot-personagem img, .slot-avatar, .slot-numero {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(215, 188, 116, 0.4);
  border-radius: 2px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.48);
}
.slot-personagem img.asset-ausente { opacity: 0.15; }
.slot-texto { min-width: 0; display: grid; gap: 3px; }
.slot-texto strong { overflow: hidden; font-size: 16px; font-weight: 500; text-overflow: ellipsis; }
.slot-texto small { overflow: hidden; color: #b9b7ab; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.slot-vazio { opacity: 0.74; border-style: dashed; }
.slot-numero { display: grid; place-items: center; color: #9f936f; font-size: 22px; }
.slot-carregando { cursor: progress; pointer-events: none; }
.slot-avatar, .slot-linhas {
  display: block;
  background: linear-gradient(100deg, rgba(255,255,255,0.04) 20%, rgba(255,255,255,0.12) 42%, rgba(255,255,255,0.04) 64%);
  background-size: 220% 100%;
  animation: selecao-carregando 1.25s linear infinite;
}
.slot-linhas { width: 72%; height: 28px; border-radius: 2px; }
.estado-lista, .estado-vazio { padding: 18px 10px; color: #c7c4b8; text-align: center; }
.estado-lista p, .estado-vazio p { margin: 0 0 14px; }
.estado-vazio h2 { margin: 0 0 8px; color: #f0e9d8; font-size: 21px; font-weight: 500; }
.preview-3d-status {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border: 1px solid rgba(223, 197, 116, 0.35);
  border-radius: 2px;
  color: rgba(240, 233, 213, 0.78);
  background: rgba(5, 7, 8, 0.62);
  font: 10px/1.2 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.preview-3d-status.carregando { color: #dfc574; }
.preview-3d-status.ativo { border-color: rgba(143, 196, 104, 0.48); color: #d5ebc7; }
.preview-3d-status.fallback { opacity: 0.72; }
.preview-3d-status.parcial { color: #ead49b; }
.preview-legenda {
  position: absolute;
  z-index: 2;
  left: clamp(340px, 28vw, 380px);
  right: clamp(16px, 4vw, 40px);
  bottom: 92px;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  pointer-events: none;
}
.preview-legenda h2 { margin: 3px 0 5px; font-size: clamp(28px, 5vw, 52px); font-weight: 500; }
.preview-legenda p { margin: 0; }
#preview-etiqueta { color: #dfc574; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
#preview-detalhe { color: #ddd8cb; font-size: 14px; }
.acoes-personagem {
  position: absolute;
  right: clamp(14px, 3vw, 36px);
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.acoes-personagem .estado-vazio {
  width: auto;
  padding: 10px 14px;
  border: 1px solid rgba(210, 170, 90, 0.35);
  background: rgba(8, 10, 11, 0.72);
}
.botao-texto {
  border: 1px solid rgba(210, 170, 90, 0.58);
  border-radius: 3px;
  padding: 9px 14px;
  color: #e8dfca;
  background: linear-gradient(#303128, #151713);
  cursor: pointer;
}
.botao-texto:hover { border-color: #e2c56f; background: linear-gradient(#3d4032, #191c16); }
.botao-texto.destaque { color: #fff5cf; box-shadow: 0 0 18px rgba(160, 196, 96, 0.12); }
.criacao {
  position: absolute;
  right: clamp(14px, 3vw, 36px);
  bottom: 88px;
  width: min(560px, calc(100% - 360px));
  max-height: calc(100% - 210px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(210, 170, 90, 0.42);
  background: linear-gradient(160deg, rgba(12, 14, 13, 0.94), rgba(6, 8, 9, 0.9));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.criacao-cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.criacao-cabecalho h2 { margin: 3px 0 0; font-size: 24px; font-weight: 500; }
.criacao h3 { margin: 0 0 12px; font-size: 17px; font-weight: 500; }
.opcoes-criacao { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.opcao-criacao {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 170, 90, 0.38);
  border-radius: 3px;
  color: #f1ead9;
  text-align: left;
  background: #101310;
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease;
}
.opcao-criacao:hover, .opcao-criacao:focus-visible { border-color: #ddc16d; transform: translateY(-2px); }
.opcao-criacao img { width: 100%; height: 104px; object-fit: cover; background: #050706; }
.opcao-criacao img.asset-ausente { opacity: 0.12; }
.opcao-criacao > span { display: grid; gap: 2px; padding: 8px 9px; }
.opcao-criacao strong { font-size: 14px; font-weight: 500; }
.opcao-criacao small { color: #aaa99f; font-size: 11px; }
.opcoes-criacao.rostos { grid-template-columns: repeat(auto-fit, minmax(110px, 150px)); }
.opcoes-criacao.rostos img { height: 125px; object-fit: contain; image-rendering: auto; }
.opcao-criacao.escolhida { border-color: #d4b865; box-shadow: inset 0 0 0 1px #d4b865; }
.controles-passo { display: flex; justify-content: flex-start; gap: 10px; margin-top: 14px; }
.resumo-criacao { margin: -3px 0 14px; color: #c7c2b5; font-size: 13px; }
.estado-inline { grid-column: 1 / -1; color: #ffc0b7; }
.nome-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nome-linha input {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 360px;
  border: 1px solid rgba(210, 170, 90, 0.72);
  border-radius: 3px;
  padding: 10px 11px;
  color: #f7f2e8;
  background: #090b0c;
}
@keyframes selecao-carregando { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
  .slot-avatar, .slot-linhas { animation: none; }
  .slot-personagem, .opcao-criacao, .cs-slot, .cs-tribe, .cs-facebtn, .card, .btn, .field { transition: none; }
  #ui { transition: none; }
}
.mundo {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #07080c;
}
.mundo [hidden] { display: none !important; }
#tela {
  position: fixed;
  touch-action: none;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  cursor: url("/assets/game/gui/Cursor/DefaultCursor.tga"), auto;
  background: #07080c;
}
#tela[data-mira="ataque"] { cursor: url("/assets/game/gui/Cursor/Attack_Cursor.tga"), pointer; }
#tela[data-mira="fala"] { cursor: url("/assets/game/gui/Cursor/Talk_Cursor.tga"), pointer; }
#tela[data-mira="item"] { cursor: url("/assets/game/gui/Cursor/GetItem_Cursor1.tga"), pointer; }
#tela[data-mira="item"][data-pressionado="1"] { cursor: url("/assets/game/gui/Cursor/GetItem_Cursor2.tga"), pointer; }
#placas {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.placa {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  pointer-events: none;
}
.placa .balao-msg { color: rgb(180, 180, 255); }
.placa-ativa .balao-msg { color: #ffe7a0; }
.balao-nome-txt { padding: 0 2px; }
.balao-titulo { margin: 0 0 1px; font: 16px/1.1 "Noto Sans", "Segoe UI", sans-serif; text-align: center; white-space: nowrap; text-shadow: 0 1px 2px #000; }
#fala {
  position: fixed;
  z-index: 4;
  left: 16px;
  top: 18%;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(210, 170, 90, 0.7);
  border-radius: 4px;
  color: #f3e6c4;
  background: rgba(8, 10, 12, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
#fala-papel { margin: 0 0 4px; color: #d2aa5a; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
#fala h2 { margin: 0 0 8px; font-size: 20px; color: #ffe7a0; }
#fala-texto { margin: 0 0 12px; }
#fala button {
  border: 1px solid #d2aa5a;
  background: #1a140c;
  color: #ffe7a0;
  padding: 6px 12px;
  cursor: pointer;
}
#ajuda {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
  text-shadow: 0 1px 2px #000;
}
.mundo-arte {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mundo-aviso {
  position: fixed;
  z-index: 3;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(520px, 90vw);
  padding: 18px 20px;
  border: 1px solid rgba(210, 170, 90, 0.58);
  border-radius: 4px;
  color: #ffc0b7;
  background: rgba(8, 10, 12, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  text-shadow: 0 1px 2px #000;
}
.mundo-aviso.info {
  color: #e5dbc0;
  border-color: rgba(186, 164, 100, 0.52);
}
.mundo-aviso.aviso-clicavel {
  cursor: pointer;
}
.convite-troca {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  width: min(360px, 90vw);
  padding: 16px 18px;
  border: 1px solid rgba(210, 170, 90, 0.58);
  border-radius: 4px;
  color: #e5dbc0;
  background: rgba(8, 10, 12, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  text-shadow: 0 1px 2px #000;
}
.convite-troca[hidden] {
  display: none;
}
.convite-troca-botoes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.convite-troca-prazo {
  margin: 6px 0;
  color: #e9d59e;
  font: 13px Georgia, serif;
}
.convite-troca-prazo time {
  margin-left: 5px;
  color: #f5e7bf;
  font: bold 15px Consolas, monospace;
}
.convite-troca.urgente .convite-troca-prazo time { color: #ff8d72; }
.mundo-hud {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  pointer-events: none;
}
.mundo-hud h1 { margin: 0 0 4px; }
.mundo-hud p { margin: 0; }
.mundo-hud a, .mundo-hud button { pointer-events: auto; }
.ficha {
  display: flex;
  gap: 12px;
  align-items: center;
}
.ficha img { width: 84px; height: 84px; object-fit: cover; border: 1px solid #d2aa5a; background: #050706; }

@media (max-width: 800px) {
  .mundo-hud { flex-wrap: wrap; }
  .mundo-hud #ajuda { max-width: none; }
  .lista-personagens {
    top: auto;
    bottom: 86px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 168px;
  }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-personagem { grid-template-columns: 46px minmax(0, 1fr); min-height: 62px; }
  .slot-personagem img, .slot-avatar, .slot-numero { width: 46px; height: 46px; }
  .cs-slot { grid-template-columns: 46px minmax(0, 1fr); min-height: 62px; }
  .cs-slot img, .cs-slot .cs-slot__avatar { width: 46px; height: 46px; }
  .preview-legenda {
    left: 14px;
    right: 14px;
    bottom: 268px;
  }
  .selecao-mensagem {
    top: 86px;
    width: min(560px, calc(100% - 24px));
  }
  .msgbox { top: 86px; width: min(520px, calc(100% - 24px)); }
  .criacao {
    left: 10px;
    right: 10px;
    bottom: 86px;
    width: auto;
    max-height: calc(100% - 180px);
  }
  .campo { font-size: 12px; }
  .janela { width: min(96vw, 760px); }
  /* pweb #ui — escala responsiva 800px breakpoint (800x600 -> viewport) */
  #ui {
    width: 800px;
    height: 600px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(calc((100vw - 16px) / 800));
    transform-origin: 0 0;
  }
  .layer { padding: 8px; }
  .plate, .card { border-radius: 3px; }
}
@media (max-width: 520px) {
  .selecao-barra { align-items: flex-start; }
  .selecao-barra .botao-arte img { height: 34px; }
  .slots { grid-template-columns: 1fr; }
  .preview-legenda { right: 14px; }
  .preview-legenda h2 { font-size: 28px; }
  .acoes-personagem {
    left: 10px;
    right: 10px;
    justify-content: center;
  }
  .criacao { padding: 14px 8px; }
  /* pweb #ui — escala ajustada para telas estreitas (cobre 520px) */
  #ui {
    transform: translate(-50%, -50%) scale(calc((100vw - 12px) / 800));
  }
  .field { font-size: 13px; }
  .btn { min-height: 34px; padding: 7px 12px; font-size: 13px; }
  .cs-tribe img { height: 82px; }
  .cs-facebtn img { height: 108px; }
}

/* Login — cartão, véu e cena #gl */
body.login { overflow: hidden; background: #07080c; }
body.login #ui {
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  pointer-events: none;
}
body.login #gl { pointer-events: auto; }
.lx-veil {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 50ms linear;
}
.lx-veil.on { opacity: 1; }
.lg-card {
  pointer-events: auto;
  width: 320px;
  padding: 18px 16px 14px;
  border: 1px solid rgba(210, 170, 90, 0.42);
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(16, 19, 18, 0.96), rgba(6, 8, 10, 0.94));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}
.lg-card.on {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease, ease), transform 1s var(--ease, ease);
}
.lg-card.gone {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 0.6s var(--ease, ease), transform 0.6s var(--ease, ease);
}
.lg-card h1 { margin: 0 0 12px; font-size: 22px; letter-spacing: 0.04em; color: #f4efe4; }
.lg-card form { display: grid; gap: 10px; text-align: left; }
.lg-card .field {
  position: static;
  display: block;
  width: 100%;
  height: auto;
}
.lg-links { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: center; margin: 10px 0 0; }
.lg-links button {
  background: none;
  border: 0;
  color: #e8dfca;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  padding: 0;
}
.lg-foot { margin: 10px 0 0; font-size: 11px; letter-spacing: 0.08em; color: rgba(232, 223, 196, 0.7); }
.lg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #e8dfca; }
.lg-canto {
  position: fixed;
  z-index: 5;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(210, 170, 90, 0.45);
  background: rgba(8, 10, 12, 0.7);
  color: #e8dfca;
}
.lg-canto.gear { right: 12px; }
.lg-canto.tela { left: 12px; }
@keyframes lx-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.lg-card.lx-shake { animation: lx-shake 0.28s linear; }

/* HUD do mundo — o que a referência mostrou e ainda faltava */
.hud-gauge {
  position: fixed;
  z-index: 3;
  left: 14px;
  bottom: 210px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.hud-gauge .barra {
  width: 16px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  position: relative;
}
.hud-gauge .barra i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #6dbf4a;
}
.hud-gauge .barra.stm i { background: #d24b4b; }
.hud-gauge .barra.mana i { background: #3d7edb; }
.hud-gauge .barra span {
  position: absolute;
  left: 50%;
  top: -16px;
  transform: translateX(-50%);
  font-size: 10px;
  color: #f4efe4;
  text-shadow: 0 1px 2px #000;
}
.hud-exp {
  position: fixed;
  z-index: 3;
  left: 14px;
  bottom: 186px;
  margin: 0;
  color: #f4efe4;
  font-size: 13px;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.hud-minimap {
  position: fixed;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 168px;
  padding: 6px;
  background: rgba(8, 10, 12, 0.82);
  border: 1px solid rgba(210, 170, 90, 0.45);
  color: #f4efe4;
  pointer-events: auto;
}
.hud-minimap canvas { width: 100%; height: 120px; background: #10160f; display: block; }
.hud-minimap p { margin: 4px 0 0; font-size: 12px; }
.hud-chat {
  position: fixed;
  z-index: 3;
  left: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 220px));
  pointer-events: auto;
  color: #f4efe4;
}
.hud-chat .abas { display: flex; gap: 4px; flex-wrap: wrap; }
.hud-chat .abas button, .hud-menu button, .hud-extra button {
  border: 1px solid rgba(210, 170, 90, 0.4);
  background: rgba(8, 10, 12, 0.8);
  color: #e8dfca;
  font-size: 12px;
  padding: 3px 7px;
}
.hud-chat .abas button.ativa { border-color: #e2c56f; color: #ffe7a0; }
.hud-chat .log {
  height: 92px;
  overflow: auto;
  margin: 4px 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 13px;
  white-space: pre-wrap;
}
.hud-chat form { display: flex; gap: 6px; }
.hud-chat input { flex: 1; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(210, 170, 90, 0.35); color: #f4efe4; padding: 4px 6px; }
.hud-belt {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: flex-end;
  pointer-events: auto;
}
.hud-belt .orbe, .hud-belt .poco, .hud-belt .slot {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(210, 170, 90, 0.55);
  background: rgba(8, 10, 12, 0.78);
  color: #e8dfca;
  font-size: 12px;
}
.hud-belt .orbe { border-radius: 50%; }
.hud-belt .slot.ativo { outline: 2px solid #e2c56f; }
.hud-menu {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
}
.hud-menu[hidden] { display: none; }
.hud-menu div { display: grid; gap: 8px; padding: 16px; background: rgba(10, 12, 11, 0.96); border: 1px solid rgba(210, 170, 90, 0.55); }
.hud-missao, .hud-extra, .hud-canto {
  position: fixed;
  z-index: 3;
  color: #f4efe4;
  pointer-events: auto;
}
.hud-missao { top: 196px; right: 12px; width: 168px; padding: 8px; background: rgba(8, 10, 12, 0.72); border: 1px solid rgba(210, 170, 90, 0.35); }
.hud-missao h2 { margin: 0 0 4px; font-size: 14px; }
.hud-missao p, .hud-canto { margin: 0; font-size: 12px; }
.hud-extra { top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.hud-canto { top: 12px; left: 14px; text-shadow: 0 1px 2px #000; pointer-events: none; }
body.mundo .mundo-hud {
  background: none;
  align-items: flex-start;
  top: 36px;
  bottom: auto;
  right: auto;
  width: min(420px, 46vw);
  padding: 0 0 0 14px;
  flex-direction: column;
}
body.mundo .mundo-hud #ajuda {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%);
  max-width: 520px;
  text-align: center;
  font-size: 12px;
  text-shadow: 0 1px 2px #000;
}
body.mundo .mundo-hud .botao-arte {
  position: fixed;
  top: 12px;
  right: 196px;
}
