*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #141413;
  --bg2: #1c1c1a;
  --bg3: #252521;
  --border: #33322d;
  --border2: #474640;
  --gold: #c9a84e;
  --gold2: #e3c878;
  --text: #e8e5dd;
  --text2: #9a968c;
  --red: #cd6a5a;
  --green: #6fbf73;
  --djinn-blue: #5b9bd5;
  --djinn-green: #2ec98a; /* esmeralda fria — bem distinto do dourado do Rashid */
  --radius: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark; /* dropdowns nativos no tema escuro */
}

body {
  /* atmosfera escura "pintada": brilho frio (névoa) no topo-direita,
     leve brilho dourado quente embaixo-esquerda (eco do acento do Medivia),
     sobre um degradê profundo de carvão. */
  background:
    radial-gradient(ellipse 75% 60% at 72% 12%, rgba(72, 98, 118, 0.20), transparent 60%),
    radial-gradient(ellipse 65% 55% at 22% 85%, rgba(140, 108, 52, 0.12), transparent 62%),
    linear-gradient(180deg, #11130f 0%, #141413 45%, #0d0e0c 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  /* sticky footer: em páginas curtas, o main estica e empurra o rodapé pro fim */
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

/* Grão de ruído sutil — tira o aspecto "chapado", dá textura de pintura. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vinheta nas bordas para dar profundidade e foco no centro. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 95% at 50% 30%, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}

/* Texto dourado com gradiente — o ouro brilhante no topo descendo
   para bronze, igual à logo MIRACLE. */
.gold-text,
.nav-logo .brand-accent,
.hero h1 .accent,
.page-title span {
  background: linear-gradient(180deg, var(--gold2) 0%, var(--gold) 55%, #a07d2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── SCROLLBAR customizada (combina com o tema, sem setinhas do SO) ─── */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 150, 140, 0.25) transparent;
}
/* WebKit (Chrome, Edge, Safari) */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(154, 150, 140, 0.22);
  border-radius: 4px;
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: background-color 0.2s;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(154, 150, 140, 0.4); background-clip: padding-box; }
*::-webkit-scrollbar-button { display: none; }
*::-webkit-scrollbar-corner { background: transparent; }

/* NAVBAR */
.navbar {
  background: rgba(28, 28, 26, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo .brand-suffix { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 0.5rem; }
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg3);
}
/* "Apoiar" em destaque no topo (mesmo tratamento do rodapé): ☕ + moldura dourada. */
.nav-link.nav-support {
  color: var(--gold2);
  border: 1px solid rgba(201, 168, 78, 0.5);
  font-weight: 600;
}
.nav-link.nav-support::before { content: "☕ "; }
.nav-link.nav-support:hover {
  color: var(--gold);
  background: rgba(201, 168, 78, 0.12);
  border-color: var(--gold);
}

/* SELETOR DE IDIOMA */
.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.lang-toggle:hover { border-color: var(--border2); color: var(--text); }
.lang-flag {
  width: 20px; height: 14px; flex-shrink: 0; display: block;
  object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.lang-code { font-weight: 600; letter-spacing: 0.03em; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 5px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 200;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lang-option:hover { background: var(--bg3); color: var(--text); }

/* ── SELETOR DE SERVIDOR ─────────────────────────────────────────────────── */
.server-badge {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #141413;
  background: var(--accent, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.server-badge.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.server-badge.is-img { background: none; box-shadow: none; border-radius: 0; }
.server-badge.is-img img { width: 100%; height: 100%; object-fit: contain; }

/* Header: troca-servidor */
.server-switch { position: relative; }
.server-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 9px; background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 13px; font-family: var(--font); cursor: pointer;
  transition: border-color 0.15s;
}
.server-toggle:hover { border-color: var(--border2); }
.server-toggle-name { font-weight: 600; }
.server-caret { color: var(--text2); font-size: 10px; }
.server-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 5px;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 200;
}
.server-switch.open .server-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.server-option {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; background: transparent; border: none; border-radius: 7px;
  color: var(--text2); font-family: var(--font); cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.server-option:hover { background: var(--bg3); color: var(--text); }
.server-option.active { color: var(--text); }
.server-option.active::after { content: '✓'; margin-left: auto; color: var(--gold); font-size: 12px; }
.server-option-name { display: flex; flex-direction: column; line-height: 1.25; font-size: 13.5px; font-weight: 600; }
.server-option-ver { font-size: 11px; font-weight: 400; color: var(--text2); }

/* HOME — tela de seleção de servidor "Onde você joga?" */
.picker { min-height: 100vh; display: flex; flex-direction: column; padding: 1.5rem; }
.picker-top { display: flex; justify-content: flex-end; }
.picker-inner {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1.5rem 0 4.5rem;
}
.picker-title {
  font-size: 3.4rem; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em;
  margin-bottom: 1.15rem;
}
.picker-sub { color: var(--text2); font-size: 15.5px; max-width: 460px; margin-bottom: 3.5rem; }
.server-cards { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.server-card {
  width: 250px; padding: 1.9rem 1.5rem 1.5rem;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 18px;
  cursor: pointer; color: var(--text); font-family: var(--font);
  display: flex; flex-direction: column; align-items: center;
  transition: border-color .18s, background .18s, transform .12s, box-shadow .18s;
}
.server-card:hover {
  border-color: var(--accent); background: var(--bg3);
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5),
              0 0 40px -6px color-mix(in srgb, var(--accent) 45%, transparent);
}
.server-card:active { transform: translateY(-1px); }
.server-card-logo {
  height: 118px; width: 100%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.4rem;
}
.server-card-logo img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.55));
  transition: transform .18s, filter .18s;
}
.server-card:hover .server-card-logo img {
  transform: scale(1.05);
  filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.6)) brightness(1.07);
}
.server-card-name { font-size: 1.3rem; font-weight: 700; letter-spacing: .01em; }
.server-card-ver { margin-top: .3rem; font-size: 12px; color: var(--text2); }
.server-card-tools {
  margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--border);
  width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; font-size: 11.5px; color: var(--text2); line-height: 1.5;
}
.server-card-tools .tool-sep { opacity: .4; }
@media (max-width: 560px) {
  .picker-title { font-size: 2.4rem; }
  .server-cards { flex-direction: column; align-items: center; width: 100%; }
  .server-card { width: 100%; max-width: 320px; }
}

