/* Jogo da Vida Real v2 — skin idle AAA (fantasy vibrante, onyx + aurum) */
:root {
  --onyx: #0D0D0F;
  --graphite: #1A1A1C;
  --hairline: #26262A;
  --bone: #F5F5F7;
  --ash: #8A8A93;
  --aurum: #E8B04B;
  --aurum-lux: #F1C25A;
  --aurum-deep: #C6862A;
  --ruby: #C0392B;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Sora', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --nav-h: 74px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: var(--aurum-deep) var(--onyx); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--onyx); }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--aurum-deep); }
::selection { background: var(--aurum); color: var(--onyx); }
:focus-visible { outline: 2px solid var(--aurum); outline-offset: 2px; }

body {
  background: var(--onyx);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  min-height: 100vh;
  overflow-x: hidden;
}
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .05;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}

/* ---------- cenario pintado por aba ---------- */
.scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center top;
  opacity: 0; transition: opacity .8s var(--ease);
  filter: saturate(1.05);
}
.scene.on { opacity: 1; }
.scene::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,15,.55), rgba(13,13,15,.28) 30%, rgba(13,13,15,.62) 72%, var(--onyx) 100%);
}
#scene-reino { background-image: url('/assets/game/img/bg_reino.webp'); }
#scene-forja { background-image: url('/assets/game/img/bg_forja.webp'); }
#scene-loja  { background-image: url('/assets/game/img/bg_loja.webp'); }
#scene-metas { background-image: url('/assets/game/img/bg_metas.webp'); }
#scene-cofre { background-image: url('/assets/game/img/bg_reino.webp'); filter: saturate(.9) brightness(.85); }

.wrap { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: calc(clamp(14px, 2.5vw, 28px) + env(safe-area-inset-top, 0px)) clamp(14px, 3vw, 28px) calc(var(--nav-h) + 40px); }

