/* ===== BlowFly City — protótipo de mapa jogável ===== */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

:root {
  --bg-deep:   #0d1b2a;
  --bg-panel:  #1b2a3a;
  --accent:    #2dd4bf;
  --accent-2:  #f59e0b;
  --pink:      #c98bb9;
  --text:      #e8eef2;
  --shadow:    rgba(0,0,0,.45);
}

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Press Start 2P', system-ui, sans-serif;
  overflow: hidden;
}

/* render pixel-art crocante (sem blur ao escalar) */
img { image-rendering: pixelated; image-rendering: crisp-edges; }

#app { display: block; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; gap: 12px;
  background: none;
  border: none;
  box-shadow: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 600;
  align-items: flex-start;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.logo { display: none; }
.logo span { color: var(--accent); }
.logo b {
  font-size: 8px; background: #e0245e; color:#fff;
  padding: 3px 5px; border-radius: 3px; vertical-align: middle; margin-left: 4px;
}
.controls { display: flex; gap: 8px; }

.btn {
  font-family: inherit; font-size: 9px; cursor: pointer; color: var(--text);
  background: var(--bg-panel); border: 2px solid #000;
  padding: 9px 11px; border-radius: 4px;
  box-shadow: 0 3px 0 #000; transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { background: #25405a; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 #000; }
.btn.on { background: var(--accent); color: #06302b; }
.icon-btn { padding: 9px 12px; font-size: 13px; }

.volume-ctrl {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-panel); border: 2px solid #000; border-radius: 4px;
  padding: 6px 12px 6px 6px; box-shadow: 0 3px 0 #000;
}
.volume-ctrl .btn { box-shadow: none; padding: 6px 8px; }
.volume-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 70px; height: 4px;
  background: #0d1b2a; border-radius: 2px; cursor: pointer; outline: none;
}
.volume-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid #000; cursor: pointer;
}
.volume-ctrl input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid #000; cursor: pointer;
}

/* ---------- Stage / mapa ---------- */
#stageWrap {
  position: fixed; inset: 0; overflow: hidden; padding: 0; display: block;
  cursor: grab; touch-action: none;
  /* Sem isto, arrastar pra dar pan vira SELEÇÃO nativa do navegador — aparecem uns
     retângulos azuis por cima dos prédios (a cor de seleção pegando o texto das tags).
     user-select:none mata isso; herda pro #stage e .building. tap-highlight some o flash
     azul no toque/mobile. (Modais ficam fora do #stageWrap, então continuam selecionáveis
     pra copiar wallet/etc.) */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#stageWrap.panning { cursor: grabbing; }
#stageWrap.editing-mode { cursor: default; }
#stage {
  position: absolute; top: 50%; left: 50%;
  transform: translate(calc(-50% + var(--pan-x, 0px)), calc(-50% + var(--pan-y, 0px)));
  aspect-ratio: 1024 / 600;
  /* "cover" o viewport mantendo a proporção (prédios ficam alinhados) */
  width: max(100vw, calc(100vh * 1024 / 600));
  background-image: url('assets/mapa_dia.png');
  background-size: 100% 100%;
  border: none; border-radius: 0; box-shadow: none;
  transition: filter .4s ease;
}

/* ---------- Prédios ---------- */
.building {
  position: absolute;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.35));
}
.building img { width: 100%; height: auto; display: block; pointer-events: none; transition: filter .2s ease; }
/* imagens IA (suaves) ficam melhores sem o nearest-neighbor */
.building.smooth img { image-rendering: auto; }

/* prédios sem função ainda: bloqueados — dessaturados, sem levantar no hover */
.building.locked { cursor: not-allowed; }
.building.locked img { filter: grayscale(90%) brightness(.72); }
.building.locked:hover img { filter: grayscale(60%) brightness(.8); }
.building.locked:hover { transform: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.45)); }
.building.locked .tag { border-color: #b9432f; }
.building.locked:hover .tag::after { content: ' 🔒'; }
/* sacode ao clicar num prédio bloqueado ("rejeitado") */
.building.rejected { animation: bf-shake .45s ease; }
@keyframes bf-shake {
  0%,100% { transform: translateX(0); }
  15% { transform: translateX(-7px) rotate(-1.5deg); }
  30% { transform: translateX(6px) rotate(1.5deg); }
  45% { transform: translateX(-5px) rotate(-1deg); }
  60% { transform: translateX(4px) rotate(1deg); }
  75% { transform: translateX(-2px); }
}
.building:not(.locked):hover {
  transform: translateY(-7px) scale(1.025);
  filter: drop-shadow(0 10px 8px rgba(0,0,0,.45)) drop-shadow(0 0 6px var(--accent));
}
.building .tag {
  position: absolute; left: 50%; top: -14px;
  transform: translate(-50%, -100%);
  background: #000d; color: #fff; font-size: 8px; white-space: nowrap;
  padding: 5px 7px; border-radius: 4px; border: 1px solid var(--accent);
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 999;
}
.building:hover .tag { opacity: 1; }

/* peça de chão (praça): sem levantar no hover, só um leve brilho */
.building.flat:hover {
  transform: none;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)) drop-shadow(0 0 5px var(--accent));
}

/* modo edição */
#stage.editing .building { cursor: grab; outline: 1px dashed #ffffff55; }
#stage.editing .building.dragging { cursor: grabbing; outline: 2px solid var(--accent-2); opacity: .85; }
#stage.editing .building:hover { transform: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }

/* ---------- Painel de edição ---------- */
#editPanel {
  position: fixed; right: 14px; bottom: 14px; width: 320px; max-height: 60vh;
  background: var(--bg-panel); border: 2px solid #000; border-radius: 6px;
  box-shadow: 0 8px 24px var(--shadow); padding: 12px; z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
}
#editPanel h3 { font-size: 10px; color: var(--accent-2); }
#editPanel p { font-size: 8px; line-height: 1.7; color: #b9c6d2; }
.edit-sep { width: 100%; border: none; border-top: 1px dashed #000; margin: 2px 0; }
#manageBoostsBtn { background: #f4820d; color: #1a1200; }
#editJSON {
  flex: 1; width: 100%; min-height: 150px; resize: vertical;
  font-family: ui-monospace, monospace; font-size: 11px;
  background: #0d1b2a; color: #9fe; border: 1px solid #000; border-radius: 4px; padding: 8px;
}
.hidden { display: none !important; }

