/* ============================================================
   ALDEIA ONLINE - layout ornamentado (referência: RubinOT)
   Estrutura: topo de madeira + logo dourada + menu horizontal,
   3 colunas (nav/conta | pergaminho | widgets), background de vila.
   Assets próprios: layout/images (background aldeia-bg.jpg, borda de
   conteúdo, fonte Martel). Molduras recriadas em CSS.
   ============================================================ */

@font-face {
  font-family: martelregular;
  src: url(../fonts/martel/regular.eot);
  src: url(../fonts/martel/regular.eot?#iefix) format('embedded-opentype'),
       url(../fonts/martel/regular.woff) format('woff'),
       url(../fonts/martel/regular.ttf) format('truetype'),
       url(../fonts/martel/regular.svg#martelregular) format('svg');
  font-weight: 400;
  font-style: normal;
}

* { box-sizing: border-box; }

/* ============================================================
   MOLDURA ORNAMENTADA (arabesco dourado nos cantos + fio duplo)
   Usada como border-image nos painéis (caixas + barra central).
   ============================================================ */
:root {
  --ornate-frame: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 90'><g fill='none' stroke='%23d8b25a' stroke-linecap='round' stroke-linejoin='round'><path d='M26 8 H64' stroke-width='1.5'/><path d='M26 12 H64' stroke-width='.7'/><path d='M26 82 H64' stroke-width='1.5'/><path d='M26 78 H64' stroke-width='.7'/><path d='M8 26 V64' stroke-width='1.5'/><path d='M12 26 V64' stroke-width='.7'/><path d='M82 26 V64' stroke-width='1.5'/><path d='M78 26 V64' stroke-width='.7'/><g><path d='M8 26 V16 Q8 8 16 8 H26' stroke-width='1.5'/><path d='M12 26 V18 Q12 12 18 12 H26' stroke-width='.7'/><path d='M19 8 q9 0 9 9 q0 5 -5 5 q-4 0 -4 -4 q0 -3 3 -3' stroke-width='1'/><path d='M8 19 q0 -9 9 -9' stroke-width='.7'/></g><g transform='rotate(90 45 45)'><path d='M8 26 V16 Q8 8 16 8 H26' stroke-width='1.5'/><path d='M12 26 V18 Q12 12 18 12 H26' stroke-width='.7'/><path d='M19 8 q9 0 9 9 q0 5 -5 5 q-4 0 -4 -4 q0 -3 3 -3' stroke-width='1'/><path d='M8 19 q0 -9 9 -9' stroke-width='.7'/></g><g transform='rotate(180 45 45)'><path d='M8 26 V16 Q8 8 16 8 H26' stroke-width='1.5'/><path d='M12 26 V18 Q12 12 18 12 H26' stroke-width='.7'/><path d='M19 8 q9 0 9 9 q0 5 -5 5 q-4 0 -4 -4 q0 -3 3 -3' stroke-width='1'/><path d='M8 19 q0 -9 9 -9' stroke-width='.7'/></g><g transform='rotate(270 45 45)'><path d='M8 26 V16 Q8 8 16 8 H26' stroke-width='1.5'/><path d='M12 26 V18 Q12 12 18 12 H26' stroke-width='.7'/><path d='M19 8 q9 0 9 9 q0 5 -5 5 q-4 0 -4 -4 q0 -3 3 -3' stroke-width='1'/><path d='M8 19 q0 -9 9 -9' stroke-width='.7'/></g></g><g fill='%23f0d27a'><circle cx='8' cy='8' r='1.6'/><circle cx='82' cy='8' r='1.6'/><circle cx='8' cy='82' r='1.6'/><circle cx='82' cy='82' r='1.6'/></g></svg>");
}

body {
  font-family: Verdana, Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: #0f0a06;
  font-size: 12px;
  color: #5a2800;
  padding: 0;
  margin: 0;
  /* background da Aldeia: vila medieval com castelo, fixa e cobrindo a tela.
     Leve escurecimento nas bordas para os painéis destacarem. */
  background-image:
    radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%),
    url(../images/aldeia-bg.jpg);
  background-repeat: no-repeat, no-repeat;
  background-position: center top, center top;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
}

a {
  text-decoration: none;
  font-weight: 700;
  color: #1a5fb4;
}
a:hover { text-decoration: underline; }

/* ============================================================
   WRAPPER
   ============================================================ */

#pandaac {
  margin: 14px auto 30px;
  width: 1200px;
  max-width: calc(100% - 20px);
}

/* ============================================================
   HEADER - barra de madeira/couro escura
   ============================================================ */

#header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 26px 2px;
  /* sem fundo: apenas a logo sobre o background da vila */
  background: none;
  border: none;
  box-shadow: none;
}

/* ---------- LOGO dourada ---------- */
#logo {
  display: inline-block;
  text-decoration: none;
  padding: 4px 0;
  line-height: 1;
}
#logo:hover { text-decoration: none; }

/* logo oficial (imagem transparente vinda do aldeiaonline.com) */
#logo img {
  display: block;
  height: 114px; /* +30% */
  width: auto;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.55));
}

.logo-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  font-size: 56px;
  line-height: .95;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #fff6c2 0%, #ffe27a 30%, #f0b62e 50%, #a9660a 72%, #ffe488 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 #5a3200)
    drop-shadow(0 2px 0 #3a1d00)
    drop-shadow(2px 3px 3px rgba(0,0,0,.9));
}

.logo-sub {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 1px;
  margin: 3px 0 0 3px;
  background: linear-gradient(180deg, #ffe98f 0%, #f0b62e 55%, #a86a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.9));
}

.logo-divider {
  display: block;
  height: 8px;
  margin: 4px 0 0 2px;
  width: 260px;
  max-width: 100%;
  background:
    radial-gradient(circle at 50% 50%, #ffd869 0 3px, transparent 4px),
    linear-gradient(90deg, transparent 0, #caa23e 12%, #ffe488 50%, #caa23e 88%, transparent 100%);
  background-repeat: no-repeat;
  background-position: center center, center center;
  background-size: 12px 8px, 100% 2px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.8));
}

/* ============================================================
   BARRA CENTRAL (#infobar) - social + online + idiomas
   ============================================================ */
#infobar {
  /* vive dentro da coluna central, alinhada com o topo das colunas laterais */
  margin: 0 0 14px;
  /* mesma moldura fina, 1 retângulo chapado */
  border: 12px solid transparent;
  border-image: var(--ornate-frame) 26 stretch;
  border-radius: 10px;
  background: #14304c;
  box-shadow: 0 3px 8px rgba(0,0,0,.5);
}
#infobar ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 3px 10px;
}
#infobar li { display: flex; align-items: center; min-width: 0; }
#infobar a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: martelregular, sans-serif;
  font-size: 14px;
  color: #f0dcae;
  text-shadow: 0 2px 2px #000;
  text-decoration: none;
  white-space: nowrap;
}
#infobar a svg { width: 15px; height: 15px; color: #f0dcae; flex: none; }
#infobar a:hover { color: #ffe488; text-decoration: none; }
#infobar a:hover svg { color: #ffe488; filter: drop-shadow(0 0 5px rgba(255,210,90,.6)); }

#infobar .infobar-sep {
  width: 1px;
  align-self: stretch;
  min-height: 20px;
  background: linear-gradient(180deg, transparent, rgba(240,190,70,.4), transparent);
}

/* indicador de players: pílula destacada pra não passar batido */
#infobar .infobar-online {
  gap: 5px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(230,190,90,.45);
  border-radius: 11px;
  padding: 1px 8px;
}
#infobar .infobar-online .status-dot { margin: 0; width: 7px; height: 7px; }
#infobar .infobar-online a { display: inline-block; white-space: nowrap; color: #eaf3ff; font-size: 12.5px; }
/* servidor fora do ar: bolinha e texto em tom de vermelho (combina com o
   vermelho ja usado no site - ex.: .mclose, headers dos modais) */
#infobar .infobar-offline { border-color: rgba(200,60,60,.5); }
#infobar .infobar-offline .status-dot {
  background: #e04b4b;
  box-shadow: 0 0 7px #e04b4b;
  animation: none;
}
#infobar .infobar-offline a { color: #ff9a9a; font-weight: 700; }
#infobar .infobar-online b {
  /* Verdana: a fonte martel não possui glifos de dígitos (ficam invisíveis) */
  font-family: Verdana, Tahoma, sans-serif;
  color: #58e87a;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 0 9px rgba(80,230,120,.7), 0 1px 2px #000;
}