/* Placeholder "ferramenta em breve" */
.tool-soon {
  max-width: 520px; margin: 3rem auto; text-align: center;
  padding: 2.5rem 1.5rem; background: var(--bg2);
  border: 1px dashed var(--border2); border-radius: 16px;
}
.tool-soon-icon { font-size: 2.4rem; margin-bottom: .75rem; }
.tool-soon h2 { font-size: 1.2rem; margin-bottom: .5rem; }
.tool-soon p { color: var(--text2); font-size: 14px; line-height: 1.7; }
.tool-soon a { color: var(--gold); }

/* Aviso de dados temporários/não confirmados (calc de um server sem dados próprios ainda) */
.calc-placeholder-note {
  margin-bottom: 1.25rem; padding: .75rem 1rem;
  background: rgba(227, 200, 120, 0.08); border: 1px solid rgba(227, 200, 120, 0.3);
  border-radius: 10px; font-size: 13px; color: var(--text2); line-height: 1.6;
}
.calc-placeholder-note strong { color: var(--gold2); }

/* Selo de cupom no card do servidor (Home) */
.server-card-coupon {
  margin-top: .8rem; font-size: 11px; font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  padding: 3px 10px; border-radius: 999px;
}

/* Card do cupom de afiliado (páginas do servidor, acima do rodapé) */
.coupon-card {
  max-width: 620px; margin: 3rem auto 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  padding: 1.15rem 1.4rem;
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.22), var(--bg2) 62%);
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 14px;
  box-shadow: 0 0 30px -16px rgba(251, 191, 36, 0.5);
}