/* ---------- header ---------- */
header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--bone); }
.logo svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.logo .name { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .06em; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.logo .name em { font-style: normal; color: var(--aurum); }
.badge {
  font-size: 10px; letter-spacing: .16em; padding: 5px 12px; border-radius: 4px;
  border: 1px solid var(--aurum-deep); color: var(--aurum-lux);
  background: rgba(13,13,15,.65); backdrop-filter: blur(4px); display: none;
}
.badge.on { display: inline-block; animation: badge-breathe 3s var(--ease) infinite; }
@keyframes badge-breathe { 50% { opacity: .5; } }

/* pilulas de moeda no header (estilo mobile game) */
.pills { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px 5px 6px; border-radius: 999px;
  background: rgba(13,13,15,.72); border: 1px solid var(--hairline);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 14px rgba(0,0,0,.45);
  font-weight: 700; font-size: 13px; white-space: nowrap;
}
.pill img, .pill svg { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.pill .u { color: var(--ash); font-size: 10px; font-weight: 400; margin-left: 2px; }
.pill.gold { border-color: rgba(232,176,75,.5); color: var(--aurum-lux); }
.pill.ess { color: #FFD98A; }
.pill.streak.dead img { filter: grayscale(1) brightness(.5); }

/* ---------- abas / cenas ---------- */
.tab { display: none; animation: tab-in .5s var(--ease); }
.tab.on { display: block; }
@keyframes tab-in { from { opacity: 0; transform: translateY(14px); } }

h2 { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .26em; color: var(--ash); text-transform: uppercase; display: flex; align-items: baseline; gap: 12px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
h2 .sub { font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: .05em; text-transform: none; }
section { padding-top: clamp(20px, 2.6vw, 28px); }

/* ---------- painel vitrificado padrao ---------- */
.panel {
  background: rgba(18,18,20,.78);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 34px rgba(0,0,0,.5);
}

/* ---------- hero (REINO): palco central ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: clamp(18px, 2.6vw, 28px) clamp(16px, 3vw, 40px) 22px; margin-top: 16px;
  background:
    radial-gradient(ellipse 60% 55% at 50% 62%, rgba(232,176,75,.10), transparent 70%),
    rgba(18,18,20,.78);
}
.xprow { display: flex; align-items: center; gap: 14px; width: min(680px, 100%); }
.lvbadge {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 38% 30%, #FFE29A, var(--aurum) 55%, var(--aurum-deep));
  border: 2px solid #8A5E1D;
  box-shadow: 0 4px 0 #7A5218, 0 8px 18px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.55), 0 0 18px rgba(232,176,75,.35);
}
.lvbadge .n { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; color: #3A2405; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.lvbadge .t { display: block; font-size: 7px; letter-spacing: .22em; color: #6B4514; font-weight: 700; margin-top: 1px; }
.xptrack { flex: 1; min-width: 0; }
.xpmeta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 7px; flex-wrap: wrap; }
.xpmeta .xp-now { font-weight: 700; font-size: 14px; }
.xpmeta .xp-now .t { color: var(--ash); font-weight: 400; font-size: 11px; }
.xpmeta .xp-next { color: var(--ash); font-size: 11px; }
.xpbar { position: relative; height: 24px; background: rgba(10,10,12,.9); border: 1px solid #2E2A20; border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 6px rgba(0,0,0,.8); }
.goldrow {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 7px 18px; border-radius: 999px;
  background: rgba(13,13,15,.55); border: 1px solid rgba(232,176,75,.28);
}
.goldrow img { width: 26px; height: 26px; object-fit: contain; align-self: center; filter: drop-shadow(0 2px 5px rgba(0,0,0,.6)); }
.goldrow .amount { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); color: var(--aurum-lux); text-shadow: 0 0 16px rgba(232,176,75,.4); font-variant-numeric: tabular-nums; }
.goldrow .glbl { color: var(--ash); font-size: 9px; letter-spacing: .22em; }
.goldrow .last { color: var(--ash); font-size: 10px; }
.goldrow .last b { color: var(--aurum); font-weight: 700; }
.player { display: block; text-decoration: none; color: inherit; position: relative; transition: transform .4s var(--ease); margin-top: 2px; }
.player:hover { transform: translateY(-4px); }
.player .pimg {
  display: block; width: auto; height: clamp(260px, 38vh, 400px); margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.65)) drop-shadow(0 0 26px rgba(232,176,75,.16));
  animation: pFloat 4.6s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes pFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
.player .plinth {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 70%; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(232,176,75,.38), transparent 70%);
  filter: blur(3px); z-index: -1;
}
.pid { text-align: center; }
.pid .pname { font-size: 10px; letter-spacing: .3em; color: var(--ash); }
.pid .ptitle { font-size: 11px; letter-spacing: .18em; color: var(--aurum); margin-top: 4px; font-weight: 700; }
.xpbar .liquid {
  position: absolute; inset: 2px auto 2px 2px; width: 0%; border-radius: 999px;
  background: linear-gradient(180deg, #FFDF95, var(--aurum) 45%, var(--aurum-deep));
  transition: width 1.2s var(--ease);
  box-shadow: 0 0 16px rgba(232,176,75,.55), inset 0 1px 0 rgba(255,255,255,.55);
}
.xpbar .liquid::after {
  content: ''; position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.4) 50%, transparent 58%);
  background-size: 220% 100%;
  animation: shimmer 3.2s var(--ease) infinite;
}
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -110% 0; } }
.goldbox { text-align: right; }
.goldbox .amount { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3vw, 32px); color: var(--aurum-lux); text-shadow: 0 0 18px rgba(232,176,75,.4); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.goldbox .amount img { width: 34px; height: 34px; object-fit: contain; }
.goldbox .lbl { color: var(--ash); font-size: 10px; letter-spacing: .22em; margin-top: 2px; }
.goldbox .last { color: var(--ash); font-size: 10px; margin-top: 6px; }
.goldbox .last b { color: var(--aurum); font-weight: 700; }

/* ---------- party ---------- */
.party { padding: 14px 16px 10px; margin-top: 16px; }
.party .row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.member { flex: 1 0 104px; min-width: 104px; text-align: center; padding: 12px 4px 8px; border: 1px solid transparent; border-radius: 8px; transition: border-color .4s var(--ease), background .4s var(--ease); }
.member:hover { border-color: var(--hairline); }
.member .pav {
  width: 62px; height: 62px; border-radius: 50%; object-fit: cover; object-position: top;
  border: 2px solid #34343a; display: inline-block;
  background: #121214;
  filter: saturate(.55) brightness(.8);
  box-shadow: 0 6px 14px rgba(0,0,0,.55);
  transition: filter .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
  animation: idle 3.4s var(--ease) infinite;
}
.member:nth-child(2n) .pav { animation-delay: -1.1s; }
.member:nth-child(3n) .pav { animation-delay: -2.2s; }
@keyframes idle { 50% { transform: translateY(-3px); } }
.member .nm { font-size: 10px; letter-spacing: .1em; color: var(--bone); margin-top: 7px; }
.member .rl { font-size: 9px; color: var(--ash); margin-top: 1px; }
.member .act { font-size: 8px; color: var(--aurum-deep); margin-top: 4px; min-height: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.member.ativo { border-color: var(--aurum-deep); background: linear-gradient(180deg, rgba(232,176,75,.10), transparent); }
.member.ativo .pav {
  filter: none; border-color: var(--aurum-lux);
  box-shadow: 0 0 16px rgba(232,176,75,.55), 0 6px 14px rgba(0,0,0,.55);
  animation-duration: 1.6s;
}
.member.ativo .nm::after { content: ' ●'; color: var(--aurum-lux); animation: badge-breathe 1.6s var(--ease) infinite; }
.member.ativo .act { color: var(--aurum-lux); }

/* ---------- dungeon ---------- */
.dungeon-panel { position: relative; margin-top: 14px; overflow: hidden; }
.dungeon-scroll { overflow-x: auto; background: #121214; }
#dungeon {
  display: block; height: 300px;
  background:
    linear-gradient(180deg, rgba(13,13,15,.45), rgba(13,13,15,.10) 35%, rgba(13,13,15,.55) 90%),
    url('/assets/game/img/dungeon_map.webp') center / 100% 100% no-repeat #121214;
}
.dungeon-legend { display: flex; gap: 18px; padding: 10px 14px; border-top: 1px solid var(--hairline); color: var(--ash); font-size: 10px; flex-wrap: wrap; }
.dungeon-legend b { color: var(--bone); font-weight: 700; }
.dungeon-legend .dot { color: var(--aurum); }

/* ---------- columns ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 32px); align-items: start; }

/* ---------- quests ---------- */
.quest { position: relative; border: 1px solid var(--hairline); border-radius: 8px; padding: 14px 16px 13px; margin-top: 12px; background: rgba(26,26,28,.85); transition: border-color .4s var(--ease); }
.quest:hover { border-color: #34343a; }
.quest .tag { font-size: 9px; letter-spacing: .22em; color: var(--ash); }
.quest .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 5px; }
.quest .title { font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.35; }
.quest .reward { color: var(--aurum); font-weight: 700; font-size: 11px; white-space: nowrap; }
.quest .bar { position: relative; height: 9px; background: rgba(10,10,12,.9); border-radius: 5px; margin-top: 11px; overflow: hidden; }
.quest .bar i { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, var(--aurum-deep), var(--aurum)); transition: width 1s var(--ease); border-radius: 5px; }
.quest .count { display: flex; justify-content: space-between; color: var(--ash); font-size: 10px; margin-top: 6px; }
.quest.boss { background: linear-gradient(165deg, rgba(34,26,13,.92), rgba(26,26,28,.88) 55%); border-color: var(--aurum-deep); }
.quest.boss .tag { color: var(--aurum-lux); }
.quest.boss::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--aurum), transparent); }
.skull { width: 13px; height: 13px; vertical-align: -2px; margin-right: 6px; }
.skull path { fill: var(--aurum-lux); }
.empty { color: var(--ash); padding: 18px 2px; font-size: 12px; }

/* ---------- feed ---------- */
.feed-item { display: flex; gap: 12px; align-items: baseline; padding: 9px 2px; border-bottom: 1px solid rgba(24,24,27,.9); font-size: 12px; }
.feed-item.fresh { animation: land .7s var(--ease); }
@keyframes land { from { opacity: 0; transform: translateX(14px); } }
.feed-item .hora { color: var(--ash); font-size: 10px; white-space: nowrap; }
.feed-item .txt { min-width: 0; }
.feed-item .val { margin-left: auto; color: var(--aurum); font-weight: 700; white-space: nowrap; }
.feed-item.treino { opacity: .38; }
.feed-item.treino .txt::after { content: ' [treino]'; color: var(--aurum-deep); font-size: 10px; }
.feed-item.loot { color: var(--aurum-lux); }
.feed-item.loot .txt { font-weight: 700; }
.feed-end { text-align: center; color: #3a3a40; font-size: 10px; letter-spacing: .3em; padding: 14px 0 4px; }
.feed-panel { padding: 4px 16px 10px; margin-top: 12px; max-height: 420px; overflow-y: auto; }

/* ---------- botao gordo dourado ---------- */
.btn-gold {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 34px;
  font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .06em;
  color: #3A2405; text-shadow: 0 1px 0 rgba(255,255,255,.4);
  background: linear-gradient(180deg, #FFE29A 0%, var(--aurum-lux) 38%, var(--aurum) 62%, var(--aurum-deep) 100%);
  border: 1px solid #8A5E1D; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 0 #7A5218, 0 10px 22px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.65);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .2s;
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #7A5218, 0 5px 12px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.65); }
.btn-gold:disabled { filter: grayscale(.75) brightness(.75); cursor: not-allowed; transform: none; }
.btn-gold img { width: 26px; height: 26px; object-fit: contain; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px;
  font-family: var(--display); font-weight: 700; font-size: 12px;
  color: var(--aurum-lux); background: rgba(232,176,75,.08);
  border: 1px solid var(--aurum-deep); border-radius: 10px; cursor: pointer;
  transition: background .3s var(--ease);
}
.btn-ghost:hover { background: rgba(232,176,75,.16); }

/* ---------- FORJA ---------- */
.forge-stage { display: grid; grid-template-columns: 1fr auto; gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(18px, 3vw, 30px); margin-top: 16px; }
.chest-zone { text-align: center; position: relative; }
.chest-zone .chest { width: min(300px, 62vw); height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.7)); transition: transform .3s var(--ease); }
.chest-zone.full .chest { animation: chestShake 2.4s var(--ease) infinite; }
@keyframes chestShake { 0%, 84%, 100% { transform: rotate(0); } 88% { transform: rotate(-2deg) scale(1.02); } 92% { transform: rotate(2deg) scale(1.02); } 96% { transform: rotate(-1deg); } }
.chest-zone .glowring {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: -1;
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,176,75,.35), transparent 65%);
  animation: ringPulse 3s var(--ease) infinite;
}
@keyframes ringPulse { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .7; } }
.pend { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 52px); color: #FFD98A; text-shadow: 0 0 22px rgba(232,176,75,.55); font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 10px; }
.pend img { width: 44px; height: 44px; object-fit: contain; }
.pend-sub { color: var(--ash); font-size: 11px; margin-top: 4px; }
.fillbar { position: relative; height: 12px; border-radius: 999px; background: rgba(10,10,12,.9); overflow: hidden; margin: 14px auto 18px; max-width: 320px; box-shadow: inset 0 2px 5px rgba(0,0,0,.8); }
.fillbar i { position: absolute; inset: 2px auto 2px 2px; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--aurum-deep), var(--aurum-lux)); transition: width 1s var(--ease); box-shadow: 0 0 12px rgba(232,176,75,.6); }
.gens { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.gen-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(26,26,28,.85); border: 1px solid var(--hairline); }
.gen-card img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.gen-card .t { font-family: var(--display); font-weight: 700; font-size: 12px; line-height: 1.3; }
.gen-card .r { color: #FFD98A; font-size: 11px; font-weight: 700; margin-top: 3px; }
.forge-empty { text-align: center; padding: 26px 18px; color: var(--ash); font-size: 12px; line-height: 1.7; }
.forge-empty b { color: var(--aurum-lux); }

/* ---------- LOJA ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.shop-card {
  position: relative; text-align: center; padding: 18px 14px 16px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(30,28,24,.92), rgba(20,20,22,.92));
  border: 2px solid transparent;
  border-image: url('/assets/game/img/frame_card.webp') 130 / 14px stretch;
  transition: transform .3s var(--ease);
}
.shop-card:hover { transform: translateY(-4px); }
.shop-card img.icon { width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.65)); }
.shop-card .t { font-family: var(--display); font-weight: 700; font-size: 13px; margin-top: 10px; line-height: 1.3; }
.shop-card .d { color: var(--ash); font-size: 10px; margin-top: 4px; min-height: 26px; }
.shop-card .price { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 800; font-size: 15px; color: #FFD98A; }
.shop-card .price img { width: 20px; height: 20px; }
.shop-card .buy { margin-top: 10px; width: 100%; --h: 40px; font-size: 13px; padding: 0 12px; }
.shop-card .stock { position: absolute; top: 8px; right: 10px; font-size: 9px; color: var(--ash); letter-spacing: .1em; }
.shop-card.cant img.icon { filter: grayscale(.65) brightness(.7); }

/* compras pendentes de resgate */
.pending-list { margin-top: 12px; }
.pending-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; background: rgba(26,26,28,.85); border: 1px solid var(--hairline); margin-top: 8px; }
.pending-item .t { font-weight: 700; }
.pending-item .btn-ghost { margin-left: auto; }