#infobar .infobar-flags { gap: 4px; }
#infobar .flag {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 2px;
  line-height: 0;
  cursor: pointer;
  opacity: .6;
  filter: grayscale(.35);
  transition: opacity .15s, filter .15s;
}
#infobar .flag svg {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  display: block;
}
#infobar .flag:hover { opacity: 1; filter: none; }
#infobar .flag.active {
  opacity: 1;
  filter: none;
  border-color: rgba(240,190,70,.75);
  box-shadow: 0 0 7px rgba(240,190,70,.45);
}

/* ============================================================
   CONTAINER 3 COLUNAS
   ============================================================ */

#content-container {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
}

#sidebar   { width: 205px; flex: none; }
#rightbar  { width: 235px; flex: none; }
#main-container { flex: 1 1 auto; min-width: 0; }

/* ============================================================
   CAIXAS ORNAMENTADAS (molduras de madeira em CSS)
   ============================================================ */

.box {
  position: relative;
  margin-bottom: 12px;
  /* moldura fina de arabesco grudada na borda */
  border: 13px solid transparent;
  border-image: var(--ornate-frame) 26 stretch;
  border-radius: 10px;
  /* interior azul chapado - 1 retângulo só */
  background: #14304c;
  box-shadow: 0 3px 8px rgba(0,0,0,.5);
}

.box-inner {
  position: relative;
  padding: 4px 8px 8px;
  color: #dbe6f2;
}

.box-title {
  font-family: martelregular, sans-serif;
  color: #f2c94e;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 15px;
  text-shadow: 0 1px 2px #000, 0 0 10px rgba(240,190,70,.25);
  padding-bottom: 8px;
  margin: 2px 0 9px;
  border-bottom: 1px solid rgba(230,190,90,.35);
}

.box a { color: #6fb0ff; }
.box .box-more { text-align: center; margin: 9px 0 0; font-size: 11px; }

/* ---------- menu de navegação: categorias como banners individuais
             (referência RubinOT: barra azul com filete dourado + painel bege) ---------- */
#nav-box {
  border: none;
  border-image: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
#nav-box .box-inner { padding: 0; }

#sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar-menu .mcat { margin-bottom: 8px; }
#sidebar-menu .mcat:last-child { margin-bottom: 0; }

/* cabeçalho = banner azul com moldura dourada */
.mcat-head {
  display: block;
  width: 100%;
  position: relative;
  background: linear-gradient(180deg, #1e4269 0%, #14304c 55%, #0d2237 100%);
  border: 1px solid #0a1a2a;
  border-radius: 9px;
  box-shadow:
    inset 0 0 0 1px rgba(216,178,90,.75),
    inset 0 0 0 2px rgba(70,45,15,.45),
    0 2px 4px rgba(0,0,0,.5);
  font-family: martelregular, sans-serif;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f0dcae;
  text-shadow: 0 1px 2px #000;
  text-align: center;
  padding: 8px 26px;
  cursor: pointer;
}
/* seta (chevron) dourada à direita, gira ao abrir */
.mcat-head::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px; height: 6px;
  border-right: 2px solid #d8b25a;
  border-bottom: 2px solid #d8b25a;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .25s ease;
}
.mcat.open > .mcat-head { color: #ffe488; border-radius: 9px 9px 0 0; }
.mcat.open > .mcat-head::after { transform: translateY(-20%) rotate(-135deg); }
.mcat-head:hover { color: #ffe488; }

/* sub-menu recolhível: painel bege pendurado no banner */
.mcat-sub {
  list-style: none;
  margin: 0 3px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s ease, opacity .2s ease;
}
.mcat.open .mcat-sub {
  max-height: 300px;
  opacity: 1;
  background: #f1e0c6;
  border: 1px solid #a08050;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 5px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
}
.mcat-sub li { margin: 0; }
.mcat-sub a {
  display: block;
  position: relative;
  font-size: 11.5px;
  font-weight: 700;
  color: #5a2800;
  text-decoration: none;
  padding: 5px 8px 5px 28px;
}
.mcat-sub a::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 4px; height: 4px;
  margin-top: -2px;
  background: #7d5a38;
  transform: rotate(45deg);
}
.mcat-sub a:hover,
.mcat-sub a.active { color: #cf6a15; text-decoration: none; }
.mcat-sub a.active::before { background: #cf6a15; }

/* ---------- botão Download verde (destaque, como na referência) ---------- */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #4fae3d 0%, #2e8022 55%, #206317 100%);
  border: 1px solid #12400f;
  border-radius: 9px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    0 2px 4px rgba(0,0,0,.5);
  font-family: martelregular, sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
  text-decoration: none;
}
.btn-download:hover { text-decoration: none; filter: brightness(1.1); color: #fff; }
.btn-download svg { width: 16px; height: 16px; flex: none; }

/* ============================================================
   CAIXA MINHA CONTA - banner azul + painel bege (como o menu)
   ============================================================ */
#account-box {
  border: none;
  border-image: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
#account-box .box-inner { padding: 0; }
#account-box .box-title {
  background: linear-gradient(180deg, #1e4269 0%, #14304c 55%, #0d2237 100%);
  border: 1px solid #0a1a2a;
  border-radius: 9px 9px 0 0;
  box-shadow:
    inset 0 0 0 1px rgba(216,178,90,.75),
    inset 0 0 0 2px rgba(70,45,15,.45);
  font-size: 13.5px;
  letter-spacing: 1px;
  margin: 0;
  padding: 8px 26px;
}
#account-box #sidebar-widget {
  background: #f1e0c6;
  border: 1px solid #a08050;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin: 0 3px;
  padding: 9px 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
}

#sidebar-widget { font-size: 11px; color: #5a2800; }
#sidebar-widget label {
  font-family: martelregular, sans-serif;
  font-size: 12px;
  color: #720000;
  display: block;
  margin-bottom: 2px;
}
#sidebar-widget input[type=text],
#sidebar-widget input[type=password] {
  width: 100%;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 11px;
  margin-bottom: 7px;
  border: 1px solid #a08050;
  background: #fdf6e8;
  color: #333;
  padding: 3px 5px;
  border-radius: 3px;
}
/* Turnstile no card de login: o iframe tem 300x65 fixos e o card tem 177px uteis
   (#sidebar 205 - margem 6 - borda 2 - padding 20). scale(.59) = 300*.59 = 177px
   exatos, ou seja, ocupa a largura do card inteiro mantendo a proporcao original
   (altura 65*.59 = 38px) - o modo compact do Turnstile ficaria alto demais. */
#sidebar-widget .cf-turnstile {
  width: 100%;
  overflow: hidden;
  margin-bottom: 7px;
}
#sidebar-widget .cf-turnstile iframe {
  transform: scale(.59);
  transform-origin: 0 0;
}

#sidebar-widget .button { width: 100%; }
/* botão Login azul (referência) */
#sidebar-widget .button,
#sidebar-widget input[type=submit].button {
  background-image: none;
  background: linear-gradient(180deg, #3f7fc4 0%, #2765a8 50%, #1a4e8c 100%);
  border: 1px solid #0e2f5c;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
#sidebar-widget .widget-links {
  text-align: center;
  margin-top: 8px;
  font-size: 10px;
  color: #7d5a38;
}
#sidebar-widget .widget-links a { color: #1a5fb4; font-size: 11px; }
#sidebar-widget .widget-char {
  display: block;
  color: #5a2800;
  font-size: 11px;
  margin: 3px 0;
}
#sidebar-widget .widget-char b { color: #720000; }
#sidebar-widget .widget-hello {
  font-family: martelregular, sans-serif;
  font-size: 14px;
  color: #720000;
  display: block;
  text-align: center;
  margin-bottom: 6px;
}
#sidebar-widget .widget-nochar {
  display: block;
  text-align: center;
  color: #7d5a38;
  font-size: 11px;
  margin-bottom: 4px;
}
#sidebar-widget .widget-charlist {
  display: block;
  text-align: center;
  margin-bottom: 4px;
}
#sidebar-widget .widget-charlist a {
  display: inline;
  color: #720000;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
}
#sidebar-widget .widget-charlist a:hover { text-decoration: underline; }
#sidebar-widget .widget-charlvl {
  color: #5a2800;
  font-weight: 400;
  font-size: 11px;
}

/* ============================================================
   SIDEBAR DIREITA - server status / powergamers
   ============================================================ */