/* Coin com anel dourado + estrelas (replica a loja do Mythera) */
.coupon-coin-wrap { position: relative; flex-shrink: 0; }
.coupon-coin-ring {
  width: 74px; height: 74px; padding: 11px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.6), rgba(28, 28, 26, 0.85));
  animation: coin-glow 2.4s ease-in-out infinite alternate;
}
.coupon-coin {
  width: 40px; height: 40px; image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.7));
}
@keyframes coin-glow {
  from { box-shadow: 0 0 22px 4px rgba(251, 191, 36, 0.16), inset 0 0 14px rgba(251, 191, 36, 0.10); }
  to   { box-shadow: 0 0 34px 8px rgba(251, 191, 36, 0.30), inset 0 0 16px rgba(251, 191, 36, 0.15); }
}
.coupon-sparkle { position: absolute; color: #fde68a; pointer-events: none; line-height: 0; }
.coupon-sparkle svg { width: 100%; height: auto; display: block; }
.coupon-sparkle-a { top: -5px; right: -3px; width: 17px; animation: sparkle-twinkle 2.1s ease-in-out infinite; }
.coupon-sparkle-b { bottom: -3px; left: -4px; width: 12px; animation: sparkle-twinkle 2.1s ease-in-out infinite .9s; }
@keyframes sparkle-twinkle {
  0%, 100% { opacity: .45; transform: scale(.8) rotate(0deg); }
  50%      { opacity: 1;  transform: scale(1.12) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .coupon-coin-ring { animation: none; box-shadow: 0 0 26px 5px rgba(251, 191, 36, 0.22); }
  .coupon-sparkle-a, .coupon-sparkle-b { animation: none; opacity: .8; }
}

.coupon-body { flex: 1; min-width: 220px; }
.coupon-title { font-size: 1.05rem; margin-bottom: .45rem; }
.coupon-title strong { color: var(--gold2); }
.coupon-text { font-size: 13.5px; color: var(--text2); line-height: 1.65; }
.coupon-text strong { color: var(--text); }
.coupon-note { margin-top: .5rem; font-size: 12px; color: var(--text2); opacity: .85; }
.coupon-actions { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.coupon-copy {
  padding: 11px 16px; border-radius: 9px; cursor: pointer; font-family: var(--font);
  font-size: 13.5px; font-weight: 700; color: #1a1400; border: none;
  background: var(--gold2); transition: filter .15s, background .15s;
}
.coupon-copy:hover { filter: brightness(1.08); }
.coupon-copy.copied { background: var(--green); color: #0e1a0e; filter: none; }
.coupon-cta {
  text-align: center; padding: 10px 16px; border-radius: 9px;
  border: 1px solid var(--border2); color: var(--text); text-decoration: none;
  font-size: 13px; transition: border-color .15s, color .15s;
}
.coupon-cta:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 560px) { .coupon-actions { width: 100%; } }

/* Canto flutuante: cupom (na base/canto) + voltar-ao-topo empilhados sem sobrepor */
.corner-stack {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px;
  pointer-events: none;
}
.corner-stack > * { pointer-events: auto; }

/* Cupom flutuante */
.coupon-float {
  position: relative; width: 266px;
  padding: .9rem 1rem 1rem;
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.32), var(--bg2) 62%);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 22px -12px rgba(251, 191, 36, 0.55);
  animation: coupon-float-in .3s cubic-bezier(.16, 1, .3, 1);
}
@keyframes coupon-float-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .coupon-float { animation: none; } }
.coupon-float-body { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.coupon-float .coupon-coin-ring { width: 56px; height: 56px; padding: 8px; flex-shrink: 0; }
.coupon-float .coupon-coin { width: 34px; height: 34px; }
.coupon-float-text { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.coupon-float-title {
  display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  font-size: 14px; font-weight: 800; color: var(--gold2); letter-spacing: .01em;
}
.coupon-star { flex-shrink: 0; width: 12px; color: #fde68a; line-height: 0; }
.coupon-star svg { width: 100%; height: auto; display: block; }
.coupon-star-a { animation: sparkle-twinkle 2.1s ease-in-out infinite; }
.coupon-star-b { animation: sparkle-twinkle 2.1s ease-in-out infinite .9s; }
.coupon-float-offer { font-size: 13px; color: var(--text); line-height: 1.3; }
.coupon-float-code { font-size: 13px; color: var(--gold2); font-weight: 700; letter-spacing: .02em; }
.coupon-float-actions { display: flex; gap: 7px; margin-top: .9rem; }
.coupon-float-actions .coupon-copy { flex: 1; padding: 9px 6px; font-size: 12px; }
.coupon-float-actions .coupon-cta { flex: 1; padding: 9px 6px; font-size: 12px; text-align: center; }

/* Mobile: cupom vira barra dockada embaixo (não cobre o canto sobre o conteúdo) */
@media (max-width: 560px) {
  .corner-stack { left: 12px; right: 12px; bottom: 12px; }
  .coupon-float { width: 100%; }
}

/* OVERLAY MODAL (genérico) — usado pelo "Apoiar" */
.overlay-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(2px);
  animation: ov-backdrop-in .22s ease-out;
}
.overlay-modal {
  position: fixed; top: 50%; left: 50%; z-index: 1001;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px); max-width: 480px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 1.6rem 1.5rem 1.4rem; box-sizing: border-box;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  backface-visibility: hidden;
  animation: ov-panel-in .26s cubic-bezier(.16, 1, .3, 1);
}
.overlay-backdrop[hidden], .overlay-modal[hidden] { display: none !important; }
.overlay-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--bg3);
  color: var(--text2); font-size: 18px; line-height: 1; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.overlay-close:hover { color: var(--red); border-color: var(--red); }
.overlay-title { font-size: 1.3rem; margin-bottom: .5rem; text-align: center; color: var(--gold2); }
@keyframes ov-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ov-panel-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .overlay-backdrop, .overlay-modal { animation: none; } }
body.overlay-open { overflow: hidden; }