/* ---------- METAS ---------- */
.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.boss-card {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--aurum-deep);
  background: var(--graphite);
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
}
.boss-card .art { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; filter: saturate(1.05); }
.boss-card.done .art { filter: grayscale(.15) brightness(.9); }
.boss-card .body { padding: 13px 15px 14px; position: relative; }
.boss-card .tag { font-size: 9px; letter-spacing: .24em; color: var(--aurum-lux); }
.boss-card .t { font-family: var(--display); font-weight: 800; font-size: 15px; margin-top: 4px; line-height: 1.3; }
.boss-card .bar { position: relative; height: 9px; background: rgba(10,10,12,.9); border-radius: 5px; margin-top: 10px; overflow: hidden; }
.boss-card .bar i { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, var(--aurum-deep), var(--aurum)); border-radius: 5px; transition: width 1s var(--ease); }
.boss-card .meta-row { display: flex; justify-content: space-between; color: var(--ash); font-size: 10px; margin-top: 6px; }
.boss-card .reward { color: var(--aurum); font-weight: 700; }
.boss-card .deadline { color: var(--ash); font-size: 10px; margin-top: 6px; }
.boss-card .deadline b { color: var(--bone); }
.boss-card .laurel {
  position: absolute; top: 10px; right: 10px; width: 64px; height: 64px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.7)); display: none;
}
.boss-card.done .laurel { display: block; animation: laurelIn .8s var(--ease); }
@keyframes laurelIn { from { opacity: 0; transform: scale(1.6) rotate(-12deg); } }
.boss-card.done::after { content: 'DERROTADO'; position: absolute; top: 18px; left: -34px; transform: rotate(-32deg); background: var(--aurum); color: #3A2405; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: .2em; padding: 4px 40px; box-shadow: 0 4px 10px rgba(0,0,0,.5); }

/* ---------- COFRE ---------- */
.vault-stage { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(18px, 3vw, 30px); margin-top: 16px; }
.vault-stage img.door { width: min(230px, 50vw); height: auto; filter: drop-shadow(0 16px 28px rgba(0,0,0,.7)); }
.vault-stage .amount { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6vw, 58px); color: var(--aurum-lux); text-shadow: 0 0 24px rgba(232,176,75,.45); font-variant-numeric: tabular-nums; }
.vault-stage .lbl { color: var(--ash); font-size: 10px; letter-spacing: .22em; margin-top: 4px; }
.vault-stage .rule { color: var(--ash); font-size: 11px; margin-top: 14px; line-height: 1.7; max-width: 420px; }
.vault-stage .rule b { color: #FFD98A; }
.ledger { margin-top: 14px; }
.ledger-item { display: flex; gap: 12px; align-items: baseline; padding: 9px 14px; border-bottom: 1px solid rgba(24,24,27,.9); font-size: 12px; }
.ledger-item .d { color: var(--ash); font-size: 10px; white-space: nowrap; }
.ledger-item .v { margin-left: auto; font-weight: 700; white-space: nowrap; }
.ledger-item .v.pos { color: var(--aurum-lux); }
.ledger-item .v.neg { color: var(--ash); }

/* ---------- nav inferior (mobile game) ---------- */
nav.game-nav {
  position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80;
  display: flex; gap: 4px; padding: 8px;
  background: rgba(13,13,15,.88); border: 1px solid var(--hairline); border-radius: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 66px; padding: 7px 10px 6px; border: 0; border-radius: 12px;
  background: none; cursor: pointer; color: var(--ash);
  font-family: var(--display); font-weight: 700; font-size: 9px; letter-spacing: .14em;
  transition: background .3s var(--ease), color .3s var(--ease), transform .2s var(--ease);
  position: relative;
}
.nav-btn img { width: 34px; height: 34px; object-fit: contain; filter: grayscale(.7) brightness(.75); transition: filter .3s var(--ease), transform .3s var(--ease); }
.nav-btn:hover img { filter: grayscale(.2); }
.nav-btn.on { color: var(--aurum-lux); background: linear-gradient(180deg, rgba(232,176,75,.16), rgba(232,176,75,.04)); }
.nav-btn.on img { filter: none; transform: translateY(-3px) scale(1.12); }
.nav-btn .dot { position: absolute; top: 5px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--ruby); border: 2px solid var(--onyx); display: none; }
.nav-btn.notif .dot { display: block; animation: badge-breathe 1.4s var(--ease) infinite; }