/* ---- Server Status compacto (2 linhas) ---- */
#status-box .status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px;
}
#status-box .status-row + .status-row { border-top: 1px solid rgba(230,190,90,.12); }
.status-line { font-family: martelregular, sans-serif; font-size: 12.5px; color: #dbe6f2; }
.status-line #header-status-text { color: #4ad06a; text-shadow: 0 1px 2px #000; }
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2fd944;
  box-shadow: 0 0 7px #2fd944;
  vertical-align: middle;
  margin-right: 3px;
}
.status-players { color: #6fb0ff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-players b { color: #ffe4a6; }
.status-label {
  /* font-family: martelregular, sans-serif; */
  font-size: 10px;
  color: #f0dcae;
  text-shadow: 0 1px 1px #000;
}
.status-countdown {
  /* monospace: martel não tem dígitos; monospace deixa o timer alinhado */
  font-family: "Consolas", "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 1px;
  color: #ffd86b;
  text-shadow: 0 2px 3px #000;
}
.status-note { margin: 0; font-size: 10px; color: #9fb3cc; }

/* bloco do próximo server save (contador em destaque) */
.status-save {
  text-align: center;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(230,190,90,.14);
}
.status-save .status-label { display: block; font-size: 10px; }
.status-save .status-countdown {
  display: inline-block;
  font-size: 24px;
  letter-spacing: 3px;
  margin-top: 4px;
  color: #ffe9a8;
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(230,190,90,.35);
  border-radius: 6px;
  padding: 3px 10px;
  box-shadow: inset 0 0 8px rgba(0,0,0,.6);
  text-shadow: 0 0 7px rgba(255,220,120,.55), 0 1px 2px #000;
}
.status-save .status-subnote {
  display: block;
  font-size: 10px;
  color: #9fb3cc;
  margin-top: 4px;
}

/* ---- Rightbar em tons de pergaminho (bege claro/escuro alternado,
        acompanhando as cores do conteúdo central) ---- */
#rightbar .box { background: #f1e0c6; }
#rightbar .box:nth-child(even) { background: #e0cba6; }
#rightbar .box-inner { color: #5a2800; }
#rightbar .box-title {
  color: #720000;
  text-shadow: none;
  border-bottom-color: rgba(114,0,0,.3);
}
#rightbar .box a { color: #1a5fb4; }
#rightbar .status-label { color: #5a2800; text-shadow: none; }
#rightbar .status-save { border-top-color: rgba(114,0,0,.15); }
#rightbar .status-note,
#rightbar .status-save .status-subnote { color: #7d5a38; }

/* ---- Premium Account (azul + dourado, na paleta do site) ---- */
#rightbar .box.premium-box {
  background: linear-gradient(180deg, #1e4269 0%, #14304c 55%, #0d2237 100%);
}
#rightbar .premium-box .box-title {
  color: #f2c94e;
  text-shadow: 0 1px 2px #000, 0 0 10px rgba(240,190,70,.25);
  border-bottom-color: rgba(230,190,90,.35);
}
#rightbar .premium-box .premium-tag {
  margin: 0 0 9px;
  text-align: center;
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  color: #f0dcae;
  text-shadow: 0 1px 2px #000;
}
.btn-premium {
  display: inline-block;
  padding: 7px 18px;
  background: linear-gradient(180deg, #ffe488 0%, #e3b84e 55%, #c2942a 100%);
  border: 1px solid #6e4f00;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 4px rgba(0,0,0,.5);
  font-family: martelregular, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #4a2d00;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  text-decoration: none;
}
#rightbar .box .btn-premium { color: #4a2d00; }
.btn-premium.sub { font-size: 11px; padding: 5px 12px; }
.btn-premium:hover { text-decoration: none; filter: brightness(1.06); }

/* ---- Char Bazaar / Highscores (outfit real) ---- */
table.tibia td.bz-outfit { width: 40px; }
/* #content precisa entrar no seletor: "#content img { height:auto }" tem um
   ID, que vence qualquer combinacao de classes por especificidade - sem isso
   o height:auto sobrescrevia o encaixe e a imagem sumia.
   outfits/outfit.php ja devolve o personagem recortado no bounding box justo
   (sem espaco em branco), entao object-fit:contain centraliza e escala pra
   caber no card sem distorcer, qualquer que seja o outfit. */
#content table.tibia td.bz-outfit img {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  object-fit: contain;
  image-rendering: pixelated;
}
.bz-nav { font-size: 11px; margin: -12px 0 12px; }
.bz-nav b { color: #720000; }

/* ---- Cena do altar: pedra + monstro central, Heaven Blossom e Troll nos cantos.
        Sem moldura; sobe para a faixa da logo via margem negativa (altura útil 0),
        assim o topo da Premium alinha com a barra central e a Minha Conta. ---- */
#rightbar .altar {
  position: relative;
  height: 212px;
  margin: -226px 0 14px; /* 212 - 226 + 14 = 0 -> não empurra a coluna.
    Voltado pro tamanho confirmado como bom (usuario reportou que o Demon
    ficava certo nesse tamanho) - continuar aumentando (233, depois 273) so
    empurrava a cena pra cima do topo real da pagina (o #header nao tem
    fundo opaco, entao nao "corta" visualmente, mas empurrar alem da altura
    real do header + infobar acima do rightbar faz o topo da cena sair da
    area visivel do documento - by isso cortava mais quanto mais aumentava,
    o oposto do esperado). Monstros grandes agora usam
    ALTAR_BIG_MONSTER_EXTRA_DROP (aldeia.js) pra descer DENTRO desse espaco,
    em vez de crescer o espaco em si. */
}
.altar-stone {
  position: absolute;
  bottom: 0; left: 50%;
  width: 64px; height: 64px;
  margin-left: -32px;
  transform: scale(2);
  transform-origin: 50% 100%;
  image-rendering: pixelated;
  background: url(../images/altar-stone.png) no-repeat;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.6));
  z-index: 1;
}
/* monstro do dia: o ponto inferior central da sprite (os pés) fica
   exatamente no centro da imagem da pedra (128/2 = 64px) */
.altar-monster {
  position: absolute;
  bottom: 64px; left: 50%;
  width: 32px; height: 32px;
  margin-left: -34px; /* -16 (centro) - 18px p/ a esquerda */
  transform: scale(2);
  transform-origin: 50% 100%;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.55));
  z-index: 4;
}
/* config.php: altar_use_outfit_system=true - animoutfit.php recorta todos
   os frames da animacao com o MESMO retangulo (uniao das areas visiveis de
   cada frame), entao a imagem final ja vem so com o personagem, sem sobra
   de canvas - funciona tanto pra monstro pequeno (1x1 tile) quanto grande
   (2x2 tile, ex.: Dragon Lord, Stone Golem). Sem width/height fixo (nao usa
   object-fit): cada imagem fica no seu tamanho NATIVO so ampliado 2x, entao
   um monstro grande realmente aparece maior que um pequeno (object-fit:contain
   normalizava todo mundo pro mesmo tamanho de caixa, o que fazia monstro
   grande ficar pequeno e monstro pequeno ficar grande demais - errado).
   translateX(-50%) centraliza horizontalmente qualquer que seja a largura
   nativa da imagem, sem precisar calcular margin-left por monstro. */
.altar-monster.outfit-mode {
  width: auto; height: auto;
  max-width: none;
  bottom: 56px;
  margin-left: 0;
  transform: translateX(calc(-50% - 6px)) scale(2);
  transform-origin: 50% 100%;
  /* flores (z-index:5) foram desenhadas pra ficar NA FRENTE do monstro
     pequeno de proposito (comment abaixo), mas monstros grandes (2x2 tile)
     tem o corpo alcancando a mesma faixa vertical das flores - nesse caso a
     flor por cima "come" pedaco do monstro. So no modo outfit sobe o
     monstro acima das flores; monstro pequeno nao chega nessa faixa mesmo. */
  z-index: 6;
}
/* Flores na base da pedra: vermelha - Troll Green - Troll Green - vermelha.
   Vermelha = Sprites-10 x224 y64; Troll Green = gif local (TibiaWiki BR).
   Ficam NA FRENTE do monstro (z acima) e sobrepondo a base do rochedo. */
.altar-plant {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 32px; height: 32px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45));
  z-index: 5;
}
.altar-plant.fl-red   { background-image: url(../sprites/7.1/Sprites-10.png); background-position: -224px -64px; }
.altar-plant.fl-green { background-image: url(../images/troll-green.gif); background-position: 0 0; }
.altar-plant.p1 { margin-left: -58px; }
.altar-plant.p2 { margin-left: -29px; }
.altar-plant.p3 { margin-left: -3px; }
/* vermelha da direita espelhada (reflexo da esquerda) e mais pra dentro da pedra */
.altar-plant.p4 { margin-left: 26px; transform: scaleX(-1); }