/* Conteúdo do Apoiar (dentro do modal) */
.apoiar-sub { color: var(--text2); font-size: 13px; line-height: 1.5; text-align: center; margin: .4rem 0 1.15rem; font-style: italic; }
.apoiar-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: stretch; }
.apoiar-card {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 14px 12px; text-decoration: none; color: var(--text);
  transition: border-color .18s, background .18s, transform .15s;
}
.apoiar-card-kofi { cursor: pointer; }
.apoiar-card-kofi:hover { border-color: #29abe0; background: rgba(41, 171, 224, 0.05); transform: translateY(-2px); }
.apoiar-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text2); margin-bottom: .55rem;
}
.apoiar-card-title { display: flex; align-items: center; gap: 8px; font-size: 1.12rem; font-weight: 700; }
.apoiar-card-kofi .apoiar-icone { color: #29abe0; }
.apoiar-card-pix .apoiar-icone { color: #32bcad; }
.apoiar-tagline { margin-top: .2rem; font-size: 13px; font-style: italic; color: var(--text2); opacity: .9; }
.apoiar-info { margin-top: .35rem; font-size: 12.5px; line-height: 1.45; color: var(--text2); }
.apoiar-info strong { color: var(--gold2); }
/* CTA e botões PIX grudam na BASE do card (margin-top:auto) → os dois cards
   ficam com os elementos de ação alinhados, mesmo com alturas de texto diferentes. */
.apoiar-cta { margin-top: auto; padding-top: .6rem; align-self: flex-end; font-size: 13px; font-weight: 700; color: #29abe0; transition: transform .15s; }
.apoiar-card-kofi:hover .apoiar-cta { transform: translateX(2px); }
.apoiar-pix-acoes { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-top: auto; padding-top: .55rem; }
.apoiar-pix-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
  background: var(--bg3); border: 1px solid rgba(201, 168, 78, 0.45); color: var(--gold2);
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.apoiar-pix-btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(201, 168, 78, 0.09); }
.apoiar-pix-btn.copied { border-color: var(--green); color: var(--green); }
.apoiar-outras { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.apoiar-outras-titulo {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); margin-bottom: .6rem;
}
.apoiar-outras-lista { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.apoiar-outras-lista li { font-size: 13px; color: var(--text2); padding-left: 1rem; position: relative; }
.apoiar-outras-lista li::before { content: '·'; position: absolute; left: .3rem; color: var(--gold); font-weight: 700; }
.apoiar-outras-lista strong { color: var(--text); }
.apoiar-closing { margin-top: 1.4rem; font-size: 13.5px; color: var(--text2); text-align: center; font-style: italic; }

/* Vista do QR (dentro do modal) */
#support-qr { text-align: center; }
.apoiar-qr-back {
  position: absolute; top: 15px; left: 15px;
  background: none; border: none; color: var(--text2);
  font-family: var(--font); font-size: 13px; cursor: pointer; transition: color .15s;
}
.apoiar-qr-back:hover { color: var(--gold); }
.apoiar-qr { display: inline-block; margin: .8rem 0 1rem; padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
.apoiar-qr img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.apoiar-pix-hint { font-size: 12px; color: var(--text2); }
@media (max-width: 460px) { .apoiar-cards { grid-template-columns: 1fr; } }

/* HERO */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}
.hero h1 span { color: var(--gold); }
.hero p { color: var(--text2); font-size: 1.1rem; margin-bottom: 2.5rem; }
.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 600px;
  margin: 0.75rem auto 0;
}
.hero-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
}
.hero-card:hover {
  border-color: var(--gold); background: var(--bg3);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
}
.hero-card-icon { height: 42px; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; }
.hero-card-icon img {
  width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s;
}
.hero-card:hover .hero-card-icon img { transform: scale(1.08); }
.hero-card h2 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.hero-card p { font-size: 13px; color: var(--text2); }

/* PAGE LAYOUT */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-title span { color: var(--gold); }
.page-title .hub-title-sep { color: var(--text2); font-weight: 400; }
.page-title-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated; /* sprite nativa → nítida */
  flex-shrink: 0;
}

/* RASHID CARD */
.rashid-card {
  background: var(--bg2);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.rashid-sprite {
  width: 64px;
  height: 46px;            /* recorta o rótulo "Rashid" embutido no topo do gif */
  object-fit: none;
  object-position: 0 -18px; /* texto: linhas 6-16, personagem: 21-57 */
  image-rendering: pixelated; /* escala inteira → nítido, sem borrão */
  flex-shrink: 0;
  margin-right: 2px;
  /* leve halo dourado atrás do personagem, casando com a borda do card */
  background: radial-gradient(ellipse 58% 60% at 50% 58%, rgba(201, 168, 78, 0.16), transparent 70%);
  border-radius: 8px;
}
.rashid-today {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rashid-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
.rashid-city { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.rashid-day { font-size: 13px; color: var(--text2); }
.rashid-week {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: auto;   /* empurra a semana pra direita da cidade do dia */
}
.rashid-day-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 5px 9px;    /* justo ao conteúdo */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg3);
  text-align: center;
}
.rashid-day-cell .day-name {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text2);
}
.rashid-day-cell .day-city { font-size: 12.5px; color: var(--text); }
.rashid-day-cell.today { border-color: var(--gold); background: rgba(200, 168, 75, 0.1); }
.rashid-day-cell.today .day-name { color: var(--gold); opacity: .8; }
.rashid-day-cell.today .day-city { color: var(--gold); font-weight: 600; }

/* SEARCH */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-field {
  position: relative;
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
}
.search-input {
  width: 100%;
  padding: 10px 34px 10px 38px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--border2); }
.search-input::placeholder { color: var(--text2); opacity: 0.55; }
.search-field:focus-within .search-icon { stroke: var(--gold); }
.search-icon {
  position: absolute;
  left: 13px;
  width: 15px;
  height: 15px;
  stroke: var(--text2);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke 0.15s;
}
.search-clear {
  position: absolute;
  right: 7px;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.search-clear:hover { color: var(--text); background: var(--bg3); }
.search-field.has-text .search-clear { display: flex; }
/* DROPDOWN customizado */
.dropdown { position: relative; }
.dd-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 180px;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.dd-toggle:hover { border-color: var(--border2); }
.dropdown.open .dd-toggle { border-color: var(--gold); background: var(--bg3); }
.dd-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-arrow {
  width: 0; height: 0;
  flex-shrink: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text2);
  transition: transform 0.18s, border-top-color 0.15s;
}
.dropdown.open .dd-arrow { transform: rotate(180deg); border-top-color: var(--gold); }