/* ---------- Modal ---------- */
#modalOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: grid; place-items: center; z-index: 10000; padding: 16px;
  backdrop-filter: blur(2px);
}
#modal {
  width: 100%; max-width: 680px; max-height: 88vh; overflow: auto;
  background: linear-gradient(160deg, #b06a9e, #8a4f7d);
  border: 3px solid #000; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  padding: 22px; position: relative;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* scrollbar temática p/ QUALQUER modal (antes era a barra cinza padrão do navegador) */
#modal { scrollbar-width: thin; scrollbar-color: var(--accent) rgba(0,0,0,.35); }
#modal::-webkit-scrollbar { width: 10px; }
#modal::-webkit-scrollbar-track { background: rgba(0,0,0,.35); border-radius: 6px; }
#modal::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; border: 2px solid #000; }
#modal::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

#modal .close {
  position: absolute; top: 12px; right: 14px; font-size: 12px; color: #fff;
  background: none; border: none; cursor: pointer;
}
#modal h2 { font-size: 18px; margin-bottom: 6px; text-shadow: 2px 2px 0 #0006; }
#modal .sub { font-size: 9px; color: #ffe9f7; margin-bottom: 16px; line-height: 1.6; }

.modal-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.modal-hero img { width: 150px; height: auto; filter: drop-shadow(0 6px 6px #0006); }
.modal-hero .desc { font-size: 9px; line-height: 1.8; color: #fff; }

.modal-card {
  background: #0006; border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.modal-card h4 { font-size: 11px; color: var(--accent-2); margin-bottom: 10px; }

/* grade de prêmios (gacha) */
.prizes { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.prize {
  aspect-ratio: 1; border-radius: 50%; background: #2a2a35;
  display: grid; place-items: center; font-size: 14px; border: 2px solid #000;
}
.prize.claimed { font-size: 6px; color: #aaa; }

.price-line { display: flex; align-items: baseline; gap: 8px; }
.price-line .big { font-size: 26px; color: #fff; }
.price-line .unit { font-size: 9px; color: var(--accent); }

.history-line { font-size: 8px; line-height: 1.9; color: #ffd; border-bottom: 1px solid #ffffff22; padding: 6px 0; }

.cta {
  font-family: inherit; width: 100%; font-size: 13px; cursor: pointer;
  background: var(--accent); color: #06302b; border: 2px solid #000;
  padding: 14px; border-radius: 8px; box-shadow: 0 4px 0 #000;
  transition: transform .08s, box-shadow .08s;
}
.cta:hover { background: #34e7d3; }
.cta:active { transform: translateY(4px); box-shadow: 0 0 0 #000; }

@media (max-width: 640px) {
  .logo { font-size: 10px; }
  .prizes { grid-template-columns: repeat(5, 1fr); }
  .modal-hero { flex-direction: column; text-align: center; }
}

/* ===== Work modal (staking) — theme via CSS vars, default = BF Burger ===== */
#modal.staking-modal {
  --wk-bg:      #cf2a1c;  /* fundo do modal */
  --wk-panel:   #b21d12;  /* colunas */
  --wk-dark:    #1b0907;  /* headers / caixas escuras */
  --wk-accent:  #f4c20d;  /* texto de destaque (headers, total) */
  --wk-work:    #7ed957;  /* botão WORK / cor de sucesso */
  --wk-claim:   #f4c20d;  /* botão CLAIM */
  --wk-claim-hover: #ffd21f;
  --wk-claim-text:  #3a2400;
  --wk-worker-bg:   #c8b291; /* card do worker */
  --wk-worker-text: #1b0907;
  --wk-muted:   #ffd9c9;  /* textos secundários (empty/status/wallet) */

  background: var(--wk-bg);
  border: 4px solid #000;
  max-width: 1060px;
  padding: 16px;
}
.bf-stake {
  display: grid; grid-template-columns: 1fr 1fr 0.85fr; gap: 14px;
}
.bf-col {
  background: var(--wk-panel); border: 3px solid #000; border-radius: 8px;
  padding: 12px; display: flex; flex-direction: column; gap: 12px;
}
.bf-h {
  background: var(--wk-dark); color: var(--wk-accent); border: 2px solid #000; border-radius: 6px;
  padding: 11px 8px; text-align: center; font-size: 13px; letter-spacing: 1px;
}
/* Botão 💰 pequeno no header da tela de trabalho (abre o popup de salário) */
.bf-salary-btn {
  font-family: inherit; font-size: 9px; cursor: pointer; margin-left: 6px;
  background: #f4c20d; color: #1a1200; border: 2px solid #000; border-radius: 5px;
  padding: 2px 6px; box-shadow: 0 2px 0 #000; vertical-align: middle;
}
.bf-salary-btn:active { transform: translateY(2px); box-shadow: 0 0 0 #000; }
/* mostra ~4 NFTs (2 col x 2 linhas) e rola o resto — evita a coluna estourar */
.bf-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start;
  max-height: 340px; overflow-y: auto; padding-right: 4px;
}
.bf-grid::-webkit-scrollbar { width: 8px; }
.bf-grid::-webkit-scrollbar-thumb { background: #00000055; border-radius: 4px; }

.bf-worker {
  background: var(--wk-worker-bg); border: 2px solid #000; border-radius: 6px;
  padding: 6px; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.bf-pfp {
  width: 100%; aspect-ratio: 1; border: 2px solid #000; border-radius: 4px;
  display: grid; place-items: center; font-size: 30px;
  background: hsl(var(--h, 200) 45% 58%);
}
.bf-name { font-size: 8px; color: var(--wk-worker-text); }
.bf-boost-badge {
  display: inline-block; font-size: 6px; color: #1a1200; background: #f4c20d;
  border: 1px solid #000; border-radius: 3px; padding: 1px 3px; margin-left: 2px; vertical-align: middle;
}
.bf-mini {
  font-family: inherit; font-size: 8px; cursor: pointer; width: 100%;
  padding: 7px 4px; border: 2px solid #000; border-radius: 5px;
  background: var(--wk-claim); color: var(--wk-claim-text); box-shadow: 0 3px 0 #000; transition: transform .07s, box-shadow .07s;
}
.bf-mini.work { background: var(--wk-work); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.bf-mini.work span { font-size: 7px; opacity: .85; }
.bf-mini:hover { filter: brightness(1.07); }
.bf-mini:active { transform: translateY(3px); box-shadow: 0 0 0 #000; }

.bf-bank { gap: 14px; }
.bf-bankbox {
  background: var(--wk-dark); color: #fff; border: 2px solid #000; border-radius: 6px;
  padding: 13px; text-align: center; font-size: 13px;
}
.bf-claim {
  font-family: inherit; font-size: 16px; cursor: pointer;
  background: var(--wk-claim); color: var(--wk-claim-text); border: 3px solid #000; border-radius: 8px;
  padding: 16px; box-shadow: 0 4px 0 #000; transition: transform .08s, box-shadow .08s;
}
.bf-claim:hover { background: var(--wk-claim-hover); }
.bf-claim:active { transform: translateY(4px); box-shadow: 0 0 0 #000; }
.bf-total {
  background: var(--wk-dark); color: var(--wk-accent); border: 2px solid #000; border-radius: 6px;
  padding: 13px; text-align: center; font-size: 10px; line-height: 1.9;
}
.bf-total b { font-size: 16px; color: #fff; }
.bf-bankimg {
  width: 100%; height: auto; border: 2px solid #000; border-radius: 6px;
  background: var(--wk-dark); image-rendering: auto; margin-top: auto;
}

.bf-pfp img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.bf-empty { font-size: 8px; color: var(--wk-muted); line-height: 1.8; grid-column: 1 / -1; }
.bf-reward { font-size: 7px; color: var(--wk-work); text-align: center; }
.bf-wallet { font-size: 8px; color: var(--wk-muted); text-align: center; margin-top: auto; }
.bf-wallet a { color: var(--wk-accent); cursor: pointer; text-decoration: underline; }

.bf-status { margin-top: 10px; min-height: 14px; font-size: 9px; color: var(--wk-accent); text-align: center; }
.bf-status.err { color: var(--wk-muted); }

.bf-connect { text-align: center; padding: 26px 16px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.bf-connect p { font-size: 10px; line-height: 1.9; color: #fff; max-width: 460px; }
.bf-connect .bf-claim { max-width: 360px; width: 100%; }

@media (max-width: 720px) {
  .bf-stake { grid-template-columns: 1fr; }
}

/* ---- Temas por profissão (BF Burger = padrão acima, sem classe extra) ---- */

/* Hospital — clínico, azul-petróleo + branco + vermelho de emergência */
#modal.staking-modal.theme-hospital {
  --wk-bg:      #123a52;
  --wk-panel:   #1c5378;
  --wk-dark:    #08202f;
  --wk-accent:  #8fe3ff;
  --wk-work:    #35c97a;
  --wk-claim:   #e64b4b;
  --wk-claim-hover: #ff6363;
  --wk-claim-text:  #fff;
  --wk-worker-bg:   #eaf3f7;
  --wk-worker-text: #0c2a3a;
  --wk-muted:   #bfe3f2;
}

/* Police — noturno, azul-marinho quase preto + dourado de distintivo */
#modal.staking-modal.theme-police {
  --wk-bg:      #10182a;
  --wk-panel:   #1b2740;
  --wk-dark:    #05080f;
  --wk-accent:  #e8c766;
  --wk-work:    #4f8ef7;
  --wk-claim:   #e8c766;
  --wk-claim-hover: #f5d685;
  --wk-claim-text:  #241a02;
  --wk-worker-bg:   #cfd7e6;
  --wk-worker-text: #10182a;
  --wk-muted:   #9fb0cf;
}

/* BlowFly Mall — retail premium, roxo profundo + dourado */
#modal.staking-modal.theme-mall {
  --wk-bg:      #2b1a4a;
  --wk-panel:   #402568;
  --wk-dark:    #170f2c;
  --wk-accent:  #f0c869;
  --wk-work:    #8b5cf6;
  --wk-claim:   #e0b64d;
  --wk-claim-hover: #f2cc6c;
  --wk-claim-text:  #2b1a02;
  --wk-worker-bg:   #ede3fb;
  --wk-worker-text: #2b1a4a;
  --wk-muted:   #d3bdf0;
}

/* ===== Tela inicial (gate de holder) — arte de fundo + PRESS START ===== */
#landing {
  position: fixed; inset: 0; z-index: 20000;
  display: grid; place-items: center;
  background: #0d1b2a url('assets/landing-bg.png?v=2026-07-04-3') center center / cover no-repeat;
}
#landing::after { /* leve vinheta/scanline pixel */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 2px, transparent 2px 4px);
  opacity: .3;
}
/* container posicionado sobre o "> PRESS START <" da arte (ajuste --start-y se precisar) */
.landing-box {
  --start-y: 74%;
  position: absolute; left: 50%; top: var(--start-y); transform: translate(-50%, -50%);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: none; border: none; box-shadow: none; padding: 0; width: auto; max-width: 92vw;
}
.landing-logo { display: none; } /* a arte já traz o logo */
/* botão "> PRESS START <": cobre o texto da arte e vira o Connect Wallet */
.landing-btn {
  font-family: inherit; font-size: 21px; letter-spacing: 1px; cursor: pointer;
  color: #ffd83d;
  background: rgba(8,10,20,.72); border: 2px solid #000; border-radius: 10px;
  padding: 12px 24px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(255,216,61,.55);
  box-shadow: 0 4px 0 #000, 0 0 26px rgba(0,0,0,.5);
  animation: bf-blink 1.1s steps(1, end) infinite;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.landing-btn:hover:not(:disabled) { filter: brightness(1.15); animation: none; }
.landing-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 #000; }
.landing-btn:disabled { color: #b9b28c; cursor: default; animation: none; }
@keyframes bf-blink { 0%, 62% { opacity: 1; } 63%, 100% { opacity: .32; } }
.landing-sub { font-size: 9px; line-height: 1.9; color: #f2e6c0; text-shadow: 2px 2px 0 #000, 0 0 6px #000; }
.landing-status { min-height: 14px; font-size: 9px; color: #ffe0b0; text-shadow: 2px 2px 0 #000; }
.landing-status a { color: #34e7d3; cursor: pointer; text-decoration: underline; }
.landing-foot { font-size: 8px; color: #e7dbf5; text-shadow: 1px 1px 0 #000; margin-top: 2px; }

/* ===== Card de perfil (topo direito) ===== */
.profile-wrap {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px;
}
.profile-card {
  display: flex; align-items: center; gap: 10px; position: relative;
  background: #0c1622; border: 2px solid #000; border-radius: 8px;
  padding: 7px 10px 7px 7px; box-shadow: 0 3px 0 #000;
  cursor: pointer;
}
.pc-avatar {
  width: 46px; height: 46px; border: 2px solid #000; border-radius: 6px;
  background: #23384a; object-fit: cover; image-rendering: auto;
}
.pc-info { display: flex; flex-direction: column; gap: 2px; }
.pc-welcome { font-size: 7px; color: #9fb3c2; }
.pc-name { font-size: 12px; color: #fff; }
.pc-stats { display: flex; gap: 12px; margin-top: 3px; }
.pc-stats span { font-size: 6px; color: #9fb3c2; line-height: 1.6; }
.pc-stats b { font-size: 10px; color: var(--accent-2); }
.pc-shield {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  box-sizing: border-box; width: 100%;
  font-size: 6px; line-height: 1.5; color: #7fe7c4; text-align: center;
  background: #0c1622; border: 2px solid #000; border-radius: 6px;
  padding: 5px 8px; box-shadow: 0 3px 0 #000;
}
.pc-shield.hidden { display: none; }
.pc-disconnect {
  font-family: inherit; font-size: 7px; cursor: pointer; align-self: flex-start;
  background: #e0245e; color: #fff; border: 2px solid #000; border-radius: 5px;
  padding: 5px 7px; box-shadow: 0 2px 0 #000;
}
.pc-disconnect:active { transform: translateY(2px); box-shadow: 0 0 0 #000; }

/* ===== Logo do jogo (topo central) ===== */
.game-logo {
  position: fixed; top: 6px; left: 50%; transform: translateX(-50%);
  height: 56px; width: auto; z-index: 500; pointer-events: none;
  image-rendering: auto;
}

/* status "o que a NFT está fazendo" (perfil) */
.pf-doing { font-size: 7px; line-height: 1.7; padding: 6px; border-radius: 5px; border: 2px solid #000; }
.pf-doing b { color: #fff; }
.pf-doing.study { background: #2a4763; color: #cfe0ec; }
.pf-doing.work { background: #1d5c2a; color: #d7ffd9; }
.pf-doing.idle { background: #3a536b; color: #9fb3c2; }
.pf-timer { font-family: ui-monospace, monospace; color: var(--accent-2); }

/* ===== College Fly (educação) ===== */
#modal.college-modal {
  background: linear-gradient(160deg, #234a6b, #16304a);
  border: 4px solid #000; max-width: 960px; padding: 18px;
}
/* header fixo no topo do modal (antes rolava junto e sumia; usa margem negativa
   igual ao padding do modal p/ ficar rente às bordas ao colar no topo) */
.col-head {
  position: sticky; top: -18px; z-index: 5;
  margin: -18px -18px 16px; padding: 18px 18px 14px;
  background: #1d3c59; border-bottom: 3px solid #000;
}
.col-head .bf-h {
  background: #0e2032; color: var(--accent); border: 2px solid #000; border-radius: 6px;
  padding: 11px 8px; text-align: center; font-size: 13px; letter-spacing: 1px; flex: 1;
}
.col-head-row { display: flex; align-items: center; gap: 8px; }
.col-head-row #col-sal-toggle { width: auto; flex-shrink: 0; padding: 7px 10px; font-size: 8px; }
.col-sub { font-size: 10px; line-height: 1.9; color: #a9c4d8; margin-top: 8px; }
.col-salaries {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
  background: #0e2032; border: 2px solid #000; border-radius: 8px; padding: 10px;
}
.col-sal-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 9px; padding: 4px 2px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.col-sal-row:last-child { border-bottom: none; }
.col-sal-label { color: #cfe0ec; }
.col-sal-amount { color: var(--accent-2); font-size: 9px; }
.col-sal-amount small { color: #8ea6b8; font-size: 6px; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.col-card {
  background: #12283c; border: 2px solid #000; border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.col-top { display: flex; align-items: center; gap: 12px; }
.col-pfp {
  width: 68px; height: 68px; border: 2px solid #000; border-radius: 8px;
  background: #2a4763; display: grid; place-items: center; font-size: 30px; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 3px 0 #000;
}
.col-pfp img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.col-id { font-size: 13px; color: #fff; }

.col-banner {
  font-size: 9px; line-height: 1.6; color: #d7ffd9; background: #1d5c2a;
  border: 2px solid #000; border-radius: 6px; padding: 8px;
}
.col-banner b { color: #fff; }

.col-programs { display: flex; flex-direction: column; gap: 7px; }
.col-prog {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #0e2032; border: 2px solid #000; border-radius: 6px; padding: 9px 11px;
}
.col-prog.earned  { background: #123a24; }
.col-prog.locked  { opacity: .55; }
.col-prog.studying { background: #143a55; outline: 2px solid var(--accent); }
.col-prog-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.col-prog-name { font-size: 10px; color: #fff; }
.col-prog-meta { font-size: 7px; color: #8ea6b8; }
.col-prog-action { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.col-tag { font-size: 7px; padding: 5px 7px; border-radius: 4px; border: 1px solid #000; white-space: nowrap; }
.col-tag.done   { background: #2f9e54; color: #eafff0; }
.col-tag.locked { background: #2a3a4a; color: #9fb3c2; }
.col-tag.muted  { background: #3a536b; color: #cfe0ec; }

/* diplomas — badges do perfil (SEM regra alguma antes; por isso ficavam colados/ilegíveis) */
.col-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.col-badge {
  font-size: 7px; padding: 5px 8px; border-radius: 10px; border: 1px solid #000;
  background: #2f9e54; color: #eafff0; white-space: nowrap;
}
.col-badge.muted { background: #2a3a4a; color: #8ea6b8; }

.bf-mini.enroll { background: var(--accent); color: #06302b; width: auto; padding: 7px 12px; }
.bf-mini.grad { background: #7ed957; color: #123d10; width: auto; padding: 7px 12px; }
.col-timer {
  font-family: ui-monospace, monospace; font-size: 11px; color: var(--accent-2);
  background: #0b1a28; border: 2px solid #000; border-radius: 5px; padding: 5px 7px; white-space: nowrap;
}
.bf-mini:disabled { background: #4b5c66; color: #8ea6b8; cursor: default; box-shadow: 0 3px 0 #000; }
.bf-mini.ghost { background: transparent; color: #cfe0ec; box-shadow: none; }
.bf-mini.danger { background: #e0245e; color: #fff; }

/* ===== Tutorial (BlowFly City) — hub estilo Habbo, abas por camada ===== */
#modal.tutorial-modal {
  background: linear-gradient(160deg, #1e3a52, #0d1b2a);
  border: 4px solid #000; max-width: 600px; padding: 18px;
}
.tut2-head { text-align: center; margin-bottom: 14px; }
.tut2-head .bf-h { font-size: 13px; }
.tut2-hint { font-size: 9px; color: #8ea6b8; margin-top: 6px; }

/* barra de abas (categorias) */
.tut-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tut-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 4px; cursor: pointer; font-family: inherit;
  background: #0e2032; color: #9fb3c4; border: 2px solid #000; border-radius: 8px;
  box-shadow: 0 3px 0 #000; transition: transform .05s;
}
.tut-tab:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.tut-tab-ic { font-size: 22px; line-height: 1; }
.tut-tab-lb { font-size: 8px; letter-spacing: .5px; }
.tut-tab.on {
  background: var(--tc); color: #10151b; border-color: #000;
  box-shadow: 0 3px 0 #000, 0 0 10px var(--tc);
}
.tut-tab.on .tut-tab-lb { font-weight: bold; }

/* painel da categoria ativa */
.tut-panel {
  background: #12283c; border: 3px solid #000; border-radius: 12px;
  padding: 16px; border-top: 4px solid var(--tc);
}
.tut-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tut-panel-ic {
  font-size: 30px; line-height: 1; width: 52px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0e2032; border: 2px solid #000; border-radius: 10px;
}
.tut-panel-title { font-size: 14px; color: var(--tc); text-shadow: 1px 1px 0 #0006; }
.tut-panel-sub { font-size: 9px; color: #cfe0ec; line-height: 1.6; margin-top: 4px; }

/* cards de info dentro do painel */
.tut-cards { display: flex; flex-direction: column; gap: 9px; max-height: 46vh; overflow-y: auto; }
.tut-card {
  display: flex; gap: 11px; align-items: flex-start;
  background: #0e2032; border: 2px solid #000; border-radius: 8px; padding: 10px 11px;
}
.tut-card-ic { font-size: 18px; line-height: 1.2; flex-shrink: 0; }
.tut-card-t { font-size: 10px; color: #fff; display: block; margin-bottom: 4px; }
.tut-card-d { font-size: 9px; line-height: 1.9; color: #b9c9d6; }
.tut-card-d b { color: var(--tc); }

/* ===== Casino (raffles + auctions) — feltro verde + dourado ===== */
#modal.casino-modal {
  background: linear-gradient(160deg, #123524, #0a2117);
  border: 4px solid #000; max-width: 1000px; padding: 18px;
}
.casino-modal .bf-h { background: #071a11; color: #ffd700; border: 2px solid #000; border-radius: 6px; padding: 11px 8px; text-align: center; font-size: 13px; }
.casino-modal .hub-sub { color: #cdeedd; }
.casino-modal .hub-choice { background: #1b4a33; }
.casino-modal .hub-choice:hover { background: #226044; }
.casino-modal .hub-choice b { color: #ffd700; }
.casino-modal .hub-choice small { color: #a8d8bf; }

.cas-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.cas-areas, .cas-tabs { display: flex; gap: 8px; }
.cas-areabtn, .cas-tabbtn {
  font-family: inherit; font-size: 12px; cursor: pointer; color: #cdeedd;
  background: #0d2b1d; border: 2px solid #000; border-radius: 8px; padding: 12px 16px;
  box-shadow: 0 3px 0 #000; transition: transform .07s;
}
.cas-tabbtn { font-size: 11px; }
.cas-areabtn:hover, .cas-tabbtn:hover { background: #124430; }
.cas-areabtn.on, .cas-tabbtn.on { background: #ffd700; color: #3a2b00; }
.cas-areabtn:active, .cas-tabbtn:active { transform: translateY(3px); box-shadow: 0 0 0 #000; }

.cas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.cas-card {
  display: flex; flex-direction: column; background: #1b4a33; border: 3px solid #000; border-radius: 14px;
  overflow: hidden; box-shadow: 0 5px 0 rgba(0,0,0,.4); transition: transform .12s, box-shadow .12s;
}
.cas-card:hover { transform: translateY(-4px); box-shadow: 0 9px 0 rgba(0,0,0,.4); }
.cas-card.ended { background: #16382a; }
.cas-img {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-bottom: 3px solid #000;
  overflow: hidden; background: linear-gradient(150deg, #0f3222, #081a12); display: grid; place-items: center;
}
.cas-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; display: block; }
.cas-ph { font-size: 64px; opacity: .85; }
.cas-chip {
  position: absolute; top: 8px; right: 8px; font-size: 9px; color: #3a2b00;
  background: #ffd700; border: 2px solid #000; border-radius: 20px; padding: 4px 9px;
}
.cas-you-badge {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; letter-spacing: .5px;
  background: #ffd700; color: #3a2b00; padding: 6px 4px; text-align: center;
}
.cas-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; padding: 12px; }
.cas-name { font-size: 13px; color: #fff; line-height: 1.4; }
.cas-desc { font-size: 9px; color: #a8d8bf; line-height: 1.7; }
.cas-price { font-size: 10px; color: #cdeedd; }
.cas-price b { font-size: 17px; color: #ffd700; }
.cas-progress { height: 9px; background: #071a11; border: 2px solid #000; border-radius: 20px; overflow: hidden; }
.cas-progress span { display: block; height: 100%; background: linear-gradient(90deg, #7ed957, #ffd700); }
.cas-progrow { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: #cdeedd; }
.cas-bidrow { display: flex; gap: 10px; }
.cas-bidrow div { flex: 1; background: #071a11; border: 2px solid #000; border-radius: 8px; padding: 8px; text-align: center; }
.cas-bidrow small { display: block; font-size: 8px; color: #8fc0a6; margin-bottom: 4px; }
.cas-bidrow b { font-size: 15px; color: #ffd700; }
.cas-timer {
  font-family: ui-monospace, monospace; font-size: 11px; color: #ffd700;
  background: #071a11; border: 2px solid #000; border-radius: 5px; padding: 4px 8px;
}
.cas-mine { font-size: 9px; color: #7ed957; }
.cas-lead { font-size: 10px; color: #cdeedd; text-align: center; }
.cas-lead.you { color: #ffd700; }
.cas-lead.none { color: #6f9a85; }
.cas-actions { display: flex; gap: 8px; margin-top: auto; }
.cas-qty {
  font-family: inherit; font-size: 12px; color: #fff; background: #071a11;
  border: 2px solid #000; border-radius: 8px; padding: 10px; width: 68px; outline: none;
}
.cas-qty.wide { width: 90px; }
.cas-buy, .cas-bid { width: auto; flex: 1; font-size: 12px; padding: 11px; }
.casino-modal .bf-claim { background: #ffd700; color: #3a2b00; }
.casino-modal .bf-claim:hover { background: #ffe14d; }
.casino-modal .bf-claim:disabled { background: #4b5c56; color: #8ea69b; }
.cas-winbtn { width: fit-content; background: #ffd700; color: #3a2b00; padding: 8px 12px; }
.cas-winners { display: flex; flex-direction: column; gap: 4px; }
.cas-winner {
  display: flex; justify-content: space-between; gap: 8px; font-size: 8px; color: #fff;
  background: #0d2b1d; border: 1px solid #000; border-radius: 5px; padding: 6px 8px;
}
.cas-winner.you { background: #3a2b00; outline: 2px solid #ffd700; color: #ffd700; }
.cas-winner.none { color: #6f9a85; }
.cas-wallet { font-family: ui-monospace, monospace; color: #a8d8bf; }
.casino-modal .shop-form { background: #0d2b1d; }
.casino-modal .shop-form input, .casino-modal .shop-form textarea { background: #071a11; }

/* ===== Toast de confirmação (BFFX) ===== */
.bf-toast {
  position: fixed; top: 74px; left: 50%; transform: translate(-50%, -18px);
  z-index: 30001; background: #12283c; color: #fff; border: 3px solid #000; border-radius: 10px;
  padding: 12px 18px; font-family: 'Press Start 2P', sans-serif; font-size: 10px; line-height: 1.6;
  box-shadow: 0 8px 0 rgba(0,0,0,.45); opacity: 0; max-width: 90vw; text-align: center;
  transition: opacity .3s ease, transform .3s ease;
}
.bf-toast.show { opacity: 1; transform: translate(-50%, 0); }
.bf-toast.ok { border-color: var(--accent); }
.bf-toast.err { border-color: #e0245e; }

/* ===== Mall hub (escolher trabalhar / loja) ===== */
.hub { text-align: center; padding: 10px 6px 6px; }
.hub-sub { font-size: 10px; color: #e9d7ff; margin: 12px 0 18px; }
.hub-choices { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hub-choice {
  font-family: inherit; cursor: pointer; width: 190px; max-width: 44vw;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #402568; color: #fff; border: 3px solid #000; border-radius: 12px;
  padding: 22px 14px; box-shadow: 0 5px 0 #000; transition: transform .1s, box-shadow .1s, background .15s;
}
.hub-choice:hover { background: #4d2e7d; transform: translateY(-2px); }
.hub-choice:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.hub-ico { font-size: 34px; }
.hub-choice b { font-size: 14px; color: var(--accent-2); }
.hub-choice small { font-size: 8px; color: #d3bdf0; line-height: 1.6; }
/* botão "💰 View salary" pequeno, centralizado abaixo das escolhas do hub */
.hub-salary-btn {
  font-family: inherit; font-size: 9px; cursor: pointer; margin: 16px auto 0; display: block;
  background: #f4c20d; color: #1a1200; border: 2px solid #000; border-radius: 6px;
  padding: 7px 14px; box-shadow: 0 3px 0 #000;
}
.hub-salary-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }

/* ===== Popup pequeno de salários ===== */
#salaryPopupOverlay {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .6); padding: 20px;
}
#salaryPopupOverlay.hidden { display: none; }
#salaryPopup {
  position: relative; width: 300px; max-width: 92vw;
  background: #12283c; border: 3px solid #000; border-radius: 12px;
  padding: 18px 16px 16px; box-shadow: 0 6px 0 #000;
}
#salaryPopup .close {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; cursor: pointer;
  background: #e0245e; color: #fff; border: 2px solid #000; border-radius: 5px; font-size: 10px;
}
.salary-pop-title {
  font-size: 11px; color: var(--accent-2); text-align: center; letter-spacing: 1px;
  margin-bottom: 14px; padding-right: 20px;
}
.salary-pop-body { display: flex; flex-direction: column; gap: 8px; }
.salary-pop-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 10px; color: #cfe0ec; background: #0e2032; border: 2px solid #000;
  border-radius: 6px; padding: 9px 11px;
}
.salary-pop-row b { color: #f4c20d; font-size: 10px; white-space: nowrap; }

/* ===== BlowFly Mall Shop ===== */
#modal.shop-modal {
  background: linear-gradient(160deg, #2b1a4a, #170f2c);
  border: 4px solid #000; max-width: 980px; padding: 18px;
}
.shop-modal .col-head { margin-bottom: 12px; }
.shop-modal .bf-h { background: #170f2c; color: var(--accent-2); border: 2px solid #000; border-radius: 6px; padding: 11px 8px; text-align: center; font-size: 13px; }
.shop-modal .col-sub { font-size: 9px; color: #d3bdf0; margin-top: 8px; }
.shop-modal .col-sub b { color: #fff; }
.shop-add { width: auto; display: inline-block; font-size: 12px; padding: 12px 16px; margin-bottom: 14px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.shop-item {
  background: #3a2560; border: 2px solid #000; border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.shop-item.out { opacity: .6; }
.shop-img {
  position: relative; width: 100%; aspect-ratio: 1; border: 2px solid #000; border-radius: 8px;
  overflow: hidden; background: #170f2c; display: grid; place-items: center; font-size: 40px;
}
.shop-img img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.shop-hidden-tag { position: absolute; top: 5px; left: 5px; font-size: 6px; background: #000c; color: #ffb3a0; padding: 3px 5px; border-radius: 4px; }
.shop-info { display: flex; flex-direction: column; gap: 3px; }
.shop-name { font-size: 10px; color: #fff; }
.shop-desc { font-size: 7px; color: #cdb8ec; line-height: 1.6; }
.shop-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.shop-price { font-size: 10px; color: var(--accent-2); }
.shop-stock { font-size: 7px; color: #b399d6; }
.shop-buy { font-size: 12px; padding: 11px; width: 100%; }
.shop-admin { display: flex; gap: 6px; }
.shop-admin .bf-mini { width: auto; flex: 1; padding: 6px; font-size: 7px; }

.shop-form {
  background: #1f1338; border: 2px solid #000; border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}
.shop-form input, .shop-form textarea {
  font-family: inherit; font-size: 11px; color: #fff; background: #0f0920;
  border: 2px solid #000; border-radius: 6px; padding: 9px; outline: none; width: 100%;
}
.shop-form textarea { min-height: 54px; resize: vertical; }
.shop-form-row { display: flex; gap: 10px; }
.shop-form-row input { flex: 1; }
.shop-check { font-size: 8px; color: #d3bdf0; display: flex; align-items: center; gap: 6px; }
.shop-form-actions { display: flex; gap: 10px; align-items: center; }
.shop-form-actions .bf-claim { width: auto; padding: 12px 18px; }

/* tipo (Item / WL) */
.type-badge { font-size: 6px; padding: 3px 5px; border-radius: 4px; border: 1px solid #000; letter-spacing: .5px; }
.type-badge.item { background: var(--accent-2); color: #2b1a02; }
.type-badge.wl { background: #34e7d3; color: #06302b; }
.shop-type-corner { position: absolute; top: 5px; right: 5px; }
.shop-type-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 9px; color: #d3bdf0; }
.shop-type-row label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.shop-type-row small { font-size: 7px; color: #a98fd0; }

.shop-toprow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.shop-viewtoggle { width: auto; padding: 10px 14px; background: #170f2c; color: var(--accent-2); }

/* ORDERS (admin) */
.ord-list { display: flex; flex-direction: column; gap: 12px; }
.ord-item { background: #1f1338; border: 2px solid #000; border-radius: 10px; padding: 12px; }
.ord-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.ord-title { font-size: 11px; color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ord-count { font-size: 8px; color: #b399d6; }
.ord-head .bf-mini { width: auto; padding: 8px 12px; }
.ord-buyers { display: flex; flex-direction: column; gap: 4px; }
.ord-row {
  display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center;
  background: #170f2c; border: 1px solid #000; border-radius: 5px; padding: 6px 8px;
}
.ord-user { font-size: 8px; color: #fff; }
.ord-wallet { font-size: 8px; color: #cdb8ec; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; }
.ord-date { font-size: 7px; color: #8f78b8; }
.ord-empty { font-size: 8px; color: #8f78b8; padding: 4px 2px; }

/* ===== My BlowFly (perfil) — estilo Habbo: avatar/cards grandes, header fixo ===== */
#modal.profile-modal { max-width: 1080px; }

/* header (título + card do dono) fixo no topo, mesmo truque de margem negativa do college */
.pf-sticky {
  position: sticky; top: -18px; z-index: 5;
  margin: -18px -18px 16px; padding: 18px 18px 14px;
  background: #1d3c59; border-bottom: 3px solid #000;
}
.pf-sticky .bf-h {
  background: #0e2032; color: var(--accent); border: 2px solid #000; border-radius: 6px;
  padding: 11px 8px; text-align: center; font-size: 13px; letter-spacing: 1px; margin-bottom: 12px;
}
.pf-sticky .pf-status { margin-bottom: 0; margin-top: 8px; }

.pf-header {
  display: flex; gap: 18px; align-items: center;
  background: #0e2032; border: 2px solid #000; border-radius: 10px; padding: 16px;
}
.pf-avatar-big {
  width: 128px; height: 128px; flex-shrink: 0; border: 4px solid #000; border-radius: 12px;
  overflow: hidden; background: #2a4763; display: grid; place-items: center; font-size: 50px;
  box-shadow: 0 4px 0 #000;
}
.pf-avatar-big img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.pf-header-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.pf-name-row { display: flex; align-items: center; gap: 8px; }
.pf-username { font-size: 19px; color: #fff; }
.pf-icon-btn {
  font-family: inherit; font-size: 11px; cursor: pointer; color: #cfe0ec;
  background: #23405a; border: 2px solid #000; border-radius: 5px; padding: 4px 7px; box-shadow: 0 2px 0 #000;
}
.pf-icon-btn:active { transform: translateY(2px); box-shadow: 0 0 0 #000; }
.pf-name-edit { display: flex; align-items: center; gap: 6px; }
.pf-name-edit input {
  font-family: inherit; font-size: 12px; color: #fff; background: #0b1a28;
  border: 2px solid #000; border-radius: 5px; padding: 7px 8px; width: 150px; outline: none;
}
.pf-name-edit .bf-mini { width: auto; padding: 7px 12px; }
.pf-wallet-line { font-size: 9px; color: #8ea6b8; font-family: ui-monospace, monospace; }
.pf-stat-row { display: flex; gap: 10px; margin-top: 3px; }
.pf-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #16304a; border: 2px solid #000; border-radius: 6px; padding: 8px 14px;
}
.pf-stat b { font-size: 16px; color: var(--accent-2); }
.pf-stat span { font-size: 7px; color: #9fb3c2; letter-spacing: 1px; }

.pf-status { min-height: 12px; font-size: 9px; color: var(--accent); text-align: center; margin-bottom: 8px; }
.pf-status.err { color: #ffb3a0; }
.pf-section { font-size: 10px; color: #a9c4d8; margin-bottom: 12px; }
.pf-section b { color: #fff; }

/* cards de coleção viram "trading cards" verticais, retrato grande no topo */
#modal.profile-modal .col-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pf-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  background: #12283c; border: 2px solid #000; border-radius: 12px; padding: 14px;
  box-shadow: 0 4px 0 #000;
}
.pf-card-pfp {
  position: relative; width: 100%; aspect-ratio: 1; max-width: 160px; padding: 0; cursor: pointer;
  border: 3px solid #000; border-radius: 10px; overflow: hidden; background: #2a4763;
  display: grid; place-items: center; font-size: 40px; box-shadow: 0 4px 0 #000; transition: transform .08s;
}
.pf-card-pfp img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.pf-card-pfp:hover { transform: translateY(-3px); }
.pf-card-pfp.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent), 0 4px 0 #000; }
.pf-set-tag {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 7px; letter-spacing: .5px;
  background: #000c; color: #fff; padding: 5px 2px; text-align: center;
}
.pf-set-tag.current { background: var(--accent); color: #06302b; }
.pf-card-body { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; width: 100%; }
.pf-card-body .col-id { font-size: 13px; }
.pf-card-body .col-badges { justify-content: center; }
.pf-card-body .pf-doing { width: 100%; text-align: center; }

@media (max-width: 640px) {
  .pc-stats { display: none; }
  .landing-logo { font-size: 22px; }
  .pf-header { flex-direction: column; text-align: center; }
}

/* ===== Favela / PvP modal (Police vs Thieves) ===== */
/* Reusa as CSS vars do work modal (--wk-*) p/ herdar bf-worker/bf-h/bf-mini/etc. */
#modal.pvp-modal {
  --wk-bg:      #223026;  /* favela: verde-cinza urbano */
  --wk-panel:   #2f4433;
  --wk-dark:    #0e1712;
  --wk-accent:  #ffcf4d;
  --wk-work:    #7ed957;
  --wk-claim:   #ff7043;
  --wk-claim-hover: #ff8a5c;
  --wk-claim-text:  #2a0f04;
  --wk-worker-bg:   #d9cbb0;
  --wk-worker-text: #1a1208;
  --wk-muted:   #c7d6c9;

  background: var(--wk-bg);
  border: 4px solid #000;
  max-width: 1000px;
  padding: 16px;
}
/* Hospital (fiança) reaproveita o tema hospital sob o pvp-modal */
#modal.pvp-modal.theme-hospital {
  --wk-bg:      #123a52;
  --wk-panel:   #1c5378;
  --wk-dark:    #08202f;
  --wk-accent:  #8fe3ff;
  --wk-work:    #35c97a;
  --wk-claim:   #e64b4b;
  --wk-claim-hover: #ff6363;
  --wk-claim-text:  #fff;
  --wk-worker-bg:   #eaf3f7;
  --wk-worker-text: #0c2a3a;
  --wk-muted:   #bfe3f2;
}

.pvp-tabs { display: flex; gap: 8px; margin: 12px 0; }
.pvp-tab {
  flex: 1; font-family: inherit; font-size: 9px; cursor: pointer;
  padding: 10px 6px; border: 2px solid #000; border-radius: 6px;
  background: var(--wk-dark); color: var(--wk-muted); box-shadow: 0 3px 0 #000;
}
.pvp-tab.on { background: var(--wk-accent); color: var(--wk-claim-text); }
.pvp-tab:active { transform: translateY(3px); box-shadow: 0 0 0 #000; }
.pvp-body { min-height: 200px; }

/* RAID — duas colunas (raiders + targets) */
.pvp-raid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pvp-pick { cursor: pointer; position: relative; }
.pvp-pick input { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; accent-color: var(--wk-work); }
.pvp-pick:has(input:checked) { outline: 3px solid var(--wk-work); outline-offset: -3px; }
.pvp-targets { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.pvp-target {
  display: flex; align-items: center; gap: 10px; background: var(--wk-worker-bg);
  border: 2px solid #000; border-radius: 6px; padding: 8px;
}
.pvp-target-face {
  width: 42px; height: 42px; flex: none; border: 2px solid #000; border-radius: 5px;
  display: grid; place-items: center; font-size: 22px; background: #6b8a72; overflow: hidden;
}
.pvp-target-face img { width: 100%; height: 100%; object-fit: cover; }
.pvp-target-info { flex: 1; display: flex; flex-direction: column; gap: 3px; color: var(--wk-worker-text); }
.pvp-target-info b { font-size: 10px; }
.pvp-target-info span { font-size: 8px; opacity: .8; }
.pvp-target .bf-mini { width: auto; padding: 8px 12px; flex: none; }

/* WAR — tela da guerra de 30s */
.pvp-war { text-align: center; padding: 20px 12px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.pvp-countdown {
  font-size: 48px; color: var(--wk-accent); text-shadow: 3px 3px 0 #000;
  background: var(--wk-dark); border: 3px solid #000; border-radius: 12px;
  width: 120px; padding: 14px 0; animation: pop .3s ease-out;
}
.pvp-war-sub { font-size: 9px; color: var(--wk-muted); line-height: 1.8; max-width: 480px; }
.pvp-war-log {
  font-size: 9px; color: #fff; line-height: 1.9; background: var(--wk-dark);
  border: 2px solid #000; border-radius: 8px; padding: 12px; max-width: 520px;
}
.pvp-result { font-size: 13px; padding: 12px 16px; border: 3px solid #000; border-radius: 10px; }
.pvp-result.win  { background: #2e7d32; color: #eaffea; }
.pvp-result.lose { background: #7d2e2e; color: #ffeaea; }
.pvp-war .bf-claim { max-width: 320px; width: 100%; }

/* WAR ROOM — feed */
.pvp-feed { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; }
.pvp-feed-line {
  font-size: 9px; color: #fff; line-height: 1.7; background: var(--wk-panel);
  border: 2px solid #000; border-radius: 6px; padding: 9px 11px;
}

/* HOSPITAL — presos + fiança */
.pvp-hospital {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start;
  max-height: 360px; overflow-y: auto; margin-top: 12px;
}
.pvp-docs { margin-top: 10px; text-align: center; }
.bf-pfp.jailed { position: relative; filter: grayscale(.5) brightness(.85); }
.bf-pfp.jailed::after {
  content: "🚑"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; background: rgba(0,0,0,.35);
}

@media (max-width: 720px) {
  .pvp-raid { grid-template-columns: 1fr; }
  .pvp-hospital { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Clothing Store (traits) ===== */
/* Grid mais denso (4 col) + imagens em tamanho médio — evita cards gigantes e menos scroll. */
.trait-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 300px; }
.trait-grid .bf-pfp { max-width: 74px; margin: 0 auto; font-size: 24px; }
.trait-card { padding: 8px; gap: 4px; }
.trait-card .trait-desc { font-size: 7px; color: var(--wk-worker-text); opacity: .8; line-height: 1.4; text-align: center; }
.trait-stock { font-size: 7px; color: var(--wk-worker-text); opacity: .7; }
.trait-card .bf-mini.buy { background: var(--wk-work); }

/* Picker "pra qual NFT vai" — tamanho médio (nem gigante, nem minúsculo). */
.bf-grid.trait-pick-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; max-height: 320px; }
.trait-pick-grid .bf-pfp { max-width: 78px; margin: 0 auto; font-size: 26px; }
.trait-pick-grid .bf-name { font-size: 7px; }
.trait-pick-grid .bf-mini { padding: 6px 3px; font-size: 7px; }
.trait-section { margin-top: 14px; }
.trait-order {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--wk-panel); border: 2px solid #000; border-radius: 6px;
  padding: 9px 11px; margin-top: 6px; font-size: 9px; color: #fff;
}
.trait-order.delivered { opacity: .75; }
.trait-order-st { font-size: 8px; color: var(--wk-accent); }
.trait-orders { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; margin-top: 10px; }
.trait-adm-order {
  display: flex; align-items: center; gap: 10px;
  background: var(--wk-worker-bg); border: 2px solid #000; border-radius: 6px; padding: 8px;
  color: var(--wk-worker-text);
}
.trait-adm-order.delivered { opacity: .7; }
.trait-adm-order .bf-pfp.small { width: 42px; height: 42px; flex: none; font-size: 22px; }
.trait-adm-info { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 9px; }
.trait-adm-info small { opacity: .7; font-size: 8px; }
.trait-adm-order .bf-mini { width: auto; padding: 8px 10px; flex: none; }
.trait-done { font-size: 8px; color: #2e7d32; font-weight: bold; }
.trait-picker-info { font-size: 9px; color: #fff; line-height: 1.7; text-align: center; margin: 8px 0; }

/* ===== Casino: controles de admin (edit/delete) nos cards ===== */
.cas-admin { display: flex; gap: 6px; margin-top: 8px; }
.cas-admin .bf-mini { width: auto; flex: 1; padding: 7px 4px; }
.cas-note { font-size: 8px; color: #ffd9c9; line-height: 1.6; text-align: center; padding: 6px; }

/* ===== Mobile gate — desktop only for now ===== */
html.bf-mobile-blocked body { overflow: hidden; }
#mobileGate {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1a2a1f, #0b1410);
}
#mobileGate.hidden { display: none; }
.mg-box {
  width: 100%; max-width: 380px; text-align: center;
  background: #16241b; border: 4px solid #000; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6); padding: 30px 22px;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.mg-logo { font-size: 13px; color: #ffcf4d; letter-spacing: 1px; }
.mg-icon { font-size: 40px; }
.mg-box h2 { font-size: 14px; color: #fff; text-shadow: 2px 2px 0 #0006; line-height: 1.6; }
.mg-box p { font-size: 9px; color: #bfe3c9; line-height: 1.9; }
.mg-foot { font-size: 8px; color: #6f9b7e; margin-top: 6px; }

/* ===== First-login onboarding overlay ===== */
#onboarding {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 30%, #1a2a1f, #0b1410);
}
#onboarding.hidden { display: none; }
.ob-box {
  width: 100%; max-width: 420px; text-align: center;
  background: #16241b; border: 4px solid #000; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6); padding: 26px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.ob-logo { font-size: 14px; color: #ffcf4d; letter-spacing: 1px; }
.ob-box h2 { font-size: 16px; color: #fff; text-shadow: 2px 2px 0 #0006; }
.ob-sub { font-size: 9px; color: #bfe3c9; line-height: 1.7; margin-bottom: 6px; }
.ob-label { font-size: 8px; color: #8fd14f; text-align: left; letter-spacing: 1px; margin-top: 6px; }
.ob-label span { color: #ff7043; }
.ob-box input {
  font-family: inherit; font-size: 12px; padding: 10px; width: 100%;
  border: 2px solid #000; border-radius: 6px; background: #0e1712; color: #fff;
}
#ob-code { text-transform: uppercase; letter-spacing: 4px; text-align: center; }
.ob-hint { font-size: 8px; color: #9fc3aa; line-height: 1.7; text-align: left; }
.ob-btn {
  font-family: inherit; font-size: 14px; cursor: pointer; margin-top: 8px;
  background: #ffcf4d; color: #2a1f04; border: 3px solid #000; border-radius: 8px;
  padding: 14px; box-shadow: 0 4px 0 #000; transition: transform .08s, box-shadow .08s;
}
.ob-btn:hover { background: #ffd964; }
.ob-btn:active { transform: translateY(4px); box-shadow: 0 0 0 #000; }
.ob-status { min-height: 14px; font-size: 9px; color: #ffcf4d; }
.ob-status.err { color: #ff8a5c; }

/* ===== Profile: vínculo com o Discord ===== */
.pf-discord { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 9px; color: #cfe0ec; }
.pf-discord.linked b { color: #8fd14f; }
.pf-discord input {
  font-family: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: 3px;
  width: 130px; padding: 7px 8px; border: 2px solid #000; border-radius: 5px; background: #0e1712; color: #fff;
}
.pf-discord .bf-mini { width: auto; padding: 8px 11px; }
.pf-discord small { width: 100%; opacity: .65; font-size: 8px; line-height: 1.6; }
