:root {
  --bg: #0b0c0a;
  --panel: rgba(16, 18, 14, 0.94);
  --glass: rgba(12, 14, 11, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --text: #ece6d6;
  --muted: #a49d8c;
  --amber: #f5c542;
  --red: #e04a3a;
  --green: #6fd36a;
  --blue: #4aa8e0;
  --toxic: #a6e22e;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; font-size: 14px; -webkit-user-select: none; user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
canvas#game { position: fixed; inset: 0; display: block; cursor: crosshair; }
.hidden { display: none !important; }
button { font-family: inherit; }
kbd { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); font: 600 11px Inter, sans-serif; text-align: center; color: var(--amber); }
input, select { font-family: inherit; font-size: 14px; color: var(--text); background: rgba(0,0,0,0.45); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none; -webkit-user-select: text; user-select: text; }
input:focus, select:focus { border-color: rgba(245,197,66,0.6); }

.btn { appearance: none; border: 1px solid rgba(255,255,255,0.14); background: linear-gradient(#2a2d26, #1d1f1a); color: var(--text); border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: 13px; cursor: pointer; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.2); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.big { padding: 12px 18px; font-size: 15px; }
.btn.ok { background: linear-gradient(#5a7d2a, #3d5a1b); border-color: #7da83a; }
.btn.warn { background: linear-gradient(#8a6a1a, #604a12); border-color: #b08a2a; }
.btn.danger { background: linear-gradient(#8a2a22, #5e1a15); border-color: #b43a2e; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > *, #hud .topright, #hud .bottom { pointer-events: none; }
#hud .card, #hud .hotbar, #hud .menubar, #hud .chatbox, #hud #minimap, #hud .actions, #hud .buildbar, #hud .guide { pointer-events: auto; }
.card { position: absolute; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); width: 270px; display: flex; gap: 10px; padding: 10px 12px 10px 10px; background: linear-gradient(160deg, rgba(34,36,28,0.86), rgba(14,15,12,0.86)); border: 1px solid rgba(255,255,255,0.08); border-left: 3px solid var(--amber); border-radius: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 8px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05); }
.lvl { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#2b2a1f, #151510); border: 3px solid var(--amber); font: 800 18px Inter, sans-serif; color: var(--amber); box-shadow: 0 0 10px rgba(245,197,66,0.25); }
.lvl.sp { animation: glow 1.2s infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 18px rgba(245,197,66,0.9); } }
.cinfo { flex: 1; min-width: 0; }
.cname { display: flex; justify-content: space-between; align-items: baseline; font: 400 18px/18px 'Bebas Neue', Inter, sans-serif; letter-spacing: 1px; }
.cname .coins { font: 700 12px Inter, sans-serif; }
.coins { color: var(--amber); font-weight: 700; }
.coins::before { content: '🪙 '; }
.bar { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 4px; height: 14px; }
.bar .ico { flex: none; width: 14px; height: 14px; display: grid; place-items: center; }
.bar .ico svg { width: 13px; height: 13px; fill: currentColor; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
.bar .track { position: relative; flex: 1; height: 10px; background: rgba(0,0,0,0.45); border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06); }
.bar .track > div { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; }
.bar .fill { transition: width .2s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -2px 0 rgba(0,0,0,0.2); }
.bar .ghost { background: rgba(255,240,220,0.75); transition: width .7s .35s ease-out; }
.bar .pool { background: rgba(140,255,150,0.35); transition: width .3s; }
.bar .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,0.35) calc(10% - 1px) 10%); pointer-events: none; }
.bar .val { flex: none; width: 24px; text-align: right; font: 400 14px/14px 'Bebas Neue', Inter, sans-serif; letter-spacing: .5px; color: rgba(255,255,255,0.92); text-shadow: 0 1px 2px #000; }
.bar.hp .ico { color: #ff5a4a; } .bar.hu .ico { color: #f0a040; } .bar.th .ico { color: #55b8f0; } .bar.st .ico { color: #f2dc4a; }
.bar.hp .fill { background: linear-gradient(180deg, #ef5a48, #a52419); }
.bar.hu .fill { background: linear-gradient(180deg, #f0a040, #a85a14); }
.bar.th .fill { background: linear-gradient(180deg, #5cbcf2, #1f5d94); }
.bar.st .fill { background: linear-gradient(180deg, #f2dc4a, #a08a14); }
.bar.regen .fill { background-image: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.35) 45%, transparent 60%), linear-gradient(180deg, #ef5a48, #a52419); background-size: 220% 100%, 100% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0, 0 0; } to { background-position: -120% 0, 0 0; } }
.bar.low .track { animation: blink .7s infinite alternate; }
@keyframes blink { to { box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,90,70,0.9), 0 0 8px rgba(255,60,40,0.6); } }
.xp { height: 3px; margin-top: 5px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.xp .fill { height: 100%; background: var(--amber); transition: width .4s; }
.status { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.1); }
.chip.bad { background: rgba(224,74,58,0.35); color: #ffd0c8; }
.chip.warn { background: rgba(232,144,42,0.3); color: #ffe2b8; }
.chip.good { background: rgba(111,211,106,0.25); color: #d4ffd0; }
.chip.info { background: rgba(74,168,224,0.25); color: #d0ecff; }

.guide { position: absolute; top: calc(140px + var(--sat)); left: calc(10px + var(--sal)); width: 270px; padding: 8px 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.guide .gt { display: flex; justify-content: space-between; font-weight: 800; color: var(--amber); margin-bottom: 4px; }
.guide .x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1; }
.guide .gi { color: var(--muted); padding: 1px 0; }
.guide .gi.done { color: var(--green); text-decoration: line-through; opacity: .7; }

.topright { position: absolute; top: calc(10px + var(--sat)); right: calc(10px + var(--sar)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#minimap { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 4px 20px rgba(0,0,0,0.5); cursor: pointer; }
.season { font-size: 11px; text-align: right; background: var(--glass); padding: 5px 9px; border-radius: 10px; border: 1px solid var(--line); line-height: 1.45; }
.season b { color: var(--amber); font-size: 13px; }
.season .zone { color: var(--toxic); font-weight: 700; }

.banner { position: absolute; top: calc(12px + var(--sat)); left: 50%; transform: translateX(-50%) scale(.9); padding: 8px 18px; border-radius: 999px; font: 800 15px Inter, sans-serif; letter-spacing: .3px; opacity: 0; transition: all .25s; background: rgba(20,20,20,0.85); border: 1px solid var(--line); white-space: nowrap; }
.banner.show { opacity: 1; transform: translateX(-50%) scale(1); }
.banner.danger { background: rgba(140,20,15,0.88); border-color: #e04a3a; animation: pulse 1s infinite; }
.banner.warn { background: rgba(130,80,10,0.88); border-color: #e8902a; }
.banner.info { background: rgba(20,60,90,0.88); border-color: #4aa8e0; }
@keyframes pulse { 50% { box-shadow: 0 0 22px rgba(224,74,58,0.8); } }

.prompt { position: absolute; left: 0; top: 0; padding: 4px 10px; border-radius: 8px; background: rgba(0,0,0,0.72); border: 1px solid rgba(245,197,66,0.4); font-weight: 700; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.prompt.show { opacity: 1; }
.channel { position: absolute; bottom: calc(96px + var(--sab)); left: 50%; transform: translateX(-50%); width: 260px; height: 22px; border-radius: 11px; background: rgba(0,0,0,0.7); border: 1px solid var(--line); overflow: hidden; opacity: 0; transition: opacity .15s; }
.channel.show { opacity: 1; }
.channel .cfill { height: 100%; background: linear-gradient(90deg, #6a8a2a, #a6e22e); width: 0; }
.channel span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }

.bottom { position: absolute; bottom: calc(12px + var(--sab)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hotbar { display: flex; gap: 6px; padding: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; }
.ammo { font: 800 14px Inter, sans-serif; color: var(--amber); background: var(--glass); padding: 3px 10px; border-radius: 8px; opacity: 0; transition: opacity .2s; }
.ammo.show { opacity: 1; }

.slot { position: relative; width: 54px; height: 54px; border-radius: 10px; background: linear-gradient(#22251f, #171914); border: 1px solid rgba(255,255,255,0.1); display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .12s, transform .08s; }
.slot:active { transform: scale(0.95); }
.slot img { width: 78%; height: 78%; object-fit: contain; image-rendering: auto; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5)); }
.slot .q { position: absolute; right: 4px; bottom: 3px; font: 800 11px Inter, sans-serif; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.slot .key { position: absolute; left: 4px; top: 2px; font: 700 9px Inter, sans-serif; color: var(--muted); }
.slot .dur { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--green); }
.slot .dur.broken { background: var(--red); width: 100% !important; }
.slot .sharp { position: absolute; left: 0; bottom: 3px; height: 2px; background: #9fd8ff; }
.slot .bat { position: absolute; left: 0; top: 0; height: 2px; background: var(--amber); }
.slot .spoil { position: absolute; left: 3px; bottom: 3px; font-size: 10px; }
.slot .ammoq { position: absolute; left: 4px; bottom: 3px; font: 800 10px Inter, sans-serif; color: var(--amber); text-shadow: 0 1px 2px #000; }
.slot.active, .slot.held { border-color: var(--amber); box-shadow: 0 0 10px rgba(245,197,66,0.35) inset; }
.slot.sel { border-color: #9fd8ff; box-shadow: 0 0 0 2px rgba(159,216,255,0.5); }
.slot.offered { border-color: var(--green); }
.slot.empty { cursor: default; opacity: .55; }
.slot.hb { background: linear-gradient(#2a2c22, #1c1d16); }
.slot .eqlabel { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 8px; color: var(--muted); }

.feed { position: absolute; left: calc(12px + var(--sal)); top: 45%; display: flex; flex-direction: column; gap: 4px; }
.got { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; background: rgba(0,0,0,0.6); border-radius: 8px; font-weight: 700; font-size: 12px; animation: slidein .25s; transition: opacity .5s, transform .5s; }
.got img { width: 22px; height: 22px; }
.got.out { opacity: 0; transform: translateX(-20px); }
@keyframes slidein { from { opacity: 0; transform: translateX(-20px); } }

.chatbox { position: absolute; left: calc(10px + var(--sal)); bottom: calc(10px + var(--sab)); width: 360px; }
.chatlog { max-height: 170px; overflow-y: auto; font-size: 12px; line-height: 1.4; padding: 4px 6px; scrollbar-width: none; }
.chatlog::-webkit-scrollbar { display: none; }
.cl { padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,0.42); margin-top: 2px; transition: opacity 1s; text-shadow: 0 1px 1px #000; word-wrap: break-word; -webkit-user-select: text; user-select: text; }
.cl.old { opacity: 0; }
.chatbox.open .cl.old, .chatbox:hover .cl.old { opacity: 1; }
.cl .nick { color: #ffd98a; font-weight: 700; }
.cl .clan { color: #7dff9a; font-weight: 700; }
.cl .pm { color: #e39aff; font-weight: 700; }
.cl .sys { color: #9fd8ff; font-style: italic; }
.chatform { display: flex; gap: 4px; margin-top: 4px; }
.chatform input#chatin, #pchatin { flex: 1; }
.chatform select { padding: 6px; }
.chatbox .chatform { opacity: .35; transition: opacity .2s; }
.chatbox.open .chatform, .chatbox:hover .chatform { opacity: 1; }

.menubar { position: absolute; right: calc(10px + var(--sar)); bottom: calc(12px + var(--sab)); display: flex; gap: 6px; }
.mbtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 62px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--text); cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mbtn:hover { border-color: rgba(245,197,66,0.5); }
.mbtn .ic { font-size: 20px; line-height: 1.1; }
.mbtn .lb { font-size: 10px; font-weight: 600; color: var(--muted); }
.mbtn kbd { position: absolute; top: -6px; right: -4px; font-size: 9px; padding: 0 3px; }
.mbtn.badge::after { content: ''; position: absolute; top: 4px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); }

.buildbar { position: absolute; bottom: calc(100px + var(--sab)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: rgba(0,0,0,0.75); border-radius: 12px; border: 1px solid rgba(245,197,66,0.4); font-weight: 600; font-size: 12px; }

#fps { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); font: 600 11px Inter, sans-serif; color: rgba(255,255,255,0.75); background: rgba(0,0,0,0.45); padding: 2px 9px; border-radius: 8px; z-index: 6; pointer-events: none; }
#fps:empty { display: none; }
#fps .ok { color: #7dff9a; } #fps .mid { color: #ffd36a; } #fps .bad { color: #ff7a6a; }

/* ------------------------------------------------------------ CONTROLES DE TOQUE */
#joy { position: fixed; width: 120px; height: 120px; border-radius: 50%; display: none; z-index: 4; pointer-events: none; background: radial-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.02)); border: 2px solid rgba(255,255,255,0.18); }
#joy-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(245,197,66,0.4); border: 2px solid rgba(245,197,66,0.8); }
.actions { position: absolute; right: calc(14px + var(--sar)); bottom: calc(18px + var(--sab)); width: 210px; height: 200px; }
.abtn { position: absolute; display: grid; place-items: center; border-radius: 50%; background: rgba(18,20,16,0.6); border: 2px solid rgba(255,255,255,0.22); color: #fff; font-size: 22px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); touch-action: none; }
.abtn.on { background: rgba(245,197,66,0.35); border-color: var(--amber); transform: scale(0.94); }
.abtn small { position: absolute; bottom: -16px; font-size: 10px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.abtn.atk { right: 0; bottom: 0; width: 88px; height: 88px; font-size: 34px; border-color: rgba(224,74,58,0.7); background: rgba(90,20,15,0.55); }
.abtn.use { right: 100px; bottom: 6px; width: 64px; height: 64px; border-color: rgba(245,197,66,0.6); }
.abtn.use.dim { opacity: .55; }
.abtn.loot { right: 174px; bottom: 14px; width: 56px; height: 56px; font-size: 22px; border-color: rgba(95,211,122,0.65); background: rgba(20,60,30,0.55); }
.abtn.run { right: 19px; bottom: 100px; width: 50px; height: 50px; font-size: 20px; }
.abtn.run.toggled { background: rgba(232,210,58,0.4); border-color: #e8d23a; }
.abtn.rel { right: 70px; bottom: 136px; width: 46px; height: 46px; font-size: 18px; }
.abtn.lgt { right: 200px; bottom: 84px; width: 46px; height: 46px; font-size: 18px; }
.abtn.eat { right: 170px; bottom: 30px; width: 46px; height: 46px; font-size: 18px; }
.abtn.qeat { right: 80px; bottom: 78px; width: 46px; height: 46px; font-size: 19px; border-color: rgba(232,160,60,0.7); }   /* em arco em volta do ataque */
.abtn.qheal { right: 136px; bottom: 100px; width: 46px; height: 46px; font-size: 19px; border-color: rgba(120,200,230,0.7); }
.abtn.qeat small, .abtn.qheal small { display: none; }
#prompt .k2 { margin-left: 6px; opacity: 0.85; font-size: 0.92em; }

body.mobile .card { width: 210px; padding: 7px; gap: 7px; }
body.mobile .lvl { width: 38px; height: 38px; font-size: 15px; }
body.mobile .bar { height: 11px; margin-top: 2px; gap: 4px; }
body.mobile .bar .track { height: 7px; }
body.mobile .bar .ico, body.mobile .bar .ico svg { width: 10px; height: 10px; }
body.mobile .bar .val { font-size: 11px; width: 18px; }
body.mobile #minimap { width: 104px; height: 104px; }
body.mobile .season { font-size: 9.5px; padding: 4px 7px; }
body.mobile .menubar { bottom: auto; top: calc(8px + var(--sat)); right: calc(122px + var(--sar)); flex-direction: row; gap: 4px; }
body.mobile .banner { top: calc(62px + var(--sat)); font-size: 12px; padding: 6px 12px; }
body.mobile .mbtn { width: 42px; padding: 4px 2px; border-radius: 10px; }
body.mobile .mbtn .lb { display: none; }
body.mobile .mbtn .ic { font-size: 18px; }
body.mobile .chatbox { left: auto; right: auto; bottom: auto; top: calc(110px + var(--sat)); left: calc(10px + var(--sal)); width: 210px; pointer-events: none; }
body.mobile .chatbox .chatform { display: none; }
body.mobile .chatlog { max-height: 72px; font-size: 10px; }
body.mobile .guide { top: calc(118px + var(--sat)); width: 210px; font-size: 10.5px; }
body.mobile .slot { width: 46px; height: 46px; border-radius: 9px; }
body.mobile .hotbar { gap: 4px; padding: 4px; }
body.mobile .channel { bottom: calc(76px + var(--sab)); width: 210px; }
body.mobile .buildbar { bottom: calc(80px + var(--sab)); }
body.mobile .feed { top: 42%; }
body.mobile .got { font-size: 10px; }
body.mobile canvas#game { cursor: default; }
@media (max-height: 430px) {
  body.mobile .guide { display: none; }
  body.mobile .chatbox { display: none; }
  body.mobile #minimap { width: 92px; height: 92px; }
  body.mobile .menubar { right: calc(110px + var(--sar)); }
  .tab { padding: 4px 9px; font-size: 11px; }
  .tabs { margin-bottom: 6px; }
}
@media (max-width: 700px) and (pointer: coarse) {
  body.mobile .bottom { bottom: calc(225px + var(--sab)); }
  body.mobile .menubar { top: auto; bottom: calc(285px + var(--sab)); right: 50%; transform: translateX(50%); }
  body.mobile .channel { bottom: calc(345px + var(--sab)); }
  body.mobile .buildbar { bottom: calc(345px + var(--sab)); }
  body.mobile .chatbox { display: none; }
}

/* ------------------------------------------------------------ PAINÉIS */
#panels { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; }
#panels.show { display: flex; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.panel { position: relative; width: min(940px, calc(100vw - 20px)); max-height: calc(100vh - 20px - var(--sat) - var(--sab)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.phead { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.phead h2 { margin: 0; font: 400 26px 'Bebas Neue', Inter, sans-serif; letter-spacing: 1px; color: var(--amber); }
.close { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--text); font-size: 16px; cursor: pointer; }
.pbody { padding: 12px 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.pbody h3 { margin: 6px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.pbody h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hint { color: var(--muted); font-size: 12px; }
.note { padding: 8px 10px; border-radius: 9px; background: rgba(74,168,224,0.12); border: 1px solid rgba(74,168,224,0.25); font-size: 12px; margin-bottom: 10px; }
.note.warn { background: rgba(232,144,42,0.14); border-color: rgba(232,144,42,0.3); }
.note.good { background: rgba(111,211,106,0.14); border-color: rgba(111,211,106,0.3); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row.end { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.row.form input { flex: 1; min-width: 120px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.tab { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; }
.tab.on { background: rgba(245,197,66,0.16); color: var(--amber); border-color: rgba(245,197,66,0.4); }

.grid { display: grid; grid-template-columns: repeat(6, 56px); gap: 6px; }
.grid.small { grid-template-columns: repeat(4, 50px); }
.grid.small .slot { width: 50px; height: 50px; }
.invwrap, .contwrap { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.contwrap { grid-template-columns: 1fr 1fr; }
.cgrid { grid-template-columns: repeat(5, 56px); }
.equip { display: grid; grid-template-columns: repeat(3, 60px); gap: 6px; }
.equip .slot { width: 60px; height: 60px; }
.weight { margin-top: 10px; font-size: 12px; }
.wb { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 4px; }
.wf { height: 100%; background: var(--green); }
.wf.heavy { background: var(--red); }
.money { margin-top: 10px; font-weight: 700; color: var(--amber); }
.money.top { margin: 0 0 10px; }
.statsmall { margin-top: 6px; font-size: 11px; color: var(--muted); }
.detail { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); min-height: 70px; font-size: 12px; color: var(--muted); }
.dtitle { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.dtitle img { width: 34px; height: 34px; }
.dline { padding: 1px 0; }
.dacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.craftwrap { display: grid; grid-template-columns: 1fr 300px; gap: 12px; }
.rlist { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; touch-action: pan-y; }
.recipe { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; border: 1px solid transparent; background: rgba(255,255,255,0.03); cursor: pointer; }
.recipe img { width: 34px; height: 34px; }
.recipe .rn { flex: 1; font-weight: 600; font-size: 13px; display: flex; flex-direction: column; }
.recipe .rn small { font-weight: 400; color: var(--muted); font-size: 11px; }
.recipe.locked { opacity: .45; }
.recipe.sel { border-color: rgba(245,197,66,0.5); background: rgba(245,197,66,0.08); }
.recipe .okdot { color: var(--green); }
.rdetail { padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rdetail h4 { margin: 10px 0 4px; color: var(--text); font-size: 12px; }
.ing { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-weight: 600; }
.ing img { width: 22px; height: 22px; }
.ing.ok { color: var(--green); }
.ing.no { color: #ff8a7a; }

.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); cursor: pointer; text-align: center; }
.bcard img { width: 56px; height: 56px; }
.bcard b { font-size: 12px; }
.bcard.can { border-color: rgba(111,211,106,0.4); }
.bcard.locked { opacity: .45; }
.bcard .cost { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.bcard .cost span { display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; padding: 1px 4px; border-radius: 5px; background: rgba(0,0,0,0.3); }
.bcard .cost img { width: 16px; height: 16px; }
.bcard .cost .ok { color: var(--green); }
.bcard .cost .no { color: #ff8a7a; }
.bcard .desc { color: var(--muted); font-size: 10px; }
.bcard .lock { color: var(--amber); }

#bigmap { display: block; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); cursor: crosshair; touch-action: none; }
.legend { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

.charhead { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.03); }
.charhead .big { font: 400 26px 'Bebas Neue', sans-serif; color: var(--amber); }
.hl { color: var(--amber); }
.skills { display: flex; flex-direction: column; gap: 6px; }
.skill { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,0.03); }
.skill small { display: block; color: var(--muted); font-size: 11px; }
.pips { display: flex; gap: 3px; }
.pips i { width: 9px; height: 14px; border-radius: 2px; background: rgba(255,255,255,0.1); }
.pips i.on { background: var(--amber); }
.pets { display: flex; flex-wrap: wrap; gap: 8px; }
.petcard { padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); min-width: 240px; }
.petcard small { display: block; color: var(--muted); }
.cos { display: flex; flex-wrap: wrap; gap: 6px; }

.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.shopitem { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); text-align: center; font-size: 12px; }
.shopitem img { width: 48px; height: 48px; }
.shopitem small { color: var(--muted); }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); }
.mlist { display: flex; flex-direction: column; gap: 4px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,0.03); }
.mrow img { width: 32px; height: 32px; }
.mrow .mn { flex: 1; display: flex; flex-direction: column; }
.mrow .mn small { color: var(--muted); font-size: 11px; }
.gold { color: var(--amber); }
.skull { font-size: 22px; }
.tradewrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tside { padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); min-height: 120px; }
.tside.ok { border-color: var(--green); }
.shp { font-weight: 700; margin-bottom: 6px; }
.nrow { padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,0.03); border-left: 3px solid var(--blue); margin-bottom: 6px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.nrow small { color: var(--muted); }
.nrow.raid, .nrow.theft, .nrow.pvp { border-left-color: var(--red); }
.nrow.shield { border-left-color: var(--blue); }
.nrow.market { border-left-color: var(--amber); }
table.rank { width: 100%; border-collapse: collapse; font-size: 13px; }
table.rank th, table.rank td { padding: 5px 8px; text-align: left; border-bottom: 1px solid var(--line); }
table.rank tr.me td { color: var(--amber); font-weight: 700; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.ach { padding: 8px; border-radius: 9px; background: rgba(255,255,255,0.03); opacity: .5; font-size: 12px; }
.ach small { display: block; color: var(--muted); }
.ach.got { opacity: 1; border: 1px solid rgba(245,197,66,0.4); }
.ach.ever { opacity: .8; }
.menulist { display: grid; gap: 8px; max-width: 420px; margin: 0 auto; }
.menulist .btn { text-align: left; }
.settings { display: grid; gap: 14px; max-width: 420px; }
.settings label { display: grid; gap: 4px; font-weight: 600; }
.settings .chk { display: flex; gap: 8px; align-items: center; }
.help { font-size: 13px; line-height: 1.55; color: #d8d2c2; }
.help h3 { color: var(--amber); }
.chatlog.full { max-height: 50vh; min-height: 200px; }
.chatlog.full .cl.old { opacity: 1; }

/* ------------------------------------------------------------ AVISOS */
#toasts { position: fixed; top: calc(56px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(560px, 92vw); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(16,18,14,0.92); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,0.45); font-weight: 600; font-size: 13px; animation: drop .25s ease-out; transition: opacity .4s, transform .4s; text-align: center; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.good { border-color: rgba(111,211,106,0.5); }
.toast.warn { border-color: rgba(232,144,42,0.6); color: #ffe2b8; }
.toast.danger { border-color: rgba(224,74,58,0.7); background: rgba(70,14,10,0.92); }
.toast.level { border-color: var(--amber); color: var(--amber); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
body.mobile #toasts { top: calc(98px + var(--sat)); }
body.mobile .toast { font-size: 11px; padding: 6px 10px; }

/* ------------------------------------------------------------ TELAS */
#login { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: 20px; padding-top: max(20px, var(--sat, 0px)); overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
/* centraliza sem cortar o topo: com tela pequena o formulário começa no alto e rola (antes o e-mail sumia para cima) */
#login > :first-child { margin-top: auto; }
#login > :last-child { margin-bottom: auto; }
.logo { text-align: center; }
.logo h1 { margin: 0; font: 400 clamp(56px, 12vw, 110px)/0.9 'Bebas Neue', Impact, sans-serif; letter-spacing: 4px; background: linear-gradient(#f5c542, #c0392b 70%, #6a120c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 12px rgba(192,57,43,0.4)); }
.logo p { margin: 4px 0 0; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; font-size: 12px; }
.loginform { width: min(380px, 92vw); display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; background: rgba(12,14,11,0.82); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.loginform input { padding: 12px; font-size: 15px; }
.loginform .err { color: #ff8a7a; font-size: 12px; min-height: 14px; }
.loginform .swap { text-align: center; font-size: 13px; }
.loginform a { color: var(--amber); }
.preview { align-self: center; width: 150px; height: 150px; }
.pick { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pick span { width: 56px; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; }
.sw.txt { width: auto; border-radius: 6px; padding: 2px 8px; background: rgba(255,255,255,0.08); color: var(--text); font-size: 11px; }
.foot { color: var(--muted); font-size: 12px; }
#loading { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(8,9,7,0.9); }
.spin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.1); border-top-color: var(--amber); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#kick { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); text-align: center; padding: 20px; }
#kick.show { display: flex; }
#kick h2 { font: 400 42px 'Bebas Neue', sans-serif; color: var(--amber); margin: 0; }
.death { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; background: radial-gradient(rgba(60,0,0,0.55), rgba(0,0,0,0.9)); animation: fadein .8s; }
.death h1 { margin: 0; font: 400 clamp(54px, 10vw, 96px) 'Bebas Neue', sans-serif; color: #c0392b; letter-spacing: 4px; text-shadow: 0 0 30px rgba(192,57,43,0.6); }
@keyframes fadein { from { opacity: 0; } }
#rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  #rotate { display: block; position: fixed; top: calc(8px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 60; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,0.8); font-size: 12px; pointer-events: none; animation: hideLater 7s forwards; }
}
@keyframes hideLater { 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

@media (max-width: 760px), (max-height: 520px) {
  .invwrap, .contwrap, .craftwrap, .tradewrap { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(6, 1fr); }
  .grid .slot { width: auto; height: auto; aspect-ratio: 1; }
  .cgrid { grid-template-columns: repeat(5, 1fr); }
  .rlist { max-height: 34vh; }
  .phead { padding: 6px 10px; }
  .phead h2 { font-size: 22px; }
  .pbody { padding: 8px 10px; }
  .panel { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .invwrap { grid-template-columns: 210px 1fr; }
  .equip { grid-template-columns: repeat(3, 56px); }
  .equip .slot { width: 56px; height: 56px; }
  .contwrap, .craftwrap { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(6, minmax(0, 52px)); }
}

/* bases: melhorias e bunker */
.upbox { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.upbox img { width: 40px; height: 40px; }
.upbox > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upbox small { opacity: 0.75; }
.flaglv { display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 6px; }
.flaglv span { color: #e2b13c; letter-spacing: 2px; }
.bunkerov { position: fixed; inset: 0; z-index: 12; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(10,12,10,0.55) 0%, rgba(5,6,5,0.93) 60%); display: flex; align-items: center; justify-content: center; }
.bunkerov .bk { pointer-events: auto; text-align: center; padding: 18px 26px; border-radius: 14px; background: rgba(20,22,18,0.85); border: 1px solid rgba(255,255,255,0.1); }
.bunkerov h2 { margin: 0 0 6px; font: 400 34px 'Bebas Neue', sans-serif; letter-spacing: 3px; color: #b9c48a; }
.bunkerov .row { justify-content: center; margin: 10px 0 6px; }
.bunkerov small { opacity: 0.6; }

/* ---------- Painel do Staff (admin) ---------- */
.p-staff { width: min(980px, 96vw); }
.staffq { width: 100%; padding: 9px 12px; margin-bottom: 10px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 8px; color: inherit; font: inherit; }
.staffcmds { max-height: 62vh; overflow: auto; padding-right: 4px; }
.staffcmds h3 { margin: 14px 0 6px; color: var(--amber); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.scmd { background: rgba(255,255,255,0.035); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.scmd-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scmd-h code { font-size: 14px; color: #f0e6c8; margin-right: auto; }
.scmd p { margin: 4px 0 2px; font-size: 13px; }
.scmd small { color: var(--muted); }
.scmd small code { color: #cfe8a8; }
.staffwrap { max-height: 58vh; overflow: auto; }
.staffp td, .staffp th { font-size: 12px; padding: 4px 6px; vertical-align: top; }
.staffp .sacts { display: flex; flex-wrap: wrap; gap: 3px; min-width: 260px; }
.sflags { font-size: 11px; color: #9fd0ff; }
.staffitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 58vh; overflow: auto; }
.sitem { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; color: inherit; cursor: pointer; }
.sitem img { width: 44px; height: 44px; }
.sitem span { font-size: 12px; text-align: center; }
.sitem code { font-size: 10px; color: var(--muted); }
.staffinv { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,0.3); }

/* veículos */
.vehhud { position: absolute; bottom: calc(96px + var(--sab)); left: 50%; transform: translateX(-50%); font: 600 12px Inter, sans-serif; color: #f0eadb; background: var(--glass); padding: 6px 10px; border-radius: 10px; min-width: 190px; display: none; pointer-events: none; }
.vehhud.show { display: block; }
.vehhud .kmh { float: right; font: 800 18px Inter, sans-serif; color: var(--amber); line-height: 1; }
.vehhud .kmh small { font-size: 10px; color: #cfc6b3; }
.vehhud .vb { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.vehhud .vb i { font-style: normal; width: 16px; }
.vehhud .vb .bar, .vehcard .bar { flex: 1; height: 7px; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; }
.vehhud .vb .bar div, .vehcard .bar div { height: 100%; border-radius: 4px; }
.vehhud .vb span { width: 34px; text-align: right; font-size: 11px; }
.vehhud .hint { display: block; margin-top: 4px; opacity: .7; }
.vehcard { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.vehcard img { width: 112px; height: 112px; background: rgba(255,255,255,0.05); border-radius: 12px; flex: none; }
.vehcard > div { flex: 1; }
.vehcard h3 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vehcard .tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.12); }
.vehcard .tag.bad { background: #8a2a22; }
.vehcard .vrow { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.vehcard .vrow span { width: 110px; font-size: 12px; }
.vehcard .vrow b { width: 40px; text-align: right; }
.vehcard .bar.big { height: 10px; }
.row.wrap { flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) { .vehcard img { width: 80px; height: 80px; } .vehhud { min-width: 160px; } }
.pbody p.good { color: #8fe39a; } .pbody p.warn { color: #ffc27a; }
.btn.bad { background: linear-gradient(#8a2a22, #5e1a14); border-color: #b04a3a; }

/* ===== celular: jogo só deitado, interface compacta (v4.4) ===== */
body.mobile #fps { top: auto; bottom: calc(3px + var(--sab)); left: calc(6px + var(--sal)); transform: none; font-size: 9px; padding: 1px 5px; background: rgba(0,0,0,0.35); }
body.mobile .guide { display: none; }
body.mobile .card { zoom: 0.62; }
body.mobile .menubar { zoom: 0.7; top: calc(6px + var(--sat)); bottom: auto; right: auto; left: 50%; transform: translateX(-50%); }
body.mobile .hotbar { zoom: 0.72; }
body.mobile .ammo { zoom: 0.75; }
body.mobile #minimap { width: 84px; height: 84px; }
body.mobile .season { zoom: 0.8; position: fixed; top: calc(122px + var(--sat)); left: calc(8px + var(--sal)); right: auto; }
body.mobile .vehhud { zoom: 0.72; bottom: auto; top: calc(232px + var(--sat)); left: calc(8px + var(--sal)); transform: none; min-width: 170px; }
body.mobile .vehhud .hint { display: none; }
body.mobile .prompt { font-size: 11px; padding: 2px 8px; }
body.mobile #toasts { top: calc(40px + var(--sat)); width: 40vw; gap: 3px; }
body.mobile .toast { font-size: 9.5px; padding: 3px 8px; line-height: 1.2; }
body.mobile .banner { top: calc(40px + var(--sat)); font-size: 11px; padding: 4px 10px; }
body.mobile .panel { zoom: 0.8; max-height: calc(125vh - 16px); }
body.mobile .vehcard img { width: 72px; height: 72px; }
body.mobile .pbody .hint { font-size: 11px; }
body.mobile .bottom { bottom: calc(6px + var(--sab)); }
body.mobile .channel { bottom: calc(62px + var(--sab)); }
/* celular em pé: bloqueia e pede para deitar */
#rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  #rotate { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; position: fixed; inset: 0; z-index: 90; background: #0b0c0a; color: #f0eadb; font: 600 17px Inter, sans-serif; text-align: center; padding: 24px; pointer-events: auto; animation: none; transform: none; top: 0; left: 0; border-radius: 0; }
  #rotate .ic { font-size: 64px; animation: girar 1.8s ease-in-out infinite; }
  #rotate small { opacity: .7; font-size: 13px; max-width: 320px; }
}
@keyframes girar { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
.slot.hs .usebadge { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font: 800 9px Inter, sans-serif; background: rgba(95,211,122,0.9); color: #0b0c0a; padding: 0 4px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.slot.hs:not(.active) .usebadge { background: rgba(255,255,255,0.18); color: #fff; font-size: 8px; }
.mapwrap { position: relative; display: flex; justify-content: center; }
.mapwrap canvas { border-radius: 10px; cursor: grab; }
.mapzoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mapzoom .btn { min-width: 40px; font-size: 16px; }
/* compra de diamantes (Pix) */
.pixbox { margin-bottom: 12px; }
.pixbox h3 { margin: 4px 0 8px; color: var(--amber); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 6px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border-radius: 12px; background: linear-gradient(#1f2a33, #151b20); border: 1px solid rgba(110,190,255,0.25); }
.pack.best { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(245,197,66,0.35) inset; }
.pack .pd { font: 800 20px Inter, sans-serif; }
.pack .bonus { color: #8fe39a; min-height: 14px; }
.pack .ribbon { position: absolute; top: -8px; font: 800 9px Inter, sans-serif; background: var(--amber); color: #111; padding: 1px 6px; border-radius: 6px; }
.pixqr { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pixqr img { width: 210px; height: 210px; background: #fff; padding: 8px; border-radius: 10px; }
.pixqr input { width: min(420px, 100%); font: 12px monospace; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: #0f110d; color: #ddd; }
.putbtns { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }

/* celular deitado / telas baixas: logo menor, prévia ao lado, campos compactos */
@media (max-height: 560px) {
  #login { gap: 6px; padding: 10px; }
  .logo h1 { font-size: clamp(34px, 8vh, 56px); }
  .logo p { display: none; }
  .loginform { gap: 5px; padding: 10px 14px; width: min(560px, 96vw); display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; align-items: center; }
  .loginform > * { grid-column: 1 / -1; }
  .loginform input { padding: 8px 10px; font-size: 14px; grid-column: 1; }
  .loginform .preview { grid-column: 2; grid-row: 1 / span 3; width: 96px; height: 96px; }
  .loginform .pick { grid-column: 1 / -1; }
  .sw { width: 20px; height: 20px; }
}

/* LGPD: aceite no cadastro/compra e caixa de privacidade nos ajustes */
.aceite { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.35; text-align: left; margin: 6px 0; cursor: pointer; }
.aceite input { width: auto; margin-top: 2px; flex: none; }
.aceite a, .foot a, .privbox a { color: #9fdc86; }
.privbox { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.privbox h3 { margin: 0 0 6px; font-size: 15px; }
.privbox .row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.privbox input[type=password] { flex: 1; min-width: 140px; }
.btn.warn { background: #8a3a2c; }

.abtn.atk .atkimg { width: 64%; height: 64%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); pointer-events: none; }

/* menu de cima no celular: deslizar para baixo aumenta (com nomes), para cima volta; puxador indica o gesto */
body.mobile .menubar { transition: zoom .18s ease, transform .18s ease; }
body.mobile .menubar::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 34px; height: 4px; margin-left: -17px; border-radius: 3px; background: rgba(255,255,255,.35); }
body.mobile .menubar.grande { zoom: 1.25; z-index: 40; gap: 6px; }
body.mobile .menubar.grande .mbtn { width: 58px; padding: 7px 3px 5px; }
body.mobile .menubar.grande .mbtn .lb { display: block; font-size: 9px; }
body.mobile .menubar.grande .mbtn .ic { font-size: 22px; }

/* progresso da criação dentro do painel; barra de ação por cima do painel quando ele está aberto */
.craftprog { position: relative; height: 22px; border-radius: 11px; background: rgba(0,0,0,0.55); border: 1px solid var(--line); overflow: hidden; margin: 8px 0 4px; visibility: hidden; }
.craftprog.show { visibility: visible; }   /* o espaço fica sempre reservado: nada pula quando a barra aparece/some */
.craftprog .cfill { height: 100%; width: 0; background: linear-gradient(90deg, #6a8a2a, #a6e22e); }
.craftprog span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.channel.sobre { position: fixed; z-index: 30; top: calc(6px + var(--sat)); bottom: auto; }
body.mobile .channel.sobre { top: calc(4px + var(--sat)); bottom: auto; }
.btn:disabled { opacity: .5; pointer-events: none; }
