/* ═══════════════════════════════════════════════════════════
   BLOODFORGE 2.0 (Egg, Inc. mechanics) — scoped under .bf-shell
   Phone <1100px: one panel + bottom tabs.  Desktop ≥1100px: 3 columns.
═══════════════════════════════════════════════════════════ */
.bf-shell {
  --bf-bg: #0a0608; --bf-card: #160b10; --bf-card2: #1f0f17; --bf-line: rgba(255,255,255,.08);
  --bf-crimson: #c81e3a; --bf-ember: #ff7a1a; --bf-soul: #5ad1ff; --bf-gold: #ffd23c;
  --bf-text: #efe6e9; --bf-text2: #b3a3aa; --bf-bad: #ff3b5c; --bf-steel: #8f86c9;
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% -10%, #2a0d16 0%, transparent 55%), var(--bf-bg);
  color: var(--bf-text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.bf-shell button { font-family: inherit; color: inherit; }

/* ── Top bar ── */
.bf-top {
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px 12px;
  background: linear-gradient(180deg, #1a0a11, #10070b);
  border-bottom: 1px solid var(--bf-line); flex-shrink: 0;
}
.bf-back { position: static !important; flex-shrink: 0; }
.bf-souls { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.bf-cur-icon { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 6px var(--bf-soul)); }
.bf-souls-num { font-size: 22px; font-weight: 900; line-height: 1.05; letter-spacing: .5px; }
.bf-souls-rate { font-size: 12px; font-weight: 700; color: var(--bf-soul); }
.bf-top-right { display: flex; gap: 6px; }
.bf-icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bf-line);
  background: var(--bf-card); font-size: 18px; cursor: pointer;
}

/* ── Layout ── */
.bf-grid { flex: 1; min-height: 0; position: relative; }
.bf-panel { display: none; height: 100%; overflow-y: auto; padding: 10px 12px 16px; }
.bf-panel.on { display: flex; flex-direction: column; gap: 10px; }
.bf-battle.on { padding: 0; gap: 0; overflow: hidden; }
.phone-hide { display: none; }

/* ── Cards / lists ── */
.bf-card {
  background: linear-gradient(180deg, var(--bf-card2), var(--bf-card));
  border: 1px solid rgba(200,30,58,.22); border-radius: 14px; padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.bf-card-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.bf-h { font-size: 15px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bf-gold); }
.bf-sub { font-size: 12px; color: var(--bf-text2); }
.bf-sub.bad { color: var(--bf-bad); font-weight: 700; }
.bf-hint { font-size: 12px; color: var(--bf-text2); margin-top: 6px; }
.bf-lv { font-size: 12px; color: var(--bf-text2); font-weight: 600; margin-left: 4px; }

.bf-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bf-slot {
  background: rgba(0,0,0,.28); border: 1px solid var(--bf-line); border-radius: 12px;
  padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.bf-slot.empty { border-style: dashed; }
.bf-slot-img { width: 64px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.bf-slot-plus { width: 64px; height: 52px; display: grid; place-items: center; font-size: 30px; color: var(--bf-text2); }
.bf-slot-name { font-size: 13px; font-weight: 800; }
.bf-slot-cap { font-size: 12px; color: var(--bf-text2); }
.bf-slot .bf-buy { width: 100%; margin-top: 4px; }

.bf-rows { display: flex; flex-direction: column; gap: 6px; }
.bf-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.bf-row.locked .bf-row-name { opacity: .6; }
.bf-row-name { font-size: 13px; font-weight: 700; }
.bf-row-note { font-size: 12px; color: #d2c3c9; }

.bf-buy {
  min-height: 44px; min-width: 76px; padding: 4px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); background: #2a1a20; color: var(--bf-text2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
}
.bf-buy.ok {
  background: linear-gradient(180deg, #ffb347, #e8661a); color: #2a0c00; border-color: #ffcf7a;
  box-shadow: 0 0 10px rgba(255,122,26,.35);
}
.bf-buy:disabled { cursor: default; opacity: .75; background: #1a1015; }
.bf-buy:disabled .bf-buy-cost { color: #ff8a9c; }
.bf-buy-cost::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; background: url(../img/slayer/icon_soul.png) center/contain no-repeat; }
.bf-buy:not(:disabled):active { transform: translateY(1px); }
.bf-buy-what { font-size: 12px; font-weight: 700; }
.bf-buy-cost { font-size: 14px; font-weight: 900; }
.bf-max { font-size: 12px; font-weight: 900; color: var(--bf-gold); letter-spacing: 1px; min-height: 44px; display: grid; place-items: center; }

/* Arsenal */
.bf-mult { display: flex; gap: 6px; margin-bottom: 6px; }
.bf-mult { flex-wrap: wrap; }
.bf-mult button { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--bf-line); background: #20121a; cursor: pointer; font-weight: 800; }
.bf-mult button.on { background: var(--bf-gold); color: #2a1a00; }
.bf-tier-h { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bf-ember); margin: 10px 0 4px; }
.bf-tier-h.locked { color: var(--bf-text2); }
.bf-tier-h span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.bf-res { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--bf-line); }
.bf-res-icon { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: rgba(0,0,0,.3); }
.bf-res-info { flex: 1; min-width: 0; }
.bf-res-name { font-size: 14px; font-weight: 800; }
.bf-res-desc { font-size: 12px; color: var(--bf-text2); }

/* ── Battle ── */
.bf-scene {
  position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0d0709;
}
.bf-scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; user-select: none; }
.bf-boss {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 52px); object-fit: cover; object-position: center 30%; pointer-events: none; user-select: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 55%, transparent 100%), linear-gradient(#000 80%, transparent);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 42%, #000 55%, transparent 100%), linear-gradient(#000 80%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.bf-scene-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,8,.75) 0%, transparent 28%, transparent 70%, rgba(10,6,8,.9) 100%); pointer-events: none; }
.bf-stream { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bf-tier { position: absolute; top: 0; left: 0; right: 0; text-align: center; padding: 8px 12px 18px; background: linear-gradient(180deg, rgba(10,6,8,.85), rgba(10,6,8,.55) 70%, transparent); }
.bf-tier-name { font-size: 16px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--bf-gold); text-shadow: 0 2px 6px #000; }
.bf-tier-zone { font-size: 12px; color: #ddd; text-shadow: 0 1px 4px #000; }
.bf-goal { max-width: 360px; margin: 6px auto 0; }
.bf-goal-txt { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px #000; margin-bottom: 3px; }
.bf-hunt {
  margin-top: 8px; min-height: 44px; padding: 0 18px; border-radius: 22px; cursor: pointer;
  background: linear-gradient(180deg, #ff5a6e, #b3132f); border: 1px solid #ff9aa8; font-weight: 900; letter-spacing: .5px;
  box-shadow: 0 0 18px rgba(255,59,92,.6); animation: bfPulse 1.4s ease-in-out infinite;
}
.bf-caravan-chip {
  position: absolute; right: 8px; bottom: 6px; display: flex; align-items: center; gap: 4px; z-index: 3;
  background: rgba(10,6,8,.8); border: 1px solid var(--bf-line); border-radius: 12px; padding: 4px 8px; cursor: pointer; min-height: 44px;
}
.bf-caravan-chip img { width: 36px; height: 32px; object-fit: contain; }
.bf-caravan-chip.bad { border-color: var(--bf-bad); box-shadow: 0 0 12px rgba(255,59,92,.55); }
.bf-caravan-chip span { font-size: 12px; font-weight: 800; color: #cfe9f5; }
.bf-caravan-chip.bad span { color: #ff8a9c; font-weight: 900; }

.bf-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; border: 1px solid rgba(0,0,0,.5); }
.bf-fill { height: 100%; min-width: 0; border-radius: 6px; transition: width .2s linear; }
.bf-fill.gold { background: linear-gradient(90deg, #b8860b, var(--bf-gold)); }
.bf-fill.army { background: linear-gradient(90deg, #4b4691, var(--bf-steel)); }
.bf-fill.haul { background: linear-gradient(90deg, #1d6f8c, var(--bf-soul)); }
.bf-fill.fury { background: linear-gradient(90deg, #b54b00, var(--bf-ember)); }
.bf-fill.bad  { background: repeating-linear-gradient(45deg, #ff3b5c 0 8px, #b3132f 8px 16px); box-shadow: 0 0 8px rgba(255,59,92,.7); }

.bf-stats { padding: 8px 12px 4px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, rgba(22,11,16,.95), #10070b); flex-shrink: 0; }
.bf-stat { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
.bf-stat-lbl { white-space: nowrap; grid-row: 1 / 3; font-size: 12px; font-weight: 800; color: var(--bf-text2); text-transform: uppercase; letter-spacing: .5px; }
.bf-stat-val { font-size: 12px; color: var(--bf-text); margin-top: 1px; }
.bf-stat-val.fury { color: var(--bf-ember); font-weight: 800; }
.bf-tip { margin-top: 2px; min-height: 40px; border-radius: 10px; border: 1px solid rgba(255,59,92,.5); background: rgba(255,59,92,.12); color: #ffc2cc; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 10px; text-align: left; }

.bf-action { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 26px; background: #10070b; flex-shrink: 0; }
.bf-side-btn { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; font-weight: 800; color: var(--bf-text2); }
.bf-side-btn img { width: 44px; height: 44px; object-fit: contain; }
.bf-side-btn.soon { opacity: .6; }
.bf-side-btn.soon small { color: var(--bf-gold); }
.bf-side-btn small { font-size: 11px; font-weight: 600; }

.bf-forge {
  --charge: 100%;
  position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, #3a1206 0%, #120507 70%);
  touch-action: none; -webkit-touch-callout: none;
  transition: transform .08s ease-out, filter .15s;
  filter: drop-shadow(0 0 14px rgba(255,122,26,.55));
}
.bf-forge-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--bf-ember) 0 var(--charge), rgba(255,255,255,.08) var(--charge) 100%);
  -webkit-mask: radial-gradient(circle, transparent 62px, #000 63px); mask: radial-gradient(circle, transparent 62px, #000 63px);
}
.bf-forge img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; pointer-events: none; animation: bfBreathe 2.4s ease-in-out infinite; }
.bf-forge-lbl {
  position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  background: #2a0c00; border: 1px solid var(--bf-ember); color: #ffd9b8; padding: 3px 10px; border-radius: 10px;
}
.bf-forge.held { transform: scale(.94); filter: drop-shadow(0 0 26px rgba(255,140,40,.95)) brightness(1.15); }
.bf-forge.held img { animation: bfShake .12s linear infinite; }
.bf-forge.full { filter: grayscale(.6) drop-shadow(0 0 6px rgba(255,59,92,.5)); }

/* ── Tabs (phone) ── */
.bf-tabs { display: flex; flex-shrink: 0; background: #10070b; border-top: 1px solid var(--bf-line); padding-top: 2px; padding-bottom: max(34px, calc(env(safe-area-inset-bottom, 0px) + 14px)); }
.bf-tab { flex: 1; min-width: 0; min-height: 56px; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--bf-text2); position: relative; padding: 4px 0; }
.bf-shell .bf-tab span { font-size: 10.5px; line-height: 1.2; white-space: nowrap; letter-spacing: -.2px; }
@media (max-width: 370px) { .bf-shell .bf-tab span { font-size: 9.5px; } }
.bf-tab img { width: 30px; height: 30px; object-fit: contain; opacity: .8; filter: brightness(1.25); }
.bf-tab.on { color: var(--bf-gold); }
.bf-tab.on img { opacity: 1; filter: drop-shadow(0 0 6px var(--bf-crimson)); }
.bf-dot { position: absolute; top: 6px; right: calc(50% - 20px); width: 10px; height: 10px; border-radius: 50%; background: var(--bf-bad); box-shadow: 0 0 6px var(--bf-bad); }

/* Champions / Ascend placeholders */
.bf-soon-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 30px; }
.bf-soon-card img { width: 120px; height: 120px; object-fit: cover; border-radius: 16px; }
.bf-soon-card p { font-size: 14px; color: var(--bf-text2); max-width: 320px; }

/* ── Ascension ── */
.bf-asc { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bf-asc-wrap { width: 100%; }
.bf-asc-art { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 0 14px var(--bf-ember)); }
.bf-asc-lead { font-size: 14px; color: var(--bf-text2); max-width: 380px; margin: 0; }
.bf-asc-lead strong { color: var(--bf-text); }
.bf-asc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.bf-asc-grid div { background: rgba(0,0,0,.3); border: 1px solid var(--bf-line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.bf-asc-grid span { font-size: 12px; color: var(--bf-text2); }
.bf-asc-grid b { font-size: 18px; }
.bf-asc-grid b.ember { color: var(--bf-ember); }
.bf-asc-box { width: 100%; text-align: left; background: rgba(0,0,0,.3); border: 1px solid var(--bf-line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.bf-asc-box.ready { border-color: var(--bf-gold); box-shadow: 0 0 14px rgba(255,210,60,.25); }
.bf-asc-gain { font-size: 16px; font-weight: 900; color: var(--bf-gold); }
.bf-asc-after, .bf-asc-next { font-size: 13px; color: var(--bf-text2); }
.bf-asc-after b, .bf-asc-next b { color: var(--bf-text); }
.bf-asc-btn { width: 100%; flex: none; }
.bf-asc-btn:disabled { opacity: .5; cursor: default; background: #20121a; border-color: var(--bf-line); }
.bf-asc-note { font-size: 12px; color: var(--bf-text2); margin: 0; }
.bf-asc-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; text-align: left; }
.bf-asc-lists div { border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.bf-asc-lists b { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.bf-asc-lists .keep { background: rgba(110,201,110,.1); border: 1px solid rgba(110,201,110,.35); }
.bf-asc-lists .keep b { color: #8fe08f; }
.bf-asc-lists .lose { background: rgba(255,59,92,.08); border: 1px solid rgba(255,59,92,.3); }
.bf-asc-lists .lose b { color: #ff8a9c; }
.bf-side-btn { background: none; border: 0; cursor: pointer; min-height: 44px; }
.bf-side-btn.ready { color: var(--bf-gold); }
.bf-side-btn.ready img { filter: drop-shadow(0 0 10px var(--bf-gold)); animation: bfPulse 1.4s ease-in-out infinite; }
.bf-side-btn small { color: var(--bf-text2); }
.bf-dot.gold { background: var(--bf-gold); box-shadow: 0 0 6px var(--bf-gold); }

/* ── Bloodstones / Wraith / Rage / Champions (M3) ── */
.bf-stones { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(255,46,99,.4); background: rgba(255,46,99,.08); cursor: pointer; font-weight: 900; font-size: 15px; color: #ff9db3; }
.bf-stones img { width: 22px; height: 22px; object-fit: contain; }
.bf-wraith { position: absolute; left: 0; z-index: 5; width: 84px; height: 84px; border: 0; padding: 0; background: none; cursor: pointer;
  animation: bfWraithFly linear forwards; filter: brightness(1.8) drop-shadow(0 0 4px #bff0ff) drop-shadow(0 0 14px rgba(90,209,255,1)); }
.bf-wraith img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; animation: bfBobFlip 1.2s ease-in-out infinite; transform: scaleX(-1); }
/* the picture faces left; it flies left-to-right, so it is mirrored (bfBob keeps the flip) */
.bf-wraith::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid rgba(90,209,255,.7); animation: bfPing 1.2s ease-out infinite; }
@keyframes bfWraithFly { from { transform: translateX(-90px); } to { transform: translateX(calc(100vw + 20px)); } }
@keyframes bfBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bfBobFlip { 0%,100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-8px); } }
@keyframes bfPing { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.bf-toast { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); z-index: 6; background: rgba(10,6,8,.9); border: 1px solid var(--bf-gold); color: var(--bf-gold); font-weight: 900; padding: 8px 14px; border-radius: 12px; font-size: 14px; white-space: nowrap; pointer-events: none; }
.bf-boosts { position: absolute; left: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.bf-boost { font-size: 12px; font-weight: 800; color: #ffd9b8; background: rgba(42,12,0,.85); border: 1px solid var(--bf-ember); border-radius: 10px; padding: 3px 8px; }
.bf-buy.stone.ok { background: linear-gradient(180deg, #ff6a8a, #c81e3a); color: #fff; border-color: #ff9db3; box-shadow: 0 0 10px rgba(255,46,99,.35); }
.bf-buy-cost.stone::before { background-image: url(../img/slayer/icon_bloodstone.png); }
.bf-mini { min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--bf-line); background: #20121a; cursor: pointer; font-size: 12px; font-weight: 700; margin-top: 4px; }
.bf-champ-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bf-champ-slot { background: rgba(0,0,0,.3); border: 1px solid rgba(255,210,60,.35); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.bf-champ-slot.empty { border-style: dashed; border-color: var(--bf-line); }
.bf-champ-slot img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.bf-champ-name { font-size: 12px; font-weight: 800; }
.bf-champ-bonus { font-size: 12px; color: var(--bf-gold); }
.bf-chest { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px; border-radius: 12px; background: rgba(255,46,99,.08); border: 1px solid rgba(255,46,99,.3); }
.bf-chest img { width: 54px; height: 54px; object-fit: contain; }
.bf-chest-info { flex: 1; min-width: 0; }
.bf-champ-list { display: flex; flex-direction: column; }
.bf-champ { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--bf-line); }
.bf-champ > img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; border: 2px solid #555; }
.bf-champ.r1 > img { border-color: #4aa3ff; } .bf-champ.r2 > img { border-color: #b46bff; } .bf-champ.r3 > img { border-color: var(--bf-gold); }
.bf-champ.locked > img { filter: grayscale(1) brightness(.35); }
.bf-rar { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: 4px; background: #333; color: #ddd; }
.bf-rar.r1 { background: #173a5c; color: #9ccfff; } .bf-rar.r2 { background: #3a1e5c; color: #d6b0ff; } .bf-rar.r3 { background: #5c4a10; color: var(--bf-gold); }
.bf-modal .bf-res { text-align: left; }
.bf-potion-circle_rage { filter: hue-rotate(160deg) saturate(1.3); }
.bf-potion-forge_rage  { filter: hue-rotate(40deg) saturate(1.4) brightness(1.1); }
.bf-tab.on .bf-dot { display: none; }

/* ── Bounties / achievements (M4) ── */
.bf-bounty { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,210,60,.3); }
.bf-bounty.done { border-color: var(--bf-gold); box-shadow: 0 0 12px rgba(255,210,60,.3); }
.bf-bounty-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--bf-text2); }
.bf-bounty .bf-mini { align-self: flex-start; }
.bf-bounty-chip { min-height: 36px; border-radius: 10px; border: 1px solid rgba(255,210,60,.4); background: rgba(255,210,60,.08); color: #ffe9a8; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 10px; text-align: left; }
.bf-bounty-chip.done { background: rgba(255,210,60,.22); animation: bfPulse 1.4s ease-in-out infinite; }
.bf-ach-mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: #20121a; border: 2px solid #6a5560; color: var(--bf-gold); flex-shrink: 0; }
.bf-ach:not(.claimed) .bf-ach-mark:not(:empty) { border-color: var(--bf-gold); background: rgba(255,210,60,.15); }
.bf-ach.claimed { opacity: .55; }
.bf-ach-reward { font-size: 12px; color: #ff9db3; font-weight: 800; min-width: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.bf-ach-reward img { width: 14px; height: 14px; object-fit: contain; }
.bf-lore { font-style: italic; color: #e6d6dc !important; }
.bf-asc-panel.on { display: flex; flex-direction: column; }
.bf-asc-wrap { display: flex; flex-direction: column; gap: 10px; }

/* ── Juice + settings (M5) ── */
.bf-boss.bf-hit { animation: bfHit .22s ease-out; }
@keyframes bfHit { 0% { transform: translate(0,0) scale(1); filter: brightness(1); } 30% { transform: translate(-3px,2px) scale(1.012); filter: brightness(1.35) saturate(1.2); } 60% { transform: translate(3px,-1px); } 100% { transform: none; filter: none; } }
.bf-scene.bf-hunted { animation: bfHunted .9s ease-out; }
@keyframes bfHunted { 0% { filter: brightness(3) saturate(0); } 100% { filter: none; } }
html.bf-no-motion .bf-shell *, html.bf-no-motion .bf-shell *::before, html.bf-no-motion .bf-shell *::after { animation: none !important; transition: none !important; }
.bf-settings .bf-row { padding: 8px 0; border-top: 1px solid var(--bf-line); }
.bf-toggle { min-height: 40px; min-width: 70px; border-radius: 20px; border: 1px solid var(--bf-line); background: #20121a; font-weight: 800; cursor: pointer; }
.bf-toggle.on { background: var(--bf-gold); color: #2a1a00; }
.bf-toggle.warn { border-color: #c81e3a; color: #ff9db3; }
.bf-toggle.danger { background: #c81e3a; border-color: #ff2e63; color: #fff; }
.bf-news { -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); padding-bottom: 24px; }
.bf-range { width: 140px; accent-color: var(--bf-ember); }
.bf-news { max-height: 50vh; overflow-y: auto; text-align: left; font-size: 13px; color: var(--bf-text2); }
.bf-news h4 { color: var(--bf-gold); font-size: 13px; margin: 10px 0 4px; }
.bf-news ul { margin: 0; padding-left: 18px; }
.bf-news li { margin: 2px 0; }
.bf-news li.sub { margin-left: 14px; list-style: circle; }
.bf-version { font-size: 11px; color: var(--bf-text2); text-align: center; margin-top: 6px; }

/* ── Modal ── */
.bf-modal-bg { position: fixed; inset: 0; background: rgba(5,2,4,.88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.bf-modal { background: var(--bf-card2); border: 1px solid var(--bf-crimson); border-radius: 16px; padding: 16px; max-width: 380px; text-align: center; }
.bf-modal p { font-size: 14px; color: var(--bf-text2); margin: 8px 0; }
.bf-modal .bf-warn { color: #ffd0d8; background: rgba(255,59,92,.12); border: 1px solid rgba(255,59,92,.35); border-radius: 10px; padding: 8px; }
.bf-modal .bf-keep { color: #c9f2c9; background: rgba(110,201,110,.1); border: 1px solid rgba(110,201,110,.35); border-radius: 10px; padding: 8px; }
.bf-modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
.bf-modal-icon { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 0 12px var(--bf-ember)); }
.bf-modal-art { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; }
.bf-modal-btns { display: flex; gap: 10px; margin-top: 10px; }
.bf-btn { flex: 1; min-height: 46px; border-radius: 12px; border: 1px solid var(--bf-line); font-weight: 900; cursor: pointer; }
.bf-btn.ghost { background: #20121a; }
.bf-btn.hot { background: linear-gradient(180deg, #ff5a6e, #b3132f); border-color: #ff9aa8; }

/* ── Dev panel ── */
.bf-dev { position: fixed; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 280px; background: #0d0d14; border: 1px solid #5a5aff; border-radius: 12px; padding: 10px; font-size: 12px; }
.bf-dev-h { display: flex; justify-content: space-between; font-weight: 900; margin-bottom: 6px; }
.bf-dev-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.bf-dev button { min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid #333; background: #1a1a26; cursor: pointer; }
.bf-dev button.on { background: #5a5aff; }
.bf-dev button.danger { background: #5a1020; }
.bf-dev-note { color: #999; margin-top: 4px; }

@keyframes bfBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes bfShake { 0% { transform: translate(0,0); } 25% { transform: translate(1px,-1px); } 50% { transform: translate(-1px,1px); } 75% { transform: translate(1px,1px); } }
@keyframes bfPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .bf-wraith img { animation: none; transform: scaleX(-1); }
  .bf-forge img, .bf-hunt, .bf-forge.held img, .bf-side-btn.ready img, .bf-wraith img, .bf-wraith::after, .bf-bounty-chip.done { animation: none; } }
.bf-champ-wrap { display: flex; flex-direction: column; gap: 10px; }

/* ═════════ Desktop ≥1100px: three columns, no tabs ═════════ */
@media (min-width: 1100px) {
  .bf-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(460px, 1.5fr) minmax(320px, 1fr); gap: 12px; padding: 12px; }
  .bf-panel { display: flex !important; flex-direction: column; gap: 12px; padding: 0; }
  .bf-left, .bf-right { overflow-y: auto; padding-right: 4px; padding-bottom: 24px; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); }
  .bf-battle { border-radius: 16px; overflow: hidden; border: 1px solid rgba(200,30,58,.3); }
  .bf-left, .bf-right { scrollbar-width: thin; scrollbar-color: #6a2a3a transparent; }
  .bf-left::-webkit-scrollbar, .bf-right::-webkit-scrollbar { width: 6px; }
  .bf-left::-webkit-scrollbar-thumb, .bf-right::-webkit-scrollbar-thumb { background: #6a2a3a; border-radius: 3px; }
  .phone-hide { display: block; }
  .bf-soon, .bf-tabs { display: none !important; }
  .bf-asc-panel, .bf-champ-panel { display: none !important; }
  .bf-champ-panel.overlay { display: grid !important; place-items: start center; position: fixed; inset: 0; z-index: 45; background: rgba(5,2,4,.88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 24px 16px; overflow-y: auto; }
  .bf-champ-panel.overlay .bf-champ-wrap { max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
  .bf-asc-panel.overlay { display: grid !important; place-items: center; position: fixed; inset: 0; z-index: 45; background: rgba(5,2,4,.88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 16px; overflow-y: auto; }
  .bf-asc-panel.overlay { place-items: start center; }
  .bf-asc-panel.overlay .bf-asc-wrap { max-width: 520px; width: 100%; }
  .bf-top { padding-left: 16px; }
  .bf-forge { width: 150px; height: 150px; }
  .bf-forge-ring { -webkit-mask: radial-gradient(circle, transparent 71px, #000 72px); mask: radial-gradient(circle, transparent 71px, #000 72px); }
  .bf-dev { bottom: 16px; }
}
@media (min-width: 1800px) {
  .bf-grid { grid-template-columns: minmax(380px, 1fr) minmax(640px, 1.6fr) minmax(380px, 1fr); max-width: 2200px; margin: 0 auto; width: 100%; }
  .bf-slots { grid-template-columns: repeat(4, 1fr); }
}
.bf-res-icon { object-fit: contain; background: radial-gradient(circle, #2a1620, #120a0e); border-radius: 8px; }

/* ── 2.1: tooltips, tutorial, welcome back, recharge ── */
.bf-info { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%;
  border: 1px solid rgba(255,210,60,.55); color: var(--bf-gold); font: italic 800 11px/1 Georgia, serif; letter-spacing: 0;
  text-transform: none; vertical-align: 2px; cursor: help; background: rgba(255,210,60,.08); position: relative; }
.bf-info::after { content: ""; position: absolute; inset: -12px; }   /* bigger tap target */
.bf-info.demo { cursor: default; }
.bf-tipbox { position: fixed; z-index: 80; max-width: min(300px, calc(100vw - 16px)); padding: 9px 11px; border-radius: 10px;
  background: #241018; border: 2px solid #ffd23c; color: #efe6e9; font: 600 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 8px 24px rgba(0,0,0,.6); pointer-events: none; display: none; }
.bf-coach { position: relative; z-index: 6; outline: 2px solid var(--bf-gold); outline-offset: 3px; border-radius: 12px; animation: bfCoach 1.4s ease-in-out infinite; }
#bf-forge.bf-coach { border-radius: 50%; outline-offset: 10px; }
@keyframes bfCoach { 0%,100% { box-shadow: 0 0 0 0 rgba(255,210,60,.55); } 50% { box-shadow: 0 0 0 9px rgba(255,210,60,0); } }
.bf-coachcard { position: fixed; left: 50%; transform: translateX(-50%); z-index: 45; width: min(360px, calc(100vw - 20px));
  background: linear-gradient(180deg, #2a1220, #1a0b12); border: 1px solid var(--bf-gold); border-radius: 14px; padding: 11px 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.7); }
.bf-coachcard.top { top: 64px; }
.bf-coachcard.mid { top: 38%; }
.bf-coachcard.bottom { bottom: calc(106px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1100px) { .bf-coachcard.bottom { bottom: 24px; } }
.bf-coach-step { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--bf-text2); }
.bf-coach-title { font-size: 15px; font-weight: 900; color: var(--bf-gold); margin: 2px 0 4px; }
.bf-coach-body { font-size: 13px; line-height: 1.4; color: var(--bf-text); }
.bf-coach-btns { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; }
.bf-mini.hot { background: linear-gradient(180deg, #ff5a6e, #b3132f); border-color: #ff9aa8; color: #fff; }
.bf-tut-loop { text-align: left; margin: 10px 0 6px; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--bf-text); }
.bf-tut-loop b { color: var(--bf-gold); }
.bf-away-gain { font-size: 30px; font-weight: 900; color: var(--bf-soul); text-shadow: 0 0 14px rgba(90,209,255,.5); margin: 4px 0; }
.bf-away-gain span { font-size: 15px; color: var(--bf-text2); font-weight: 700; }
.bf-modal .bf-away-line { color: var(--bf-text); margin: 4px 0; }
.bf-modal .bf-away-cap { font-size: 12px; background: rgba(255,210,60,.08); border: 1px solid rgba(255,210,60,.3); border-radius: 10px; padding: 7px; }
.bf-modal-icon.soul { width: 40px; filter: drop-shadow(0 0 14px var(--bf-soul)); }
/* Forge: pressed look only when it is really forging; dim + no breathing while it recharges */
.bf-forge[data-press] { transform: scale(.94); }
.bf-forge.cooling { filter: grayscale(.45) brightness(.8) drop-shadow(0 0 6px rgba(255,122,26,.25)); }
.bf-forge.cooling img { animation: none; }
.bf-forge.cooling .bf-forge-lbl { border-color: #5ad1ff; color: #c9f1ff; background: #0d1a24; }
/* New building picture pops in after an upgrade */
.bf-slot-img { animation: bfUpg .45s ease-out; }
@keyframes bfUpg { 0% { transform: scale(.6); filter: brightness(2.2) drop-shadow(0 0 12px var(--bf-gold)); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bf-coach, .bf-slot-img { animation: none; } }
.bf-no-motion .bf-coach, .bf-no-motion .bf-slot-img { animation: none; }

/* 2.2: price-limit buying */
.bf-limit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--bf-line); background: rgba(0,0,0,.25); }
.bf-limit.on { border-color: rgba(255,210,60,.55); }
.bf-limit label { font-size: 12px; font-weight: 800; color: var(--bf-text2); }
.bf-limit-in { width: 84px; min-height: 34px; border-radius: 8px; border: 1px solid var(--bf-line); background: #120a0e; color: var(--bf-text); font: 800 14px system-ui, sans-serif; padding: 0 8px; }
.bf-limit .bf-buy { flex: 1; min-width: 130px; }

/* 2.2.2: the buy-mode bar appears on every buy screen (Arsenal, Barracks, Caravans) */
.bf-buybar { margin: 4px 0 8px; }
.bf-phone-only { display: block; }
@media (min-width: 1100px) { .bf-phone-only { display: none; } }