.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.dropdown.open .dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dd-option {
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
}
.dd-option:hover { background: var(--bg3); color: var(--text); }
.dd-option.selected {
  color: var(--gold);
  background: rgba(201, 168, 78, 0.1);
  font-weight: 500;
}

/* página da loot mais estreita — adapta ao conteúdo, menos sobra */
.page-loot { max-width: 920px; }

/* LOOT TABLE */
.loot-table-wrap {
  background: rgba(26, 26, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.loot-count {
  padding: 11px 16px;
  font-size: 12px;
  color: var(--text2);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
}
.loot-count strong { color: var(--text); font-weight: 600; }
.loot-table {
  width: 100%;
  border-collapse: collapse;
}
.loot-table th,
.loot-table td { text-align: center; }
/* item sempre à esquerda — trilha de sprites facilita o escaneamento */
.loot-table th[data-col="name"],
.loot-table td.item-name { text-align: left; }
/* detalhe dos NPCs empatados fica alinhado à esquerda */
.loot-table td.buyers-detail-cell, .buyers-detail td { text-align: left; }

.loot-table th {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
  background: #151513;
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.loot-table th:hover { color: var(--text); }
.loot-table th.sorted { color: var(--gold); }
.loot-table th.sorted[data-dir="desc"]::after { content: ' ▾'; }
.loot-table th.sorted[data-dir="asc"]::after  { content: ' ▴'; }
.loot-table td {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(51, 50, 45, 0.5);
}
.loot-table tbody tr:last-child td { border-bottom: none; }
.loot-table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.loot-table tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }
/* hover neutro (não nas linhas de detalhe) */
.loot-table tbody tr:not(.buyers-detail):hover td { background: rgba(255, 255, 255, 0.03); }

/* ── Facções de NPC: linha CLARAMENTE colorida (escaneável por cor, estilo
   planilha) + barra lateral viva. Bate o olho = sabe quem é. ── */
/* Rashid (dourado) */
.loot-table tbody tr.faction-rashid td { background: rgba(201, 168, 78, 0.16); }
.loot-table tbody tr.faction-rashid:not(.buyers-detail):hover td { background: rgba(201, 168, 78, 0.24); }
.loot-table tbody tr.faction-rashid td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
/* Blue Djinn (azul) */
.loot-table tbody tr.faction-blue-djinn td { background: rgba(91, 155, 213, 0.16); }
.loot-table tbody tr.faction-blue-djinn:not(.buyers-detail):hover td { background: rgba(91, 155, 213, 0.24); }
.loot-table tbody tr.faction-blue-djinn td:first-child { box-shadow: inset 4px 0 0 var(--djinn-blue); }
/* Green Djinn (esmeralda) */
.loot-table tbody tr.faction-green-djinn td { background: rgba(46, 201, 138, 0.16); }
.loot-table tbody tr.faction-green-djinn:not(.buyers-detail):hover td { background: rgba(46, 201, 138, 0.24); }
.loot-table tbody tr.faction-green-djinn td:first-child { box-shadow: inset 4px 0 0 var(--djinn-green); }

.item-name { font-weight: 600; color: var(--text); }
.item-cell { display: flex; align-items: center; gap: 11px; }
.item-sprite {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated; /* nitidez em telas HiDPI (upscale nearest) */
  flex-shrink: 0;
}
.item-sprite-missing { visibility: hidden; }
.npc-name { color: var(--text); }
.npc-rashid     { color: var(--gold);       font-weight: 600; }
.npc-blue-djinn { color: var(--djinn-blue);  font-weight: 600; }
.npc-green-djinn{ color: var(--djinn-green); font-weight: 600; }
.location-cell { color: var(--text2); font-size: 12.5px; }
.price-cell {
  font-weight: 700;
  color: var(--text);   /* neutro: o dourado fica reservado só pro Rashid */
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* foco de NPC: preço pior que outro lugar = alerta "não venda aqui" */
.price-cell.price-worse { color: var(--red); }
.price-warn {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}
.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text2);
}

/* NPC melhor preço */
.npc-best { color: var(--text); }

/* linha com NPCs empatados — a linha INTEIRA é clicável (um só gesto) */
.loot-table tr.tied-row { cursor: pointer; }
.tied-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text2);
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s;
}
.tied-cities { color: var(--text2); font-size: 12.5px; }
.tied-chevron {
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.18s;
}
/* pílula colorida por facção */
.tied-toggle.tied-rashid      { color: var(--gold);       border-color: rgba(201, 168, 78, 0.45); }
.tied-toggle.tied-blue-djinn  { color: var(--djinn-blue);  border-color: rgba(91, 155, 213, 0.45); }
.tied-toggle.tied-green-djinn { color: var(--djinn-green); border-color: rgba(95, 184, 106, 0.45); }
/* hover na linha realça o controle (só a borda, preserva a cor da facção) */
.tied-row:hover .tied-toggle { border-color: var(--border2); }
.tied-row:hover .tied-cities { color: var(--text); }
/* aberto: chevron gira */
.tied-row.open .tied-chevron { transform: rotate(180deg); }