/* ---- Streamers ---- */
#streamers { list-style: none; margin: 0; padding: 0; }
#streamers .stream {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(90,40,0,.15);
}
#streamers .stream:last-child { border-bottom: none; }

/* foto de perfil (avatar) do streamer - separada da miniatura da live (que
   mostra o conteudo da transmissao, nao a pessoa/canal). Redonda, pequena,
   fica antes da miniatura na linha do card. */
#streamers .stream-avatar-wrap { flex: none; display: block; }
#streamers .stream-avatar {
  display: flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #14304c;
  border: 1px solid rgba(90,40,0,.25);
}
#streamers .stream-avatar-fallback svg { width: 16px; height: 16px; }

/* miniatura da live + selo da plataforma no canto (estilo "overlay" que
   toda plataforma de stream usa: da pra saber de relance onde e Twitch,
   YouTube ou Kick sem precisar ler nada) */
#streamers .stream-thumb-wrap {
  position: relative;
  flex: none;
  display: block;
  width: 56px; height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #14304c;
}
#streamers .stream-thumb {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
#streamers .stream-thumb-fallback { display: block; }
/* .stream-plat: o SVG do icone ja desenha seu proprio fundo colorido
   (fill="currentColor" no rect) - por isso a cor da marca vai no CSS
   "color", nao em "background" (senao um cobriria o outro). */
#streamers .stream-plat {
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6));
}
#streamers .stream-plat svg { display: block; width: 100%; height: 100%; }
#streamers .stream-thumb-wrap .stream-plat {
  position: absolute;
  right: 2px; bottom: 2px;
  width: 16px; height: 16px;
}
/* cores oficiais de cada marca (simple-icons: github.com/simple-icons/simple-icons) */
.plat-twitch { color: #9146ff; }
.plat-youtube { color: #ff0000; }
.plat-kick { color: #53fc19; }

#streamers .stream-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#streamers .stream-name {
  min-width: 0;
  color: #5a2800; font-size: 11.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
#streamers .stream-name:hover { text-decoration: underline; }
#streamers .stream-live {
  flex: none;
  font-size: 9px; font-weight: 700; color: #fff;
  background: #c0392b; border-radius: 3px; padding: 1px 5px;
  box-shadow: 0 0 6px rgba(220,60,50,.5);
}
#streamers .stream-viewers {
  align-self: flex-start;
  font-size: 10px; font-weight: 700; color: #720000;
  background: rgba(114,0,0,.08); border-radius: 3px; padding: 1px 6px;
}
#streamers .stream-viewers::before { content: "👁 "; font-size: 9px; }
#streamers .stream-off { flex: none; font-size: 9px; color: #7d5a38; }
#streamers .stream:not(.live) .stream-name { color: #7d5a38; }
#streamers .stream-empty {
  font-size: 11px; color: #7d5a38; padding: 6px 2px; text-align: center;
}

/* selo "parceiro verificado" (canal esta na lista "channels" do config.php,
   nao e so um achado organico via busca de titulo - so Twitch/Kick tem esse
   conceito, ja que so checam canais conhecidos; YouTube usa busca livre e
   nunca tem o selo). Usado tanto no card do rodape quanto em streamers.php. */
.stream-partner-badge {
  display: inline-block;
  width: 12px; height: 12px;
  margin-left: 3px;
  vertical-align: -1px;
  flex: none;
}
#streamers .stream-name .stream-partner-badge { margin-left: 2px; }
/* coluna "Partner" da tabela de streamers.php - selo sozinho, um pouco maior
   que o do card compacto do rodape. */
.streamers-table .stream-partner-badge { width: 18px; height: 18px; margin-left: 0; vertical-align: middle; }

/* selo de plataforma na tabela de streamers.php (fora do card do rodape) */
table.tibia td:has(.stream-plat-inline) { white-space: nowrap; }
.stream-plat-inline {
  display: inline-block;
  width: 16px; height: 16px;
  vertical-align: middle;
  margin-right: 5px;
}
.stream-plat-inline svg { display: block; width: 100%; height: 100%; }

/* powergamers */
#powergamers { list-style: none; margin: 0; padding: 0; counter-reset: pg; }
/* grid de 2 linhas: rank e sprite ocupam as duas, o nome fica sozinho na
   primeira (largura inteira da coluna, ~115px) e o badge de xp desce pra
   segunda. Antes tudo era uma linha so em flex e o badge espremia o nome
   pra ~35px, cortando em "C..". */
#powergamers li {
  display: grid;
  grid-template-columns: 20px 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  padding: 5px 2px;
  border-bottom: 1px solid rgba(90,40,0,.15);
}
#powergamers li:last-child { border-bottom: none; }
#powergamers .pg-rank {
  grid-column: 1;
  grid-row: 1 / span 2;
  text-align: center;
  font-family: Verdana, Tahoma, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #720000;
}
#powergamers .pg-sprite {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  width: 38px; height: 38px;
  overflow: hidden;
  background: linear-gradient(180deg, #e3d0b0, #d4c0a1);
  border: 1px solid #b09468;
  border-radius: 4px;
}
#powergamers .pg-sprite {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* outfit real (outfits/outfit.php) ja vem recortado no bounding box justo
   (sem espaco em branco), entao object-fit:contain centraliza e escala pra
   caber no card sem distorcer, qualquer que seja o outfit. */
#powergamers .pg-sprite img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
#powergamers .pg-info { grid-column: 3; grid-row: 1; min-width: 0; line-height: 1.25; }
/* nome inteiro: quebra em duas linhas quando nao couber, em vez de cortar
   com reticencias. overflow-wrap:anywhere garante que um nome unico muito
   longo (sem espacos) tambem quebre em vez de estourar a caixa. */
#powergamers .pg-name {
  display: block;
  color: #5a2800;
  font-size: 11px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}
#powergamers .pg-sub { display: block; color: #7d5a38; font-size: 10px; white-space: nowrap; }
#powergamers .pg-xp {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
  background: linear-gradient(180deg, #ffe3c2, #f0b56c);
  border: 1px solid #c98a3c;
  border-radius: 10px;
  padding: 2px 7px;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #7a3b00;
  white-space: nowrap;
}

/* ============================================================
   MAIN - pergaminho com moldura de madeira
   ============================================================ */

#main {
  border-style: solid;
  border-width: 7px 9px 9px 8px;
  -moz-border-image: url(../images/content-border.png) 7 9 9 8 repeat;
  -webkit-border-image: url(../images/content-border.png) 7 9 9 8 repeat;
  -o-border-image: url(../images/content-border.png) 7 9 9 8 repeat;
  border-image: url(../images/content-border.png) 7 9 9 8 fill repeat;
  box-shadow: 0 4px 14px rgba(0,0,0,.55);
}
#main #content {
  background-image: url(../images/content-bg.jpg);
  background-repeat: repeat;
  padding: 14px 16px;
  color: #5a2800;
}

#copyright {
  text-align: center;
  font-weight: 700;
  font-size: 10px;
  margin: 14px 0 0;
  color: #d8c9ad;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
#copyright a { color: #ffe488; }
#copyright a:hover { text-decoration: underline; }
#copyright .muted-footer { font-weight: 400; font-size: 9px; opacity: .75; margin-top: 6px; }
#copyright .footer-host {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8c9ad;
  text-decoration: none;
  margin-top: 4px;
  transition: opacity .2s;
}
#copyright .footer-host:hover { opacity: .8; text-decoration: none; }
#copyright .footer-host img { display: block; width: 90px; height: auto; }

/* ============================================================
   TÍTULOS DE SEÇÃO (heading clássico vermelho + martel)
   ============================================================ */

.heading {
  margin-bottom: 22px;
  padding: 1px 0 5px;
  position: relative;
}
.heading:after { content: ""; display: table; clear: both; }
.heading:before {
  box-shadow: 1px 1px 2px 0 rgba(50, 50, 50, .3);
  border-top: 2px solid #720000;
  border-bottom: 1px solid #590000;
  border-radius: 5px;
  position: absolute;
  content: "";
  height: 0;
  right: 0; left: 0; top: 0;
}
.heading .heading-rule {
  box-shadow: 1px 1px 2px 0 rgba(50, 50, 50, .3);
  border-top: 2px solid #720000;
  border-bottom: 1px solid #590000;
  border-radius: 5px;
  position: absolute;
  bottom: 3px;
  height: 0;
  right: 0; left: 0;
}
.heading h1 {
  font-family: martelregular, sans-serif;
  font-weight: 400;
  margin: 10px 0 2px 6px;
  text-shadow: none;
  font-size: 42px;
  color: #720000;
  float: left;
}