/* ---------- toasts / fx / overlays (herdados do HUD v2) ---------- */
.toasts { position: fixed; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  background: var(--graphite); border: 1px solid var(--aurum-deep); border-radius: 8px;
  padding: 12px 18px; color: var(--bone);
  box-shadow: 0 8px 30px rgba(0,0,0,.6), 0 0 18px rgba(232,176,75,.18);
  animation: toast-in .6s var(--ease);
}
.toast b { color: var(--aurum-lux); }
.toast.out { transition: opacity .6s var(--ease), transform .6s var(--ease); opacity: 0; transform: translateX(20px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px); } }
.burst-coin { position: fixed; top: 0; left: 0; width: 12px; height: 12px; z-index: 95; pointer-events: none; background-size: contain; background-repeat: no-repeat; }

.levelup { position: fixed; inset: 0; z-index: 110; display: none; place-items: center; pointer-events: none; background: radial-gradient(circle at 50% 45%, rgba(232,176,75,.12), transparent 55%), linear-gradient(rgba(13,13,15,.74), rgba(13,13,15,.74)); backdrop-filter: blur(2px); }
.levelup.on { display: grid; animation: lv-bg 2.8s var(--ease) forwards; }
@keyframes lv-bg { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.levelup .card { text-align: center; animation: lv-card 2.8s var(--ease) forwards; position: relative; }
@keyframes lv-card { 0% { opacity: 0; transform: scale(.85); } 12% { opacity: 1; transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }
.levelup .banner { width: min(420px, 80vw); }
.levelup .t { font-size: 11px; letter-spacing: .5em; color: var(--ash); }
.levelup .n { font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 120px); color: var(--aurum-lux); text-shadow: 0 0 40px rgba(232,176,75,.6); line-height: 1.05; }
.levelup .rays { position: absolute; inset: 0; margin: auto; width: 340px; height: 340px; opacity: .5; }
.levelup .rays line { stroke: var(--aurum); stroke-width: 1; }

#coins { position: fixed; inset: 0; z-index: 100; pointer-events: none; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 130; background: rgba(8,8,10,.7); backdrop-filter: blur(3px); display: none; place-items: center; }
.modal-bg.on { display: grid; animation: tab-in .3s var(--ease); }
.modal { width: min(380px, 92vw); padding: 22px; text-align: center; }
.modal img.icon { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.7)); }
.modal .t { font-family: var(--display); font-weight: 800; font-size: 18px; margin-top: 10px; }
.modal .d { color: var(--ash); font-size: 12px; margin-top: 6px; line-height: 1.6; }
.modal .price { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-weight: 800; font-size: 20px; color: #FFD98A; }
.modal .price img { width: 26px; height: 26px; }
.modal .actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

footer { margin-top: clamp(30px, 4vw, 44px); padding-top: 16px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 12px; color: var(--ash); font-size: 10px; letter-spacing: .08em; flex-wrap: wrap; }
footer .g { color: var(--aurum-deep); }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .player .pimg { height: clamp(220px, 34vh, 300px); }
  .lvbadge { width: 48px; height: 48px; }
  .lvbadge .n { font-size: 19px; }
  .goldrow .last { width: 100%; text-align: center; }
  .forge-stage { grid-template-columns: 1fr; }
  .vault-stage { grid-template-columns: 1fr; text-align: center; }
  .vault-stage .rule { margin-left: auto; margin-right: auto; }
  .pills { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