/* linha de detalhe com os NPCs empatados */
.buyers-detail td {
  padding: 0 16px 12px !important;
  background: rgba(0, 0, 0, 0.18);
}
.buyers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}
.buyer-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
}
.chip-npc { color: var(--text); font-weight: 600; }
.chip-npc.npc-rashid      { color: var(--gold); }
.chip-npc.npc-blue-djinn  { color: var(--djinn-blue); }
.chip-npc.npc-green-djinn { color: var(--djinn-green); }
.chip-city { color: var(--text2); font-size: 11.5px; }


/* HUB de calculadoras + seta de voltar */
.calc-back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: .9rem;
  color: var(--text2); font-size: 13px; text-decoration: none;
  transition: color 0.15s;
}
.calc-back:hover { color: var(--gold); }
.calc-back-arrow { font-size: 15px; line-height: 1; transition: transform 0.15s; }
.calc-back:hover .calc-back-arrow { transform: translateX(-3px); }

/* DIVISÃO DE LOOT */
.split-intro { color: var(--text2); font-size: 13.5px; line-height: 1.6; margin-bottom: 1.25rem; max-width: 640px; }
.split-intro strong { color: var(--text); }
.split-head, .split-member {
  display: grid;
  grid-template-columns: 1.3fr 1fr 34px;
  gap: 6px;
  align-items: center;
}
.split-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text2); padding: 0 2px .6rem;
}
.split-member { margin-bottom: 8px; }
.split-member .calc-input { width: 100%; padding: 13px 12px; }
.split-balance-input { font-variant-numeric: tabular-nums; font-weight: 600; }
.split-balance-input.pos { color: var(--green); }
.split-balance-input.neg { color: var(--red); }
.split-remove {
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--text2); cursor: pointer; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s, background .15s;
}
.split-remove:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: rgba(205, 106, 90, 0.08); }
.split-remove:disabled { opacity: .3; cursor: not-allowed; }
.split-add {
  margin-top: 6px; padding: 12px 14px; width: 100%;
  border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--bg3); color: var(--text); font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.split-add:hover { border-color: var(--gold); color: var(--gold); background: rgba(227, 200, 120, 0.06); }
.result-value.loss { color: var(--red); }
.split-hero {
  margin-top: 1.25rem;
  background: var(--bg2);
  border: 1px solid rgba(227, 200, 120, 0.28);
  border-radius: 14px;
  padding: 1.4rem 1.25rem 1.2rem;
  text-align: center;
}
.split-hero-label {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text2); margin-bottom: .4rem;
}
.split-hero-value {
  font-size: 34px; font-weight: 800; line-height: 1.05;
  color: var(--gold2); font-variant-numeric: tabular-nums;
}
.split-hero.loss .split-hero-value { color: var(--red); }
.split-hero-meta {
  margin-top: .75rem; font-size: 12.5px; color: var(--text2);
  display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap;
}
.split-hero-meta strong { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.split-hero-dot { opacity: .45; }
.split-transfers {
  margin-top: 1.25rem; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem;
}
.split-transfers .calc-card-title { margin-bottom: .6rem; }
.split-transfer {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.split-transfer:last-child { border-bottom: none; }
.split-transfer .t-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(227, 200, 120, 0.1); border: 1px solid rgba(227, 200, 120, 0.25);
  font-size: 14px; font-weight: 700; color: var(--gold2);
}
.split-transfer .t-body {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 14px;
}
.split-transfer .t-from { color: var(--red); font-weight: 600; }
.split-transfer .t-to { color: var(--green); font-weight: 600; }
.split-transfer .t-verb { color: var(--text2); font-size: 12.5px; }
.split-transfer .t-amt { color: var(--gold2); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.split-summary {
  margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text2); text-align: center;
}
.split-summary strong { color: var(--text); font-weight: 600; }
.split-even {
  margin-top: 1.25rem; padding: 1rem; text-align: center;
  color: var(--green); background: rgba(46, 201, 138, 0.08);
  border: 1px solid var(--border); border-radius: 12px; font-size: 14px;
}
/* Cabeçalho da aba "Nova divisão" — intro + botão limpar */
.split-newhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.split-newhead .split-intro { margin-bottom: 1.25rem; }
.split-reset {
  flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--border2); border-radius: 8px;
  background: transparent; color: var(--text2); font-family: var(--font); font-size: 12.5px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.split-reset:hover { border-color: var(--gold); color: var(--gold); }
.tab-count { color: var(--text2); font-weight: 400; }

/* Histórico de divisões */
.split-hist-empty {
  padding: 2rem 1rem; text-align: center; color: var(--text2); font-size: 13.5px; line-height: 1.7;
  background: var(--bg2); border: 1px dashed var(--border2); border-radius: 12px;
}
#split-history:not(:empty) { margin-top: 1.75rem; }
.split-hist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.split-hist-head .calc-card-title { margin: 0; }
.split-hist-clear {
  background: none; border: none; color: var(--text2); font-size: 12px; cursor: pointer;
  font-family: var(--font); transition: color .15s;
}
.split-hist-clear:hover { color: var(--red); }
.split-hist-list { display: flex; flex-direction: column; gap: 8px; }
.split-hist-item {
  display: flex; align-items: center; gap: 12px;
  padding: .85rem 1rem; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 12px;
}
.split-hist-info { flex: 1; min-width: 0; }
.split-hist-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.split-hist-date { font-size: 12px; color: var(--text2); }
.split-hist-result { font-size: 14px; font-weight: 700; color: var(--gold2); font-variant-numeric: tabular-nums; }
.split-hist-result.neg { color: var(--red); }
.split-hist-names {
  margin-top: 3px; font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.split-hist-meta { margin-top: 2px; font-size: 11.5px; color: var(--text2); }
.split-hist-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.split-hist-load {
  padding: 7px 12px; border: 1px solid var(--border2); border-radius: 8px;
  background: transparent; color: var(--text2); font-family: var(--font); font-size: 12.5px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.split-hist-load:hover { border-color: var(--gold); color: var(--gold); }
.split-hist-del {
  width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--text2); cursor: pointer; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s, color .15s;
}
.split-hist-del:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 480px) {
  .split-head { display: none; }
}

/* TABS */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 500; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* CALC GRID */
/* página da calc mais estreita — menos espaço sobrando pro conteúdo */
.page-calc { max-width: 860px; }
.page-split { max-width: 560px; }

.calc-grid {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1rem;
}
.calc-grid > div { flex: 1 1 0; }
@media (max-width: 640px) { .calc-grid { flex-direction: column; } }
/* O card da direita (Training Weapon/Wand) preenche a altura da coluna, pra ter
   tamanho consistente entre skills — fist/shielding têm menos conteúdo e senão
   o quadro "encolheria" em relação a club/sword/axe. */
.calc-grid > div:last-child { display: flex; flex-direction: column; }
.calc-grid > div:last-child > .calc-card { flex: 1; }

.calc-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.calc-card-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text2);
  margin-bottom: .85rem;
}

