/* Menu additions kept out of style.css (which the gameplay side edits): achievements, profile. */

/* achievement toast */
.ach-toast { position: fixed; left: 50%; top: calc(var(--sat, 0px) + 10px); transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center;
  min-width: min(360px, calc(100% - 24px)); padding: 8px 14px 8px 8px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 30%, #12161d), #12161d 70%);
  border: 1px solid var(--tc); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 18px color-mix(in srgb, var(--tc) 40%, transparent); color: #eef2f6; pointer-events: none;
  animation: achIn 0.45s cubic-bezier(.2, 1.5, .4, 1) both; }
.ach-toast.out { animation: achOut 0.4s ease-in forwards; }
.ach-toast small { display: block; font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: var(--tc); }
.ach-toast b { display: block; font-size: 15px; }
.ach-toast span { font-size: 12px; color: #b9c3cf; }
.ach-medal { flex: none; animation: achSpin 0.8s ease-out; }
@keyframes achIn { from { opacity: 0; transform: translate(-50%, -30px) scale(0.9); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes achOut { to { opacity: 0; transform: translate(-50%, -20px); } }
@keyframes achSpin { from { transform: rotateY(360deg) scale(0.4); } to { transform: none; } }

/* profile */
.pf-sheet h2 { margin: 0; font-size: 20px; }
.pf-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pf-head small { color: var(--muted); font-weight: 600; }
.lvl-badge.big { width: 54px; height: 54px; }
.pf-tabs { margin-bottom: 12px; }
.pf-fav { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--panel-2); margin-bottom: 10px; }
.pf-fav img, .pf-fav svg { width: 64px; height: 64px; object-fit: contain; }
.pf-fav small { display: block; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; color: var(--accent-2); }
.pf-fav b { display: block; font-size: 16px; }
.pf-fav span { font-size: 12px; color: var(--muted); }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pf-stats > div { padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--panel-border); }
.pf-stats small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.pf-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.pf-h { margin: 14px 0 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pf-titles { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-title { border: 1px solid var(--panel-border); background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.pf-title.on { background: linear-gradient(180deg, #ffb04a, #f07f12); color: #1c1206; border-color: transparent; }
.pf-note { color: var(--muted); }
.pf-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pf-a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--panel-border); opacity: 0.72; }
.pf-a svg { flex: none; filter: grayscale(1) brightness(0.8); }
.pf-a.done { opacity: 1; border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.pf-a.done svg { filter: none; }
.pf-a-main { min-width: 0; flex: 1; }
.pf-a b { display: block; font-size: 14px; }
.pf-a small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pf-bar { height: 5px; border-radius: 5px; background: rgba(127, 127, 127, 0.25); margin: 5px 0 2px; overflow: hidden; }
.pf-bar i { display: block; height: 100%; background: var(--tc); border-radius: 5px; }

/* Home-screen app on iPhone: fill the whole display when the window is shorter (see src/viewport.js) */
html.vp-fill, html.vp-fill body { width: var(--vp-w); height: var(--vp-h); }
html.vp-fill #game { position: fixed; left: 0; top: 0; right: auto; bottom: auto; width: var(--vp-w); height: var(--vp-h); }

/* Army towers: TAKE CONTROL button (tower view) and the unit control overlay */
#army-take { position: fixed; left: 50%; bottom: calc(var(--sab, 0px) + 96px); transform: translateX(-50%); z-index: 12; border: 0; border-radius: 14px;
  padding: 10px 18px; font: 900 13px/1 system-ui, sans-serif; letter-spacing: 0.08em; color: #fff; background: linear-gradient(180deg, #4a8ae8, #2a5aa8);
  box-shadow: 0 6px 18px rgba(20, 60, 140, 0.5); }
#army-take[hidden] { display: none; }
@media (orientation: landscape) { #army-take { bottom: calc(var(--sab, 0px) + 74px); } }
#army-ctl { position: fixed; inset: 0; z-index: 20; display: none; touch-action: none; }
body.army-ctl #army-ctl { display: block; }
body.army-ctl #army-take, body.army-ctl #abilities { display: none !important; }
/* while controlling a unit keep the same corner as in a tower (minimap, next, wave, upgrade), hide the rest of the tower HUD */
body.army-ctl #fpv-ui > :not(#fpv-corner) { display: none !important; }
body.army-ctl #fpv-ui { z-index: 21; pointer-events: none; }
body.army-ctl #fpv-corner { z-index: 22; }
.ac-aim { position: absolute; inset: 0; }
.ac-stick { position: absolute; left: calc(var(--sal, 0px) + 22px); bottom: calc(var(--sab, 0px) + 22px); width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); border: 2px solid rgba(255, 255, 255, 0.25); touch-action: none; }
.ac-stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(90, 160, 255, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.6); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.ac-fire { position: absolute; right: calc(var(--sar, 0px) + 24px); bottom: calc(var(--sab, 0px) + 28px); width: 104px; height: 104px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle, #ff6a4a, #c0301a); color: #fff; font: 900 16px/1 system-ui, sans-serif; letter-spacing: 0.1em; touch-action: none; }
.ac-fire:active { transform: scale(0.94); }
.ac-back { position: absolute; right: calc(var(--sar, 0px) + 12px); top: calc(var(--sat, 0px) + 12px); border: 0; border-radius: 12px; padding: 9px 14px;
  background: rgba(10, 14, 20, 0.75); color: #fff; font: 800 13px/1 system-ui, sans-serif; }
.ac-name { position: absolute; left: 50%; bottom: calc(var(--sab, 0px) + 34px); transform: translateX(-50%); color: #cfe3ff; font: 900 12px/1 system-ui, sans-serif; letter-spacing: 0.16em; text-shadow: 0 1px 3px #000; }
.ac-hp { position: absolute; left: 50%; bottom: calc(var(--sab, 0px) + 18px); transform: translateX(-50%); width: 160px; height: 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); overflow: hidden; }
.ac-hp i { display: block; height: 100%; background: linear-gradient(90deg, #58b4ff, #8fe3ff); }
.ac-cross { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%; pointer-events: none; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); }
.ac-cross::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #ff4a3a; border-radius: 50%; }

/* Season line in the Battle hero */
.season-line { display: inline-block; margin: 4px 0 2px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: 0.12em;
  color: #cfe8ff; background: linear-gradient(90deg, rgba(90, 160, 255, 0.35), rgba(90, 160, 255, 0.08)); border: 1px solid rgba(143, 216, 255, 0.4); }

/* Turret detail (I2): full-screen showcase */
.ov.full { padding: 0; }
.ov.full #overlay-body { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; padding: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 25% 30%, color-mix(in srgb, var(--tc, #ff9a3a) 22%, #10141b), #0b0e13 70%); }
.ov.full .ov-x { position: absolute; z-index: 5; right: calc(var(--sar, 0px) + 12px); top: calc(var(--sat, 0px) + 10px); }
.bs { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px;
  padding: calc(var(--sat, 0px) + 12px) calc(var(--sar, 0px) + 16px) calc(var(--sab, 0px) + 12px) calc(var(--sal, 0px) + 16px); color: #eef2f6; }
.bs-left { display: flex; flex-direction: column; min-height: 0; }
.bs-name small { font-size: 11px; font-weight: 900; letter-spacing: 0.16em; color: var(--tc); }
.bs-name h2 { margin: 2px 0 0; font-size: 26px; letter-spacing: 0.02em; }
.bs-3d { flex: 1; width: 100%; min-height: 150px; cursor: grab; animation: bsIn 0.45s ease-out both; }
.bs-lv { display: flex; gap: 10px; align-items: center; }
.bs-lvbadge { flex: none; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; align-content: center; line-height: 1;
  background: linear-gradient(160deg, #ffb24d, #b8500a); color: #1b0d00; box-shadow: 0 4px 16px rgba(240, 123, 18, 0.4); }
.bs-lvbadge small { font-size: 10px; font-weight: 900; }
.bs-lvbadge b { font-size: 24px; font-weight: 900; }
.bs-lvbadge.max { background: linear-gradient(160deg, #fff3b0, #ffb52e); }
.bs-lvbadge.lock { background: #2a313c; color: #9aa7b4; }
.bs-lvbadge.lock svg { width: 26px; height: 26px; }
.bs-lvmain { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bs-cards { position: relative; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bs-cards i { display: block; height: 100%; background: linear-gradient(90deg, #3ee07a, #8ff0a8); }
.bs-cards span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.bs-up { width: 100%; font-weight: 900; letter-spacing: 0.06em; }
.bs-max { color: #ffcf5a; letter-spacing: 0.12em; }
.bs-right { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding-right: 36px; animation: bsSlide 0.4s ease-out both; }
.bs-desc { margin: 26px 0 0; color: #c9d3dd; font-size: 14px; line-height: 1.4; }
.bs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-chips span { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); display: inline-flex; align-items: center; gap: 4px; }
.bs-chips span svg { width: 13px; height: 13px; }
.bs-chips .pos { color: #8ff0a8; }
.bs-chips .neg { color: #ff9a8a; }
.bs-stats { display: flex; flex-direction: column; gap: 7px; }
.bs-stat { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 8px; }
.bs-stat span { font-size: 11px; font-weight: 900; letter-spacing: 0.1em; color: #9aa7b4; }
.bs-stat b { text-align: right; font-variant-numeric: tabular-nums; }
.bs-sbar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bs-sbar i { display: block; height: 100%; border-radius: 6px; }
.bs-h { margin: 4px 0 0; font-size: 12px; letter-spacing: 0.16em; color: #9aa7b4; }
.bs-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bs-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 9px; border-radius: 14px; cursor: pointer; color: #eef2f6;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 28%, #1a2029), #141920); border: 2px solid color-mix(in srgb, var(--pc) 60%, transparent);
  transition: transform 0.15s; }
.bs-tile:active { transform: scale(0.95); }
.bs-tile small { font-size: 9px; font-weight: 900; letter-spacing: 0.12em; color: #9aa7b4; }
.bs-tico svg { width: 38px; height: 38px; }
.bs-tile b { font-size: 11px; line-height: 1.15; text-align: center; min-height: 26px; }
.bs-tile.locked { filter: grayscale(0.9); opacity: 0.7; border-color: rgba(255, 255, 255, 0.12); }
.bs-tile.locked .bs-tico svg { width: 26px; height: 26px; margin: 6px 0; }
.bs-more { display: flex; gap: 8px; flex-wrap: wrap; }
.bs-more .btn { flex: 1; min-width: 110px; }
.bs-sheet { position: absolute; z-index: 4; top: 0; right: 0; bottom: 0; width: min(520px, 58%); display: flex; flex-direction: column;
  background: #12171f; border-left: 1px solid rgba(255, 255, 255, 0.12); box-shadow: -18px 0 40px rgba(0, 0, 0, 0.5); animation: bsSheet 0.28s ease-out both;
  padding: calc(var(--sat, 0px) + 12px) calc(var(--sar, 0px) + 14px) calc(var(--sab, 0px) + 12px) 14px; }
.bs-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-right: 44px; }
.bs-sheet-head b { font-size: 18px; }
.bs-sheet-body { flex: 1; overflow-y: auto; touch-action: pan-y; }
.bs-sheet-body .skins { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
@keyframes bsIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes bsSlide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes bsSheet { from { transform: translateX(100%); } to { transform: none; } }
@keyframes bsSheetUp { from { transform: translateY(100%); } to { transform: none; } }
@media (orientation: portrait) {
  .bs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .bs-3d { height: 32vh; flex: none; }
  .bs-right { overflow: visible; padding-right: 0; }
  .bs-desc { margin-top: 0; }
  .bs-sheet { top: auto; width: 100%; height: 68%; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px 18px 0 0; animation-name: bsSheetUp; }
}
@media (orientation: landscape) and (max-height: 430px) {
  .bs-name h2 { font-size: 20px; }
  .bs-desc { font-size: 12.5px; margin-top: 30px; }
  .bs-tico svg { width: 30px; height: 30px; }
  .bs-lvbadge { width: 48px; height: 48px; }
  .bs-lvbadge b { font-size: 20px; }
  .bs-stat { grid-template-columns: 80px 1fr 56px; }
}
@media (prefers-reduced-motion: reduce) { .bs-3d, .bs-right, .bs-sheet { animation: none; } }
#overlay-body:has(.bs-sheet) > .ov-x { display: none; }

/* Ability cards with levels (Armory > Abilities) */
.abcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.abcard { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; color: var(--text);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 22%, var(--panel-solid)), var(--panel-solid)); border: 2px solid color-mix(in srgb, var(--ac) 50%, transparent); }
.abcard.can { box-shadow: 0 0 0 2px #3ee07a, 0 0 18px rgba(62, 224, 122, 0.35); }
.abc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.abc-ico svg { width: 52px; height: 52px; }
.abc-lv { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; align-content: center; line-height: 1;
  background: linear-gradient(160deg, #ffb24d, #b8500a); color: #1b0d00; }
.abc-lv small { font-size: 9px; font-weight: 900; }
.abc-lv b { font-size: 18px; font-weight: 900; }
.abc-name { font-size: 16px; }
.abc-desc { font-size: 12px; color: var(--muted); line-height: 1.3; min-height: 32px; }
.abc-now { font-size: 11.5px; color: var(--muted); }
.abc-now b { color: var(--text); }
.abc-max { font-weight: 900; letter-spacing: 0.12em; color: #ffcf5a; text-align: center; }
.abcard .bar { height: 16px; }

/* Detail v2: no scrolling on the right in landscape, power cards, mod chips, overload, how-to */
@media (orientation: landscape) {
  .bs-right { overflow: hidden; gap: 8px; }
  .bs-desc { margin-top: 30px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (orientation: landscape) and (max-height: 430px) {
  .bs { gap: 12px; padding-top: calc(var(--sat, 0px) + 8px); padding-bottom: calc(var(--sab, 0px) + 8px); }
  .bs-desc { margin-top: 22px; font-size: 12px; -webkit-line-clamp: 1; }
  .bs-stats { gap: 4px; }
  .bs-sbar { height: 8px; }
  .bs-stat b { font-size: 13px; }
  .bs-tile { padding: 5px 4px 6px; gap: 2px; }
  .bs-tile b { min-height: 0; font-size: 10.5px; }
  .bs-tico svg { width: 28px; height: 28px; }
  .bs-more .btn { padding: 7px 8px; font-size: 12px; }
  .bs-h { margin: 0; }
}
.pw-intro { margin: 0 0 10px; font-size: 13px; color: #c9d3dd; line-height: 1.4; }
.pw-intro b { color: #fff; }
.pw-intro svg { width: 13px; height: 13px; vertical-align: -2px; }
.pw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.pw { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 12px 12px; border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 26%, #1a2029), #121720 75%); border: 2px solid color-mix(in srgb, var(--pc) 55%, transparent);
  animation: chPop 0.35s cubic-bezier(.2, 1.4, .4, 1) both; }
.pw:nth-child(2) { animation-delay: 0.06s; }
.pw.on { box-shadow: 0 0 0 2px var(--pc), 0 0 24px color-mix(in srgb, var(--pc) 45%, transparent); }
.pw.locked { filter: grayscale(0.85); opacity: 0.75; }
.pw-plate { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--pc) 55%, #fff 0%), color-mix(in srgb, var(--pc) 30%, #0b0e13)); box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.35); }
.pw-plate svg { width: 56px; height: 56px; }
.pw-name { font-size: 17px; }
.pw-desc { margin: 0; font-size: 13px; line-height: 1.35; color: #c9d3dd; flex: 1; }
.pw-act { margin-top: 4px; }
.pw-eq { font-weight: 900; letter-spacing: 0.1em; color: #8ff0a8; }
.pw-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; color: #9aa7b4; }
.pw-lock svg { width: 14px; height: 14px; }
.mod-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mod-slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: #eef2f6; text-align: left;
  background: #161c25; border: 2px dashed color-mix(in srgb, var(--pc) 70%, transparent); cursor: pointer; }
.mod-slot.sel { border-style: solid; box-shadow: 0 0 0 2px #ffcf5a; }
.mod-slot.locked { opacity: 0.55; }
.mod-slot small { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; color: #9aa7b4; }
.mod-slot svg { width: 34px; height: 34px; flex: none; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.mod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 14px; color: #eef2f6;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 20%, #1a2029), #121720); border: 2px solid color-mix(in srgb, var(--pc) 45%, transparent); cursor: pointer; }
.mod svg { width: 40px; height: 40px; }
.mod b { font-size: 13px; }
.mod small { font-size: 11px; color: #c9d3dd; text-align: center; line-height: 1.25; }
.mod em { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 9px; font-weight: 900; background: var(--pc); color: #10151c; border-radius: 6px; padding: 1px 5px; }
.mod.on { box-shadow: 0 0 16px color-mix(in srgb, var(--pc) 45%, transparent); }
.mod:disabled:not(.on) { opacity: 0.55; cursor: default; }
.ovl { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(180, 107, 255, 0.28), #121720 70%); border: 2px solid rgba(180, 107, 255, 0.55); }
.ovl.locked { filter: grayscale(0.8); opacity: 0.8; }
.ovl-core { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #e0c0ff, #6a2ad0 70%); box-shadow: 0 0 30px rgba(180, 107, 255, 0.7); animation: ovlPulse 1.6s ease-in-out infinite; }
.ovl-core svg { width: 60px; height: 60px; }
.ovl-main small { font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: #c9a8ff; }
.ovl-main b { display: block; font-size: 20px; }
.ovl-main p { margin: 6px 0; font-size: 13px; color: #c9d3dd; line-height: 1.4; }
.ovl-fx { display: flex; gap: 6px; flex-wrap: wrap; }
.ovl-fx span { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(180, 107, 255, 0.25); border: 1px solid rgba(180, 107, 255, 0.5); }
@keyframes ovlPulse { 50% { transform: scale(1.06); box-shadow: 0 0 44px rgba(180, 107, 255, 0.9); } }
.bs-tree .tgraph { margin-top: 6px; }
.howto { display: flex; flex-direction: column; gap: 10px; }
.ht-demo { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--tc) 55%, transparent); background: #0b0e13; }
.ht-demo canvas { display: block; width: 100%; height: 190px; }
.ht-live { position: absolute; left: 10px; top: 8px; font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: #ff5a4a; background: rgba(0, 0, 0, 0.55); padding: 3px 7px; border-radius: 6px; }
.ht-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.ht-step { position: relative; padding: 10px 10px 10px 40px; border-radius: 12px; background: #161c25; border: 1px solid rgba(255, 255, 255, 0.1); font-size: 12.5px; line-height: 1.35; color: #c9d3dd; }
.ht-step i { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 12px; background: var(--tc); color: #10151c; }
.ht-step b { display: block; color: #fff; font-size: 11px; letter-spacing: 0.12em; margin-bottom: 2px; }
.ht-vs { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px; border-radius: 14px; background: #161c25; }
.ht-vs > div { text-align: center; }
.ht-vs small { display: block; font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: #9aa7b4; }
.ht-vs b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ht-vs span { display: block; font-size: 11px; color: #9aa7b4; }
.ht-vs .you b { color: #ffcf5a; }
.ht-arrow { font-size: 22px; color: #ffcf5a; }

/* Thinner bottom bars on phones (the home-indicator gap no longer doubles their height) */
.bottomnav { padding-bottom: calc(4px + max(0px, var(--sab) - 18px)) !important; padding-top: 3px !important; }
.brief .brief-actions { padding-top: 8px !important; padding-bottom: calc(8px + max(0px, var(--sab) - 18px)) !important; }
@media (orientation: landscape) {
  .bottomnav { padding-bottom: calc(2px + max(0px, var(--sab) - 16px)) !important; }
}

/* Turret rarity labels + test mode badge */
.tcard { position: relative; border-color: color-mix(in srgb, var(--rc) 70%, transparent) !important; }
.tc-rar { position: absolute; left: 6px; top: 6px; z-index: 1; font-size: 8.5px; font-weight: 900; letter-spacing: 0.1em; padding: 2px 6px; border-radius: 6px; background: var(--rc); color: #10151c; }
.bs-rar { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; background: var(--rc); color: #10151c; vertical-align: 1px; }
body.sandbox #menu .pname::after { content: " · TEST MODE"; color: #ff9a3a; }

/* Build sheets as a compact dialog over the showcase instead of a half-screen panel */
.bs-sheet { top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important; transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 32px)) !important; height: auto !important; max-height: min(78%, 560px); border-radius: 20px !important;
  border: 2px solid color-mix(in srgb, var(--tc) 55%, rgba(255, 255, 255, 0.15)) !important; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 100vmax rgba(5, 8, 12, 0.55) !important;
  padding: 12px 14px 14px !important; animation: bsPop 0.22s cubic-bezier(.2, 1.4, .4, 1) both !important; }
@keyframes bsPop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%); } }
.bs-sheet-head { padding-right: 0 !important; }
.bs-sheet-head b { font-size: 16px; }
.pw-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
.pw { padding: 10px 8px; gap: 4px; border-radius: 14px; }
.pw-plate { width: 54px; height: 54px; border-radius: 16px; }
.pw-plate svg { width: 40px; height: 40px; }
.pw-name { font-size: 14px; }
.pw-desc { font-size: 12px; }
.pw-intro { font-size: 12px; margin-bottom: 8px; }
.mod-slots { gap: 6px; margin-bottom: 8px; }
.mod-slot { padding: 6px 8px; gap: 6px; }
.mod-slot svg { width: 26px; height: 26px; }
.mod-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mod { padding: 6px 4px; }
.mod svg { width: 28px; height: 28px; }
.mod b { font-size: 11.5px; }
.mod small { font-size: 10px; }
.ovl { padding: 10px; gap: 12px; }
.ovl-core { width: 64px; height: 64px; }
.ovl-core svg { width: 40px; height: 40px; }
.ovl-main b { font-size: 16px; }
.ovl-main p { font-size: 12px; }
.bs-sheet .skins { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.ht-demo canvas { height: 150px; }
@media (orientation: landscape) and (max-height: 430px) {
  .bs-sheet { max-height: calc(100% - 20px); }
  .mod-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (orientation: portrait) {
  .mod-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================================================================== Brawl-style bright look
   Vivid blue panels, chunky outlined buttons (yellow primary), playful display font, white text
   with a dark outline. Overrides the dark theme tokens; the light theme keeps its own look. */
body[data-theme="dark"] {
  --panel: rgba(28, 86, 196, 0.88);
  --panel-solid: #2160c8;
  --panel-2: rgba(255, 255, 255, 0.12);
  --panel-border: #0d2a66;
  --text: #ffffff;
  --muted: #cfe0ff;
  --accent: #ffc233;
  --accent-2: #ffe066;
  --shadow: 0 6px 0 rgba(8, 24, 64, 0.55), 0 12px 24px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.btn, .pname, h1, h2, h3, .hero-title, .kicker, .bs-name h2, .pw-name, .abc-name, .tc-name, .bottomnav button, .pill b, #r-title, .chest-hint, .ch-card b {
  font-family: 'Lilita One', 'Nunito', system-ui, sans-serif; font-weight: 400; letter-spacing: 0.03em;
}
body[data-theme="dark"] h1, body[data-theme="dark"] h2, body[data-theme="dark"] .hero-title, body[data-theme="dark"] .bs-name h2 {
  color: #fff; text-shadow: 0 3px 0 #0b2a66, 0 0 1px #0b2a66; -webkit-text-stroke: 1px #0b2a66; paint-order: stroke fill;
}
/* menu backdrop: sky gradient over the 3D map */
body[data-theme="dark"] #menu { background: linear-gradient(180deg, rgba(64, 150, 255, 0.55), rgba(40, 110, 230, 0.12) 30%, rgba(20, 70, 180, 0.5)); }
/* buttons: chunky with a dark outline and a bottom lip */
body[data-theme="dark"] .btn {
  border: 3px solid #0b2a66; border-radius: 14px; background: linear-gradient(180deg, #5aa2ff, #2a6ae0); color: #fff;
  box-shadow: 0 4px 0 #0b2a66, inset 0 2px 0 rgba(255, 255, 255, 0.35); text-shadow: 0 2px 0 rgba(11, 42, 102, 0.8);
  transition: transform 0.08s, box-shadow 0.08s;
}
body[data-theme="dark"] .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0b2a66, inset 0 2px 0 rgba(255, 255, 255, 0.35); }
body[data-theme="dark"] .btn.primary {
  background: linear-gradient(180deg, #ffe45c, #ffb21a); color: #3a2200; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 0 #0b2a66, inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
body[data-theme="dark"] .btn.ghost { background: linear-gradient(180deg, #7aa8e8, #4a78c8); }
body[data-theme="dark"] .btn:disabled { background: linear-gradient(180deg, #8a9ab8, #6a7a98); color: #e8eef8; opacity: 0.85; }
/* panels and cards */
body[data-theme="dark"] .card-panel, body[data-theme="dark"] .quest, body[data-theme="dark"] .loadout, body[data-theme="dark"] .dly,
body[data-theme="dark"] #overlay-body:not(.bs-host), body[data-theme="dark"] .map-chip, body[data-theme="dark"] .cslot {
  background: linear-gradient(180deg, #3a7ee8, #2256c0) !important; border: 3px solid #0b2a66 !important; border-radius: 18px;
  box-shadow: 0 5px 0 rgba(8, 24, 64, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.25) !important; color: #fff;
}
body[data-theme="dark"] .tcard { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 45%, #3a7ee8), #2256c0) !important; border-width: 3px !important; border-radius: 18px;
  box-shadow: 0 5px 0 rgba(8, 24, 64, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.25); }
body[data-theme="dark"] .abcard { background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 40%, #3a7ee8), #2256c0); border: 3px solid #0b2a66; box-shadow: 0 5px 0 rgba(8, 24, 64, 0.6); }
body[data-theme="dark"] .bar, body[data-theme="dark"] .xpbar { background: rgba(8, 24, 64, 0.55); border: 2px solid #0b2a66; }
/* top bar pills */
body[data-theme="dark"] .cur-pill, body[data-theme="dark"] .pill { background: linear-gradient(180deg, #2a5ab8, #163e8c); border: 2px solid #0b2a66; box-shadow: 0 3px 0 rgba(8, 24, 64, 0.6); color: #fff; }
body[data-theme="dark"] .icon-btn { background: linear-gradient(180deg, #4a8ef0, #2a62cc); border: 3px solid #0b2a66; box-shadow: 0 3px 0 #0b2a66; }
/* bottom navigation */
body[data-theme="dark"] .bottomnav { background: linear-gradient(180deg, #1c4fb0, #123a88); border-top: 3px solid #0b2a66; }
body[data-theme="dark"] .bottomnav button { color: #cfe0ff; }
body[data-theme="dark"] .bottomnav button.active, body[data-theme="dark"] .bottomnav button.center {
  background: linear-gradient(180deg, #ffe45c, #ffb21a); color: #3a2200; border: 3px solid #0b2a66; box-shadow: 0 3px 0 #0b2a66;
}
body[data-theme="dark"] .subtabs button { background: linear-gradient(180deg, #4a8ef0, #2a62cc); border: 3px solid #0b2a66; color: #fff; box-shadow: 0 3px 0 #0b2a66; }
body[data-theme="dark"] .subtabs button.active { background: linear-gradient(180deg, #ffe45c, #ffb21a); color: #3a2200; }
/* turret showcase: bright blue studio instead of dark */
.ov.full #overlay-body { background: radial-gradient(120% 90% at 25% 35%, color-mix(in srgb, var(--tc, #4a8ef0) 35%, #4f9aff), #1f5cc6 70%) !important; }
.bs-sheet { background: linear-gradient(180deg, #2f72e0, #1d52b8) !important; border-color: #0b2a66 !important; }
.bs-tile { border-width: 3px; box-shadow: 0 4px 0 rgba(8, 24, 64, 0.55); }
.bs-sbar { background: rgba(8, 24, 64, 0.5); }
.bs-stat span, .bs-h, .bs-tile small { color: #dce8ff; }
.pw, .mod, .mod-slot, .ovl, .ht-step, .ht-vs { box-shadow: 0 4px 0 rgba(8, 24, 64, 0.5); }
.mod-slot, .ht-step, .ht-vs { background: #1d4aa6; }
.ov.full #overlay-body { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body[data-theme="dark"] .bs-tile { background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 45%, #4a8ef0), #2256c0); border-color: #0b2a66; }
body[data-theme="dark"] .bs-tile.locked { background: linear-gradient(180deg, #6a86b8, #4a6698); filter: none; opacity: 0.9; }
body[data-theme="dark"] .pw { background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 45%, #4a8ef0), #2256c0 80%); border-color: #0b2a66; }
body[data-theme="dark"] .mod { background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 40%, #4a8ef0), #2256c0); border-color: #0b2a66; }
body[data-theme="dark"] .bs-chips span { background: rgba(8, 24, 64, 0.35); }

/* Unit control: side buttons (map / wave / upgrade the tower) */
.ac-side { position: absolute; right: calc(var(--sar, 0px) + 12px); top: calc(var(--sat, 0px) + 60px); display: flex; flex-direction: column; gap: 8px; }
.ac-btn { min-width: 76px; padding: 8px 10px; border-radius: 12px; border: 3px solid #0b2a66; background: linear-gradient(180deg, #4a8ef0, #2a62cc); color: #fff;
  box-shadow: 0 3px 0 #0b2a66; font-family: 'Lilita One', system-ui, sans-serif; letter-spacing: 0.04em; font-size: 13px; }
.ac-btn#ac-wave { background: linear-gradient(180deg, #ff7a5a, #c0202a); }
.ac-btn#ac-up { background: linear-gradient(180deg, #ffe45c, #ffb21a); color: #3a2200; }
.ac-back { top: calc(var(--sat, 0px) + 12px) !important; }

/* Unit actions next to FIRE (jump / stance / grenade, MG, minigun, altitude, paratroopers) */
.ac-acts { position: absolute; right: calc(var(--sar, 0px) + 138px); bottom: calc(var(--sab, 0px) + 20px); display: grid; grid-template-columns: repeat(2, 64px); gap: 10px; direction: rtl; }
.ac-act { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 3px solid #0b2a66; background: linear-gradient(180deg, #5aa2ff, #2a6ae0); color: #fff; overflow: hidden;
  box-shadow: 0 3px 0 #0b2a66; font-family: 'Lilita One', system-ui, sans-serif; font-size: 11px; letter-spacing: 0.03em; touch-action: none; direction: ltr; }
.ac-act b { position: relative; z-index: 1; font-weight: 400; }
.ac-act.on, .ac-act:active { transform: translateY(2px); box-shadow: 0 1px 0 #0b2a66; background: linear-gradient(180deg, #ffe45c, #ffb21a); color: #3a2200; }
.ac-act::before { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(8, 20, 48, 0.72) calc(var(--cd, 0) * 360deg), transparent 0); pointer-events: none; }
.ac-act.cool { filter: saturate(0.5); }
.ac-act[data-act="nade"], .ac-act[data-act="para"] { background: linear-gradient(180deg, #7ad06a, #3a9a3a); }
.ac-act[data-act="up"], .ac-act[data-act="down"] { font-size: 20px; }
.ac-cross.hit { border-color: #ff4a3a; transform: scale(1.25); transition: transform 0.06s; }
#army-ctl[data-stance="prone"] .ac-cross { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
#army-ctl[data-stance="crouch"] .ac-cross { width: 23px; height: 23px; margin: -11.5px 0 0 -11.5px; }
@media (orientation: portrait) { .ac-acts { right: calc(var(--sar, 0px) + 18px); bottom: calc(var(--sab, 0px) + 146px); } }

/* unit control: ◀ TOWER top-left, ammo on FIRE, reload ring, heat ring on the second gun, tap tip */
.ac-back { left: calc(var(--sal, 0px) + 12px); right: auto !important; top: calc(var(--sat, 0px) + 64px) !important; }
.ac-fire { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; }
.ac-fire b { position: relative; z-index: 1; font-weight: 900; }
.ac-fire small { position: relative; z-index: 1; font: 800 12px/1 system-ui, sans-serif; opacity: 0.9; }
.ac-fire::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(10, 16, 30, 0.7) calc(var(--rl, 0) * 360deg), transparent 0); pointer-events: none; }
.ac-fire.reloading { filter: saturate(0.4); }
.ac-act[data-act="mg"]::after, .ac-act[data-act="gun"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 7px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, #ffd24a, #ff4a2a) left / calc(var(--heat, 0) * 100%) 100% no-repeat, rgba(8, 20, 48, 0.6); }
.ac-act.hot { background: linear-gradient(180deg, #ff7a5a, #b0201a) !important; animation: acHot 0.4s ease-in-out infinite alternate; }
@keyframes acHot { to { filter: brightness(1.35); } }
.ac-tip { position: absolute; left: 50%; top: calc(var(--sat, 0px) + 64px); transform: translateX(-50%); color: #fff; font: 800 11px/1 system-ui, sans-serif; letter-spacing: 0.06em;
  background: rgba(10, 20, 40, 0.55); padding: 6px 10px; border-radius: 10px; pointer-events: none; animation: acTip 5s forwards; }
@keyframes acTip { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (orientation: landscape) {
  body.army-ctl .ac-fire { right: calc(var(--sar, 0px) + 96px); }
  body.army-ctl .ac-acts { right: calc(var(--sar, 0px) + 208px); }
}

/* ==================================================================== 25. 9. feedback: contrast, patterns, tree, filter, chest */
/* A playful background pattern (stars + bolts + diagonal stripes) instead of flat blue everywhere */
:root {
  --sl-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M30 14l5 10 11 2-8 8 2 11-10-5-10 5 2-11-8-8 11-2z'/%3E%3Cpath d='M92 70l-10 16h9l-6 16 16-20h-9l6-12z'/%3E%3Ccircle cx='88' cy='22' r='7'/%3E%3Cpath d='M18 80h14M25 73v14'/%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 16px, transparent 16px 32px);
}
body[data-theme="dark"] .card-panel, body[data-theme="dark"] .quest, body[data-theme="dark"] .dly, body[data-theme="dark"] .cslot,
body[data-theme="dark"] #overlay-body:not(.bs-host), body[data-theme="dark"] .map-chip {
  background-image: var(--sl-pattern), linear-gradient(180deg, #3a7ee8, #2256c0) !important;
}
body[data-theme="dark"] .bottomnav { background-image: var(--sl-pattern), linear-gradient(180deg, #1c4fb0, #123a88); }
.ov.full #overlay-body { background: var(--sl-pattern), radial-gradient(120% 90% at 25% 35%, color-mix(in srgb, var(--tc, #4a8ef0) 45%, #3f86f0), #163f99 70%) !important; }

/* Sheets (tree, skins, how to play, tactics, mods): dark navy so icons and text stand out */
.bs-sheet { background: var(--sl-pattern), linear-gradient(180deg, #16306e, #0b1a40) !important; border: 3px solid #07122e !important; }
.bs-sheet .pw, .bs-sheet .mod, .bs-sheet .mod-slot, .bs-sheet .ovl, .bs-sheet .ht-step, .bs-sheet .ht-vs, .bs-sheet .skin { background: rgba(255, 255, 255, 0.07); }
.bs-sheet .skin { border-color: color-mix(in srgb, var(--rc) 80%, transparent); }
.bs-sheet .skin.sel { background: color-mix(in srgb, var(--rc) 22%, rgba(255, 255, 255, 0.06)); }
.bs-sheet .ht-demo { background: #06102a; }
/* abilities tab: darker cards, readable text */
body[data-theme="dark"] .abcard { background: var(--sl-pattern), linear-gradient(180deg, color-mix(in srgb, var(--ac) 30%, #16306e), #0d1f4c) !important; }
body[data-theme="dark"] .abc-desc, body[data-theme="dark"] .abc-now { color: #dfe9ff; }

/* Upgrade tree: no text walls, the turret itself as a faded backdrop, node info only after a tap */
.bs-tree { position: relative; isolation: isolate; min-height: 260px; }
.bs-tree::before { content: ""; position: absolute; inset: -10px -10px 0; z-index: -1; background: var(--tp) center 40% / min(380px, 90%) no-repeat; opacity: 0.22; filter: saturate(1.2); }
.bs-tree .tinfo { display: none; }
.bs-tree.picked .tinfo { display: flex; background: rgba(6, 14, 36, 0.85); }
.bs-tree .tnode, .bs-tree .troot { background-color: #0d1f4c; }
.bs-tree .tnode:not(.owned):not(.on) svg { opacity: 0.95; }

/* Armory filter + sort bar */
.afbar { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
.af-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.af-l, .af-n { font: 800 11px/1 'Nunito', system-ui, sans-serif; letter-spacing: 0.1em; color: #cfe0ff; }
.af-n { margin-left: auto; }
.af-chip { border: 2px solid #0b2a66; border-radius: 999px; padding: 6px 11px; background: linear-gradient(180deg, #4a8ef0, #2a62cc); color: #fff;
  font: 400 12px/1 'Lilita One', system-ui, sans-serif; letter-spacing: 0.04em; box-shadow: 0 2px 0 #0b2a66; }
.af-chip[style*="--rc"] { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 70%, #4a8ef0), color-mix(in srgb, var(--rc) 45%, #1d4aa6)); }
.af-chip.on { background: linear-gradient(180deg, #ffe45c, #ffb21a) !important; color: #3a2200; }

/* Chest: fits the screen (no clipping), in landscape the chest sits left and the card right; tap anywhere */
.ov.chest { overflow: hidden !important; cursor: pointer; }
.ov.chest .chest-stage { position: absolute; inset: 0; width: auto; margin: 0; padding: calc(var(--sat, 0px) + 14px) 16px calc(var(--sab, 0px) + 14px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ov.chest .chest-stage > .kicker { margin-bottom: 4px; }
.ov.chest .chest-items { max-height: 52vh; overflow-y: auto; touch-action: pan-y; cursor: default; }
@media (orientation: landscape) and (max-height: 520px) {
  .ov.chest .chest-stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; column-gap: 24px; }
  .ov.chest .chest-stage > .kicker { grid-column: 1 / -1; grid-row: 1; }
  .ov.chest .ch-stage { grid-column: 1; grid-row: 2; height: 200px; }
  .ov.chest .chest-big { width: 130px; }
  .ov.chest .ch-rays { width: 300px; height: 300px; }
  .ov.chest .ch-reveal { grid-column: 2; grid-row: 2; }
  .ov.chest .chest-hint { grid-column: 1; grid-row: 3; }
  .ov.chest .ch-left { grid-column: 2; grid-row: 3; }
  .ov.chest .chest-stage:not(:has(.ch-card)):not(.sum) .ch-stage { grid-column: 1 / -1; }
  .ov.chest .chest-stage.sum { grid-template-rows: auto 1fr auto; }
  .ov.chest .chest-stage.sum .ch-stage { display: none; }
  .ov.chest .chest-stage.sum .chest-items { grid-column: 1 / -1; grid-row: 2; max-height: 62vh; }
  .ov.chest .chest-stage.sum #chest-ok { grid-column: 1 / -1; grid-row: 3; }
}

/* B1: one notification column — it steps below the new-enemy card; B6: only the active tab lights up */
body.tip-on #feed { top: calc(var(--tip-bottom, 130px) + 6px) !important; }
body[data-theme="dark"] .bottomnav button.center:not(.active) { background: linear-gradient(180deg, #4a8ef0, #2a62cc); color: #fff; }
body[data-theme="dark"] .bottomnav button.center:not(.active) .nav-ico { filter: drop-shadow(0 2px 0 rgba(11, 42, 102, 0.8)); }