/* ============================================================
   NOTÍCIAS
   ============================================================ */

article.news { margin-bottom: 15px; }
article.news header.news-header {
  background: url(../images/news-header.png);
  line-height: 31px;
  height: 31px;
  width: 100%;
  color: #fff;
}
article.news header.news-header span.news-date {
  text-shadow: 0 1px 0 #000;
  margin: 0 20px 0 10px;
  vertical-align: top;
  font-weight: 700;
  font-size: 10px;
}
article.news header.news-header h2 {
  text-shadow: 0 1px 0 #000;
  font-weight: 700;
  display: inline;
  font-size: 12px;
  padding: 0;
  margin: 0;
}
article.news .news-content { padding: 10px 5px; line-height: 1.5; }
article.news .news-content p { margin: 0 0 9px; }
article.news .news-content ul,
article.news .news-content ol { margin: 4px 0 10px 22px; padding: 0; }
article.news .news-content li { margin-bottom: 3px; }
article.news .news-content h3 { color: #720000; font-size: 13px; margin: 12px 0 4px; }
article.news footer.news-footer {
  text-align: right;
  font-size: 11px;
  font-style: italic;
  color: #7d5a38;
}

#changelogTable { margin-bottom: 15px; }
#changelogTable tr.yellow td { background-color: #ffd18c !important; font-weight: 700; }

/* ============================================================
   TABELAS CLÁSSICAS
   ============================================================ */

/* grid branco de 1px entre celulas (linhas E colunas), como nas tabelas
   classicas do Tibia: o fundo branco da tabela aparece nos vaos do border-spacing */
/* Container generico pra tabela larga: em telas estreitas ela rola por
   dentro (scroll horizontal so na tabela), em vez de esticar a pagina
   inteira e estourar o layout. */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.tibia { border-collapse: separate; border-spacing: 1px; width: 100%; background: #fff; }
/* streamers.php: titulo da live pode ser bem longo - quebra a linha em vez
   de esticar a coluna (e a tabela toda) pra caber tudo numa linha so. */
.streamers-table { min-width: 640px; }
.streamers-table .streamers-title { max-width: 260px; white-space: normal; word-break: break-word; }
table.tibia tr th {
  background-color: #505050;
  font-weight: 700;
  color: #fff;
  padding: 6px;
  text-align: left;
  font-size: 11px;
}
table.tibia tr td {
  font-weight: 400;
  padding: 6px;
  color: #5a2800;
  vertical-align: middle;
  font-size: 11px;
}
table.tibia tr:nth-child(odd) td { background-color: #f1e0c6; }
table.tibia tr:nth-child(even) td { background-color: #d4c0a1; }
table.tibia tr:hover td { background-color: #fff; }

td.num, th.num { text-align: right !important; }
td.ctr, th.ctr { text-align: center !important; }

.status-online, .online { font-weight: 700; color: #118a22; }
.status-offline, .offline { font-weight: 700; color: #c54242; }

table.charsheet td:first-child { width: 160px; font-weight: 700 !important; }

/* ============================================================
   CONTEÚDO GERAL (dentro do pergaminho)
   ============================================================ */

#content { line-height: 1.5; }
#content a { color: #1a5fb4; }
#content p { margin: 0 0 9px; }
/* h1 solto (paginas admin etc) segue o mesmo tom do heading, menor */
#content h1 { font-family: martelregular, sans-serif; font-weight: 400; color: #720000; font-size: 26px; margin: 12px 0 8px; }
#content h3 { color: #720000; font-size: 13px; margin: 14px 0 5px; }
#content ul, #content ol { margin: 4px 0 10px 22px; padding: 0; }
#content li { margin-bottom: 3px; }

.muted { color: #7d5a38; font-size: 11px; }
.small { font-size: 11px; }
.center { text-align: center; }

/* ============================================================
   BOTÕES E FORMULÁRIOS
   ============================================================ */

.btn, .button {
  font-family: Verdana, Tahoma, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  background-image: url(../images/button-bg.jpg);
  border: none;
  border-bottom: 1px solid #424242;
  border-top: 1px solid #848484;
  background-repeat: repeat;
  display: inline-block;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  border-radius: 7px;
  font-weight: 700;
  padding: 5px 20px;
  min-width: 110px;
  cursor: pointer;
  font-size: 10px;
  /* line-height fixo + box-sizing: <a> e <input> ficam com a MESMA altura */
  line-height: 14px;
  box-sizing: border-box;
  outline: 0;
  color: #fff !important;
  margin: 0;
  text-decoration: none;
}
.btn:hover, .button:hover { text-decoration: underline; color: #fff; }
.btn.small, .button.small { min-width: 70px; padding: 3px 12px; font-size: 9px; }

input[type=text], input[type=password], input[type=email], select {
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 11px;
  border: 1px solid #7d5a38;
  background: #fff;
  color: #333;
  padding: 3px 5px;
}
#content input[type=text],
#content input[type=password],
#content input[type=email] { min-width: 190px; }

.form-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px 12px;
  align-items: center;
  max-width: 540px;
  background-color: #f1e0c6;
  border: 1px solid #d4c0a1;
  padding: 12px;
}
.form-grid label { font-weight: 700; font-size: 11px; }
.form-grid .full { grid-column: 1 / -1; }

.msg { padding: 1px 20px; margin-bottom: 10px; font-weight: 700; line-height: 20px; font-size: 11px; color: #fff; }
.msg.ok { border-bottom: 1px solid #605749; text-shadow: 0 1px 0 #605749; background: #73a958; }
.msg.err { border-bottom: 1px solid #604949; border-left: 10px solid #e07c7c; background: #fff; color: #333; text-shadow: none; }
.msg a { color: #fff; text-decoration: underline; }
.msg.err a { color: #03C; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background-color: #f1e0c6;
  border: 1px solid #d4c0a1;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.filter-bar label { font-weight: 700; font-size: 11px; }

/* ============================================================
   DOWNLOADS
   ============================================================ */

.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.dl-card { background-color: #f1e0c6; border: 1px solid #d4c0a1; padding: 14px; text-align: center; }
.dl-card .dl-icon { font-size: 32px; }
.dl-card h4 { color: #720000; font-size: 13px; margin: 6px 0 4px; }
.dl-card .muted { display: block; margin-bottom: 10px; }

/* ============================================================
   GUILDAS / FAQ
   ============================================================ */

.guild-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background-color: #f1e0c6;
  border: 1px solid #d4c0a1;
  padding: 10px;
  margin-bottom: 8px;
}
.guild-row:nth-child(even) { background-color: #d4c0a1; }
.guild-emblem {
  width: 46px; height: 46px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: #505050;
  border: 1px solid #333;
}
.guild-info h4 { color: #720000; font-size: 13px; margin: 0 0 3px; }

details.faq { background-color: #f1e0c6; border: 1px solid #d4c0a1; margin-bottom: 6px; padding: 0 10px; }
details.faq:nth-child(even) { background-color: #e3d0b0; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 8px 0; color: #720000; }
details.faq[open] summary { border-bottom: 1px solid #d4c0a1; }
details.faq .faq-a { padding: 8px 0 10px; }

/* ============================================================
   ABAS (tabs) - usado em myaccount.php etc
   ============================================================ */
.tabs-nav,
#content ul.tabs-nav { /* especificidade pra vencer o "#content ul" generico (22px de margem) */
  display: flex;
  flex-wrap: nowrap; /* a barra nunca quebra linha nem cria scroll - cada aba
                         divide o espaco disponivel (flex:1). O texto (JS,
                         .autofit-text) tenta encolher primeiro; se mesmo assim
                         nao couber (traducao muito longa em algum idioma), o
                         botao aceita quebrar em 2 linhas por dentro (fallback
                         100% CSS, nao depende do JS/timing do Google Translate)
                         em vez de cortar texto ou empurrar a barra pra baixo */
  gap: 10px;
  border-bottom: 2px solid #0a1a2a;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.tabs-nav li { margin: 0; flex: 1 1 0; min-width: 0; align-self: stretch; }
.tabs-nav button {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-family: martelregular, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
  background: linear-gradient(180deg, #1e4269 0%, #14304c 55%, #0d2237 100%);
  color: #f0dcae;
  border: 1px solid #0a1a2a;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset 0 0 0 1px rgba(216,178,90,.55),
    inset 0 0 0 2px rgba(70,45,15,.35);
  padding: 8px 8px;
  cursor: pointer;
  text-shadow: 0 1px 2px #000;
}
.tabs-nav button:hover { color: #f2c94e; }
.tabs-nav button.active {
  background: linear-gradient(180deg, #2c5a8c 0%, #1c3f61 55%, #14304c 100%);
  color: #f2c94e;
  box-shadow:
    inset 0 0 0 1px rgba(216,178,90,.85),
    inset 0 0 0 2px rgba(70,45,15,.45);
  text-shadow: 0 1px 2px #000, 0 0 10px rgba(240,190,70,.3);
  position: relative;
  top: 2px;
}
.tab-panel { display: none; padding: 18px 2px 6px; }
.tab-panel.active { display: block; }

/* cards de gerenciar personagens (grade, nao empilhado) */
.manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-width: 780px;
}
.manage-item {
  background: #f1e0c6;
  border: 1px solid #d4c0a1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.manage-item label { font-weight: 700; font-size: 11px; color: #720000; }
.manage-item select,
.manage-item input[type=text] { width: 100%; }
.manage-item .button { align-self: flex-start; }
.manage-item.manage-danger { border-color: #c99; background: #f6e3dd; }

/* translate_widget.php e fixed/floating por padrao (usado assim na
   entry_page, sobre o wrap dela) - dentro da infobar do site novo ele
   precisa ficar inline, no fluxo normal do layout. */
#infobar .translate-widget {
  position: static;
  top: auto; left: auto; z-index: auto;
  background: none;
  border: none;
  padding: 0;
  backdrop-filter: none;
}
#infobar .infobar-lang { display: flex; align-items: center; }

/* erro inline de login (widget da sidebar) */
.widget-login-error {
  background: #fff;
  border: 1px solid #c0392b;
  border-left: 8px solid #e07c7c;
  color: #8b1a1a;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  margin-bottom: 7px;
  border-radius: 3px;
}
input.input-error,
#sidebar-widget input.input-error {
  border: 1px solid #c0392b !important;
  background: #fff5f5;
  box-shadow: 0 0 3px rgba(192,57,43,.5);
}

/* olho de privacidade (mascarar conta/e-mail) */
.priv-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #7d5a38;
  vertical-align: middle;
  padding: 0 3px;
  line-height: 1;
}
.priv-toggle:hover { color: #720000; }
.priv-value { letter-spacing: 1px; }
.priv-value.revealed { letter-spacing: normal; }

/* ============================================================
   RESPONSIVO
   ============================================================ */

/* ---- Selos da home ---- */
.selos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.selo {
  flex: 1 1 110px;
  text-align: center;
  background: #f1e0c6;
  border: 1px solid #d4c0a1;
  border-top: 3px solid #720000;
  border-radius: 4px;
  padding: 8px 6px;
}
.selo-k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #7d5a38; font-weight: 700; }
.selo-v { display: block; font-size: 16px; font-weight: 700; color: #720000; margin-top: 2px; }

/* ---- Roadmap / timeline ---- */
.roadmap { list-style: none; margin: 6px 0 16px; padding: 0; }
.roadmap .rm-phase {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 2px solid #d4c0a1;
  margin-left: 6px;
}
.roadmap .rm-phase:last-child { border-left-color: transparent; padding-bottom: 0; }
.rm-dot {
  position: absolute; left: -7px; top: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #d4c0a1; border: 2px solid #7d5a38;
}
.rm-current .rm-dot { background: #118a22; border-color: #0a5c17; box-shadow: 0 0 6px rgba(40,180,60,.6); }
.rm-name { font-weight: 700; color: #720000; font-size: 13px; }
.rm-badge { background: #118a22; color: #fff; font-size: 9px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.rm-period { display: block; font-size: 11px; color: #7d5a38; font-weight: 700; }
.rm-desc { display: block; font-size: 11px; }

/* ---- Itens de quest (sprites 7.1) ---- */
.quest-items { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.quest-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1e0c6;
  border: 1px solid #d4c0a1;
  border-radius: 4px;
  padding: 6px 10px;
  font-weight: 700;
  color: #5a2800;
}
.quest-item img { width: 32px; height: 32px; image-rendering: pixelated; }

/* botão hambúrguer + backdrop: só existem no mobile */
#infobar .menu-toggle-li { display: none; }
#sidebar-close { display: none; }
#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 90;
}
#sidebar-backdrop.show { display: block; }

@media (max-width: 1220px) {
  #pandaac { width: 100%; }
}
@media (max-width: 1000px) {
  /* barra do topo gruda no scroll (acesso constante ao menu) */
  #infobar {
    position: sticky;
    top: 0;
    z-index: 80;
    margin: 8px 0 0;
  }
  #infobar ul { flex-wrap: wrap; }
  #infobar .menu-toggle-li { display: flex; }
  #menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(230, 190, 90, .55);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: martelregular, sans-serif;
    font-size: 13px;
    color: #f0dcae;
    text-shadow: 0 1px 2px #000;
  }
  #menu-toggle svg { width: 16px; height: 16px; }
  #menu-toggle:hover { color: #ffe488; border-color: rgba(240, 190, 70, .8); }

  #content-container { display: block; }
  #rightbar, #main-container { width: 100%; }
  #main-container { margin: 12px 0; }

  /* no mobile a cena do altar volta ao fluxo normal (sem faixa da logo ao lado) */
  #rightbar .altar { margin: 0 0 12px; }

  /* sidebar vira gaveta lateral fixa, fechada por padrão */
  #sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 272px;
    max-width: 84vw;
    padding: 42px 12px 16px;
    background: linear-gradient(180deg, #16334f 0%, #0d2237 100%);
    box-shadow: 4px 0 18px rgba(0, 0, 0, .65);
    overflow-y: auto;
    z-index: 95;
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  #sidebar.open { transform: translateX(0); }
  #sidebar-close {
    display: block;
    position: absolute;
    top: 6px; right: 10px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #f0dcae;
    cursor: pointer;
  }
  #sidebar-close:hover { color: #ffe488; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 720px) {
  #header { flex-direction: column; align-items: center; gap: 8px; }
  #topnav ul { justify-content: flex-start; }
  .logo-title { font-size: 44px; }
  #logo img { height: 84px; }
  #content-container { display: block; }
  #rightbar, #main-container { width: 100%; }
  #main-container { margin-top: 0; }
  .heading h1 { font-size: 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   GIANT SPIDER - animação do site oficial (aldeiaonline.com)
   ============================================================ */

.giant-spider {
  position: fixed;
  bottom: 10px;
  width: 250px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(rgba(0, 0, 0, 0.65) 0px 8px 12px);
  image-rendering: pixelated;
}

.giant-spider.from-right.show {
  animation: 5.5s ease-in-out 0s 1 normal forwards running spiderRight;
}

.giant-spider.from-left.show {
  animation: 5.5s ease-in-out 0s 1 normal forwards running spiderLeft;
}

@keyframes spiderRight {
  0%   { right: -180px; opacity: 0; transform: scaleX(1); }
  15%  { right: 20px; opacity: 1; }
  45%  { right: 55px; transform: translateY(-4px) scaleX(1); }
  75%  { right: 20px; opacity: 1; }
  100% { right: -190px; opacity: 0; }
}

@keyframes spiderLeft {
  0%   { left: -180px; opacity: 0; transform: scaleX(-1); }
  15%  { left: 20px; opacity: 1; transform: scaleX(-1); }
  45%  { left: 55px; transform: translateY(-4px) scaleX(-1); }
  75%  { left: 20px; opacity: 1; transform: scaleX(-1); }
  100% { left: -190px; opacity: 0; transform: scaleX(-1); }
}

@media (max-width: 600px) {
  .giant-spider { width: 105px; bottom: 18px; }
}

/* ============================================================
   COMPAT ZNOTE - conteúdo central gerado pelas páginas PHP
   ============================================================ */
/* Tabelas das paginas ainda nao migradas ganham o mesmo visual da table.tibia
   (grid branco 1px, listras, hover), sem precisar tocar no PHP de cada uma. */
#content table:not(.tibia) {
  border-collapse: separate;
  border-spacing: 1px;
  background: #fff;
  width: 100%;
  margin-bottom: 16px;
}
table.tibia { margin-bottom: 16px; }
#content table:not(.tibia) td,
#content table:not(.tibia) th { padding: 6px; font-size: 11px; color: #5a2800; }
#content table:not(.tibia) th { background-color: #505050; color: #fff; font-weight: 700; text-align: left; }
#housetable th { background-color: #505050; color: #fff; font-weight: 700; text-align: left; }
#content table:not(.tibia) tr:nth-child(odd) td { background-color: #f1e0c6; }
#content table:not(.tibia) tr:nth-child(even) td { background-color: #d4c0a1; }
#content table:not(.tibia) tr:hover td { background-color: #fff; }
#content img { max-width: 100%; height: auto; }
/* Separador/titulo antigo do Znote: nao esticar - height:auto quebra a proporcao
   porque line_body.gif e quase quadrado no tamanho original. */
#content img[src*="line_body.gif"] { height: 7px; }
#content img[src*="/titles/"] { width: auto; height: auto; max-width: 100%; }
#content input[type=submit], #content button[type=submit] {
  font-family: Verdana, Tahoma, sans-serif;
  background-image: url(../images/button-bg.jpg);
  border: none; border-bottom: 1px solid #424242; border-top: 1px solid #848484;
  border-radius: 7px; color: #fff; font-weight: 700; font-size: 10px;
  padding: 5px 16px; min-width: 90px; cursor: pointer;
}

/* ============================================================
   COUNTRY SELECT - dropdown customizado com bandeira real (imagem),
   ja que emoji de bandeira nao renderiza como bandeira no Windows
   (so mostra a sigla). Usado no formulario de criar conta (entry_page.php
   e register.php), gerado por entry_country_select_html() em general.php.
   ============================================================ */
.country-select {
  position: relative;
  width: 100%;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 12px;
}
.country-select .cs-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fdf6e8;
  border: 1px solid #a08050;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  color: #333;
  text-align: left;
}
.country-select .cs-toggle:hover { background: #f7ecd6; }
.country-select.open .cs-toggle { border-color: #720000; }
.country-select .cs-flag { width: 20px; height: 14px; object-fit: cover; flex: none; border: 1px solid rgba(0,0,0,.15); }
.country-select .cs-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-select .cs-caret { width: 14px; height: 14px; flex: none; color: #7d5a38; transition: transform .15s; }
.country-select.open .cs-caret { transform: rotate(180deg); }

/* painel abre como um modal de verdade (position: fixed, cobre a tela toda)
   em vez de dropdown posicionado - assim nunca fica cortado por overflow de
   containers pai (ex.: o modal de criar conta tem scroll proprio) e da a
   mesma sensacao de "abrir uma janela" que o select nativo tinha antes. */
.country-select .cs-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  padding: 14px;
}
.country-select.open .cs-panel { display: flex; }
.country-select .cs-panel-box {
  width: 320px;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fdf6e8;
  border: 1px solid #a08050;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  padding: 10px;
}
.country-select .cs-search {
  width: 100%;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 13px;
  border: 1px solid #a08050;
  border-radius: 4px;
  padding: 7px 9px;
  margin-bottom: 8px;
  color: #333;
  background: #fff;
  flex: none;
}
.country-select .cs-list { overflow-y: auto; flex: 1 1 auto; }
.country-select .cs-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  cursor: pointer;
  border-radius: 3px;
  color: #333;
  font-size: 13px;
}
.country-select .cs-option:hover,
.country-select .cs-option.cs-active { background: rgba(114,0,0,.08); }
.country-select .cs-option img { width: 22px; height: 15px; object-fit: cover; flex: none; border: 1px solid rgba(0,0,0,.15); }
.country-select .cs-option.cs-hidden { display: none; }

/* Google Translate as vezes reflui o texto ao redor de um elemento
   translate="no"/notranslate sem reinserir o espaco original, colando a
   palavra intocada com a traduzida do lado (ex.: "aovivoaldeiaonline.com").
   Uma margem lateral pequena garante um respiro visual sempre, seja qual
   for o idioma/reflow. */
.notranslate { margin: 0 0.2em; }

/* ============================================================
   PAGINA EM CONSTRUCAO (layout/overall/under_construction.php) - Dwarf
   Guard andando de um lado pro outro numa linha de trem, trem passando
   periodicamente ao fundo. Padrao pra qualquer pagina ainda nao pronta
   (char bazaar, forum futuro, etc.) - ver aldeia.js: initConstructionScene.
   ============================================================ */
.construction-scene {
  position: relative;
  height: 680px;
  margin: 10px 0 20px;
  overflow: hidden;
}
.construction-title {
  position: absolute;
  top: 16px; left: 0; right: 0;
  text-align: center;
  font-family: martelregular, Georgia, serif;
  font-size: 22px;
  font-weight: bold;
  color: #5a2800;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
  z-index: 5;
}
/* trilho em "escada" (nao mais um retangulo fechado): comeca com um fim de
   linha a esquerda (deadend-left.png), reta horizontal (rail-h.png) ate uma
   curva, desce numa reta vertical (rail-v.png), outra curva, reta horizontal
   de novo, termina noutro fim de linha a direita (deadend-right.png).
   Geometria fixa (a cena tem altura fixa de 680px):
     segAY = 250px (reta horizontal de cima)
     segCY = 450px (reta horizontal de baixo)
     vertXPct = 50% (posicao horizontal da reta/curvas do meio)
     startXPct = 15% / endXPct = 85% (pontas)
   Espessura do trilho = 44px (2x de 22px), igual ao resto do site. */
.rail-line { position: absolute; inset: 0; z-index: 1; }
.rail-seg { position: absolute; image-rendering: pixelated; }
.rail-seg-a {
  top: 228px; height: 44px;
  left: calc(15% + 12px); right: calc(50% + 22px);
  /* ancorado pela DIREITA (onde encontra a curva-b), nao pela esquerda -
     a largura desse trecho e responsiva (calc com %), entao o padrao de
     travessas nunca cai numa fase previsivel na emenda critica se ancorado
     pela esquerda; ancorando pela direita garante uma travessa inteira
     exatamente na curva, sempre, seja qual for a largura da tela. */
  background-repeat: repeat-x; background-position: top right; background-size: 64px 44px;
}
.rail-seg-b {
  left: calc(50% - 22px); width: 44px;
  top: 272px; height: 148px; /* de baixo da curva-b (250+22) ate a curva-c, terminando 1 trilho (64px)
    antes do fim antigo (450) - a reta estava comprida demais e brigava com o
    desenho da propria curva-c em vez de deixar ela sobrepor certinho. */
  background-repeat: repeat-y; background-position: top left; background-size: 44px 64px;
}
.rail-seg-c {
  top: 428px; height: 44px;
  left: calc(50% + 22px); right: calc(15% + 8px); /* right: 100%-85%=15% + margem pequena (reduzida pra fechar o vao com a ponta) */
  background-repeat: repeat-x; background-position: top left; background-size: 64px 44px;
}
/* as 2 curvas sao o MESMO tile (corner-tl.png) rotacionado via CSS - e o
   unico dos 4 originais que conecta com as retas nos dois lados sem
   desalinhar as travessas (ver historico: os outros 3 tinham emenda fora
   de fase). corner-b: chega da esquerda (reta A, indo p/ direita), sai pra
   baixo (reta B) = mesma forma de "top-right" = rotacao 90deg. corner-c:
   chega de cima (reta B, descendo), sai pra direita (reta C) = mesma forma
   de "bottom-left" = rotacao 270deg. */
.rail-corner {
  position: absolute;
  width: 52px; height: 52px;
  background-repeat: no-repeat; background-size: 100% 100%;
  image-rendering: pixelated;
  z-index: 2;
}
/* correcao de 2px medida pixel a pixel (mesma medicao/logica usada no
   trilho retangular anterior - ESQUECI de reaplicar isso quando reconstrui
   os cantos pra esse formato em "escada", causando o desalinhamento
   reportado). O vetor de correcao base e (2,2) [baixo-direita] e roda
   junto com o proprio angulo do tile: a 90deg vira (-2,+2), a 270deg vira
   (+2,-2) - por isso o left/top de cada canto ja soma isso ANTES do
   translate(-50%,-50%)+rotate, em vez de tentar somar depois (ordem de
   transform em CSS aplica da direita pra esquerda, ia rodar em torno do
   ponto errado se fosse so acrescentado no transform). */
.rail-corner-b { left: calc(50% - 6px); top: calc(250px + 6px); transform: translate(-50%, -50%) rotate(90deg); }
.rail-corner-c { left: calc(50% + 6px); top: calc(450px - 6px); transform: translate(-50%, -50%) rotate(270deg); }
/* deadend-left.png/deadend-right.png (recortes de fim_da_linha_7135/7136):
   medido pixel a pixel, a linha do trilho dentro do recorte fica ~12px
   ABAIXO do centro da caixa (em escala 2x) - o "+12px" original deixou a
   ponta baixa demais em relacao a reta na pratica; reduzido pra "+2px"
   (sobe ~10px) conforme reportado. */
.rail-deadend {
  position: absolute;
  image-rendering: pixelated;
  z-index: 2;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.35));
}
.rail-deadend-start {
  left: 15%; top: 250px; width: 82px; height: 70px;
  transform: translate(calc(-50% - 28px), calc(-50% - 13px));
}
.rail-deadend-end {
  left: 85%; top: 450px; width: 64px; height: 70px;
  transform: translate(calc(-50% + 24px), calc(-50% - 13px));
}
.construction-rail-placeholder {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  height: 44px;
  background: repeating-linear-gradient(90deg, #7d5a38 0 24px, #5a3f22 24px 28px);
  border-top: 4px solid #8a8a8a;
}
/* dwarves andam livremente pelo interior da cena (fora do trilho), posicao
   controlada via JS (aldeia.js: wanderDwarf) com "top"/"left" + transition -
   por isso sem bottom/top fixo aqui, so a base visual. */
.construction-dwarf {
  position: absolute;
  transform: translateX(-50%) scale(2);
  transform-origin: 50% 100%;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.5));
  z-index: 4;
}
/* trem agora percorre o trilho completo (as 4 bordas + cantos) em loop
   continuo - posicao (left/top) e sprite/flip calculados frame a frame em
   JS (aldeia.js: initConstructionScene/trainLoop), nao mais um keyframe CSS
   de ida-e-volta numa borda so. left/top representam o CENTRO do trem
   (translate(-50%,-50%) centraliza a imagem em cima do ponto). */
.construction-train {
  position: absolute;
  width: 32px;
  height: 32px;
  transform-origin: 50% 50%;
  opacity: 0;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(2px 4px 3px rgba(0,0,0,.45));
  z-index: 3;
}
.construction-train-placeholder {
  position: absolute;
  left: 50%; bottom: 6px;
  height: 70px; width: 90px;
  background: #720000;
  border-radius: 6px 6px 0 0;
  border: 2px solid #4a0000;
}

/* ============================================================
   SHOP (checkout real: premium, recovery key, personalizacao, itens)
   ============================================================ */

/* Moeda BRL/USD como pills, igual outras lojas de Tibia (moeda != categoria) */
.shop-currency {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px 0 16px;
}
.shop-currency-title { font-size: 11px; font-weight: 700; color: #5a2800; }
.shop-currency-options { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-currency-pill {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid #7d5a38;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  color: #5a2800;
  background: #f1e0c6;
}
.shop-currency-pill:hover { text-decoration: none; filter: brightness(1.05); }
.shop-currency-pill.active {
  background: linear-gradient(180deg, #ffe488 0%, #e3b84e 55%, #c2942a 100%);
  border-color: #6e4f00;
  color: #4a2d00;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

/* Payment-method picker (shop.php) - only rendered when a currency has 2+
   gateways configured (config.php: payments.currency_gateways). Title +
   pills sit on one row on desktop; below ~480px the title moves to its own
   line above the pills (see media query below), which stay side by side
   since 2 pills at 130px + gap comfortably fit even a narrow phone width -
   stacking title and pills all in one column would waste vertical space for
   no reason. */
.shop-gateway-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.shop-gateway-picker-title { font-size: 11px; font-weight: 700; color: #5a2800; }
.shop-gateway-picker-options { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-gateway-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 130px; /* fixed so every card matches regardless of label/methods text length */
  padding: 8px 10px;
  border: 1px solid #7d5a38;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  color: #5a2800; /* brown when unselected */
  background: #f1e0c6;
}
.shop-gateway-pill:hover { filter: brightness(1.05); }
.shop-gateway-pill.active {
  background: linear-gradient(180deg, #ffe488 0%, #e3b84e 55%, #c2942a 100%);
  border-color: #6e4f00;
  color: #1a5fb4; /* blue when selected - same blue as the currency pill's <a> */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.shop-gateway-pill img { width: 60px; height: 22px; object-fit: contain; }
.shop-gateway-label { font-size: 11px; font-weight: 700; text-align: center; }
.shop-gateway-methods { font-size: 9px; opacity: .8; text-align: center; line-height: 1.3; }

@media (max-width: 480px) {
  .shop-gateway-picker { flex-direction: column; align-items: flex-start; gap: 6px; }
  .shop-gateway-picker-options { width: 100%; justify-content: center; }
  /* Cards side by side even on a narrow phone - shrink a bit instead of
     stacking vertically (2 x ~110px + gap fits comfortably under 480px). */
  .shop-gateway-pill { width: 110px; padding: 7px 6px; }
  .shop-gateway-pill img { width: 50px; height: 20px; }

  /* Same treatment as the gateway picker above: title on its own line
     (left-aligned), pills below it centered. */
  .shop-currency { flex-direction: column; align-items: flex-start; gap: 6px; }
  .shop-currency-options { width: 100%; justify-content: center; }
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 10px 0 4px;
}

.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f1e0c6;
  border: 1px solid #d4c0a1;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.shop-card.highlight {
  border-color: #e3b84e;
  box-shadow: 0 0 0 2px #e3b84e, 0 2px 6px rgba(0,0,0,.25);
}
/* Emoji/symbol glyphs aren't in the Martel typeface, so the tab icons are
   pinned to a normal system font stack instead of inheriting it. */
.icon-symbol {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Verdana, Tahoma, sans-serif;
}
.shop-card .shop-card-icon {
  font-size: 30px;
  text-align: center;
  margin-bottom: 6px;
}
.shop-card h4 {
  color: #720000;
  font-size: 13px;
  margin: 0 0 4px;
  text-align: center;
}
.shop-card .shop-card-desc {
  font-size: 11px;
  color: #5a2800;
  text-align: center;
  min-height: 28px;
  margin-bottom: 8px;
}
.shop-card .shop-card-price {
  text-align: center;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #4a2d00;
  margin-bottom: 10px;
}
.shop-card .shop-card-price .shop-card-price-currency {
  font-size: 11px;
  font-weight: 400;
  color: #7d5a38;
}
.shop-card form { margin-top: auto; text-align: center; }
/* Buy button reuses the plain .button style (same as "Log Out" on My
   Account etc.) — the card itself keeps the parchment look, only the CTA
   is standardized to the site's default button. */
.shop-card .shop-buy-btn { width: 100%; }
.shop-card-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: #720000;
  color: #f0dcae;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.shop-empty { font-size: 11px; color: #7d5a38; padding: 10px 0; }

/* ============================================================
   MODAL (generico — 1o uso: confirmacao de telefone via WhatsApp)
   Mesma ideia visual do #sidebar-backdrop (dim overlay) + botao de
   fechar no estilo do #sidebar-close, so que centralizado na tela
   inteira em vez de ser uma gaveta lateral.
   ============================================================ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  position: relative;
  background: #f1e0c6;
  border: 1px solid #d4c0a1;
  border-radius: 8px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.modal-box h3 { color: #720000; margin: 0 0 8px; }
.modal-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #5a2800;
  cursor: pointer;
}
.modal-close:hover { color: #720000; }

/* CPF/CNPJ modal (shop.php) - plain stacked label+input instead of
   .form-grid, which assumes a 170px label column + its own nested
   background/border/padding that only works at the wider widths it was
   designed for (myaccount.php etc) - crammed into the 360px modal-box it
   made the input look like an oversized, misaligned box. */
.cpf-modal-field { margin-top: 10px; }
.cpf-modal-field label { display: block; font-weight: 700; font-size: 11px; margin-bottom: 4px; }
.cpf-modal-field input { width: 100%; box-sizing: border-box; min-width: 0; }
.cpf-modal-type { font-weight: 400; color: #7a5010; }

/* Spinner generico pra botoes que disparam uma chamada de API (WhatsApp,
   gateways de pagamento etc) — sem isso o clique parece travado enquanto
   o servidor espera a resposta externa antes de redirecionar. */
.btn-spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
  vertical-align: -1px;
  margin-right: 6px;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.js-loading-btn:disabled { opacity: .75; cursor: wait; }