/* VOC BUTTONS */
.voc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.voc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.voc-btn:hover { border-color: var(--border2); color: var(--text); }
.voc-btn.active { background: rgba(200,168,75,0.1); border-color: var(--gold); color: var(--gold); }
.voc-btn.span2 { grid-column: 1 / -1; justify-content: center; }
.voc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.voc-dot-mage { background: linear-gradient(135deg, #8b4bc8, #4bc87a); }

/* SKILL LIST — botões horizontais que preenchem a largura */
.skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-btn {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.skill-btn:hover { border-color: var(--border2); color: var(--text); }
.skill-btn.active { background: rgba(200,168,75,0.1); border-color: var(--gold); color: var(--gold); }

/* INPUTS */
.input-row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 1fr;
  gap: 8px;
  align-items: end;
}
.input-group { display: flex; flex-direction: column; gap: 4px; }
.input-label { font-size: 11px; color: var(--text2); }
.input-arrow { font-size: 12px; color: var(--text2); text-align: center; padding-bottom: 10px; }
.calc-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.calc-input:focus { border-color: var(--border2); }
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* TIER BUTTONS */
.tier-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: .75rem; }
.tier-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;            /* botões preenchem a linha por igual → wrap sempre limpo */
  min-height: 34px;          /* mesma altura com ou sem sprite → grid alinhado */
  box-sizing: border-box;
  white-space: nowrap;       /* label + badge nunca quebram pra baixo */
  padding: 5px 11px 5px 7px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.tier-btn:hover { border-color: var(--border2); color: var(--text); }
.tier-btn.active { background: rgba(200,168,75,0.1); border-color: var(--gold); color: var(--gold); }
.tier-sprite {
  width: 24px;  /* 48/2 — downscale limpo do GIF animado */
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.tier-badge { font-size: 10px; opacity: 0.7; }

.price-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: .6rem;
}
.price-suffix { font-size: 12px; color: var(--text2); }

/* ATK SPEED do equipamento (skill calc) */
.atk-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.atk-field { display: flex; flex-direction: column; gap: 5px; width: 150px; }
.atk-field .input-label { font-size: 11px; }
.atk-field .dropdown { width: 100%; }
.atk-field .dd-toggle { min-width: 0; padding: 8px 11px; font-size: 13px; }
.price-hint { font-size: 11px; color: var(--text2); margin-top: 4px; }
.toggle-row { display: flex; align-items: center; gap: 9px; margin-top: .75rem; }
.toggle-row label { font-size: 13px; color: var(--text2); cursor: pointer; transition: color 0.15s; }
.dummy-hint { font-size: 11px; color: var(--text3, var(--text2)); opacity: .75; }
.toggle-row:has(:checked) .dummy-hint { color: inherit; }
.toggle-row:has(:checked) label { color: var(--gold); }
/* checkbox customizado no tema (o nativo destoava) */
.toggle-row input[type=checkbox] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.toggle-row input[type=checkbox]:hover { border-color: var(--gold); }
.toggle-row input[type=checkbox]:checked { background: var(--gold); border-color: var(--gold); }
.toggle-row input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: 4px;
  height: 8px;
  border: solid #14130f;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* prompt quando falta a % — borda tracejada sinaliza "aguardando input" */
.result-prompt {
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed var(--border2);
  border-radius: 12px;
  padding: 1.6rem 1.25rem;
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}
.result-prompt strong { color: var(--gold); font-weight: 600; }

/* Custo total sem preço informado: mantém o card, troca o número por instrução */
.result-value.cost-empty {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.4;
}

/* RESULT CARDS */
.result-grid {
  display: grid;
  gap: 8px;
  margin-top: 1rem;
}
.result-grid.two { grid-template-columns: 1fr 1fr; }
.result-grid.three { grid-template-columns: repeat(3, 1fr); }
.result-grid.four { grid-template-columns: 1fr 1fr; }
@media (max-width: 500px) {
  .result-grid.three { grid-template-columns: 1fr 1fr; }
  .result-grid.four { grid-template-columns: 1fr; }
}
.result-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1rem;
}
.result-card.highlight { border-color: var(--gold); background: rgba(200,168,75,0.06); }
.result-card.gold-card { border-color: #8a6b20; background: rgba(200,168,75,0.08); }
.result-label { font-size: 11px; color: var(--text2); margin-bottom: 4px; }
.result-card.highlight .result-label { color: var(--gold); opacity: .8; }
.result-card.gold-card .result-label { color: #c8a84b; opacity: .8; }
.result-value { font-size: 1.25rem; font-weight: 600; color: var(--text); }
.result-card.highlight .result-value { color: var(--gold); }
.result-card.gold-card .result-value { color: var(--gold2); }
.result-sub { font-size: 12px; color: var(--text2); margin-top: 5px; }
.result-sub .sub-2 { display: block; margin-top: 6px; font-size: 11px; }
.result-sub .faster { color: var(--green); font-weight: 600; }
.result-sub .slower { color: #d9705b; font-weight: 600; }
.result-sub .leftover-ok { color: var(--green); }
.info-i { cursor: help; opacity: .55; font-size: 11px; margin-left: 1px; }
.info-i:hover { opacity: .9; }
/* Aviso do custo do dummy (nerf 80+): tom avermelhado de "atenção", casa com .slower */
.dummy-callout {
  margin-top: .75rem;
  padding: .7rem .9rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text2);
  background: rgba(217, 112, 91, 0.08);
  border: 1px solid rgba(217, 112, 91, 0.28);
  border-radius: 8px;
}
.dummy-callout strong { color: var(--text); font-weight: 600; }
.result-card.highlight .result-sub { color: var(--gold); opacity: .7; }
.result-card.gold-card .result-sub { color: #c8a84b; opacity: .7; }

.result-summary {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-top: .75rem;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
.result-summary strong { color: var(--text); font-weight: 500; }
.result-summary-title {
  display: block; margin-bottom: .4rem;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; color: var(--gold);
}
/* RESULTADO em frases curtas: uma lead + linhas rotuladas (leitura mais leve) */
.result-lead { margin-bottom: .5rem; }
.result-line { margin-top: .3rem; font-size: 12.5px; line-height: 1.5; }
.result-line .rl-label { color: var(--text2); opacity: .8; }
.no-calc { padding: .5rem 0; font-size: 13px; color: var(--text2); }
.sep { height: 1px; background: var(--border); margin: .85rem 0; }

/* ─── RODAPÉ compartilhado ─── */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-partners { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.footer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text2);
}
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.partner-logos img { height: 40px; border-radius: 6px; opacity: .85; transition: opacity .15s; }
.partner-logos a:hover img { opacity: 1; }
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem; }
.footer-nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s;
}
.footer-nav a:hover { color: var(--gold); }
/* "Apoiar" em destaque: pílula dourada com ☕ (inspirado no Tibiadle). */
.footer-support {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 13px;
  border: 1px solid rgba(201, 168, 78, 0.5);
  border-radius: 20px;
  color: var(--gold2) !important;
  font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.footer-support::before { content: "☕"; font-size: 12px; }
.footer-support:hover {
  background: rgba(201, 168, 78, 0.12);
  border-color: var(--gold);
  color: var(--gold) !important;
}
.footer-credit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  font-size: 12.5px; color: var(--text2);
}
.footer-credit .brand-accent { color: var(--gold); font-weight: 700; }
.footer-credit .brand-suffix { color: var(--text); font-weight: 700; }
.footer-sep { opacity: .45; }
.footer-discord { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); }
.footer-discord svg { color: #5865f2; flex-shrink: 0; }

/* ─── Botão "voltar ao topo" (flutuante, global) ─── */
.scroll-top {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: rgba(28, 28, 26, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s, border-color .15s, color .15s, background .15s;
  z-index: 300;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { border-color: var(--gold); color: var(--gold); background: var(--bg3); }
.scroll-top-arrow {
  width: 0;
  height: 0;
  margin-top: -2px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid currentColor;
}
