:root{--hbcq-w:1vw;--hbcq-h:1vh;--hbcq-min:1vmin;--hbcq-max:1vmax}
  /* Settings / Leaderboard / Currency-info / Shop popups — house frame.webp skin, same treatment
     as the hero card / item-detail / journey popup (see lobby.html .m-itemd-land/.m-journey-land).
     Unlike hero-main.js's other .m-look-overlay uses (created/removed from the DOM on demand,
     so the base display:flex is fine), these are static markup (always in the DOM, toggled via
     .open) -- give them their own hide-by-default so they don't all render at once. ANY new
     static .m-look-overlay modal MUST be added to BOTH lists below, or it renders open on
     load and its own .open-removing close button does nothing (confirmed bug, twice — a third
     time 2026-11-14, #bless-modal: an empty frame after closing the Shop). `npm run gen` now
     FAILS on a static window missing from either list (scripts/static-modal-check.mjs). */
  #settings-modal, #lb-modal, #promo-modal, #currency-info-modal, #store-modal, #gemaltar-modal, #google-modal, #quest2-modal, #chestpool-modal, #arena-modal, #arena-shop-modal, #mail-modal, #pack-modal, #colo-modal, #automode-modal, #dragons-modal, #profile-modal, #skills-modal, #events-modal, #bpass-modal, #chat-modal, #boat-modal, #travel-modal, #bless-modal, #arena-settings-modal{display:none}
  #settings-modal.open, #lb-modal.open, #promo-modal.open, #currency-info-modal.open, #store-modal.open, #gemaltar-modal.open, #google-modal.open, #quest2-modal.open, #chestpool-modal.open, #arena-modal.open, #arena-shop-modal.open, #mail-modal.open, #pack-modal.open, #colo-modal.open, #automode-modal.open, #dragons-modal.open, #profile-modal.open, #skills-modal.open, #events-modal.open, #bpass-modal.open, #chat-modal.open, #boat-modal.open, #travel-modal.open, #bless-modal.open, #arena-settings-modal.open{display:flex}
  /* The ARENA's two (2026-09-24) — the FOURTH time: both rendered open on load, the prize notice on
     top of everything, until a phone-viewport screenshot showed an empty leaf frame over the lobby.
     The prize notice paints above the Arena window (it can arrive while the window is open). */
  #arena-shop-modal{z-index:9002}
  #chat-modal{z-index:9002}
  /* chestpool-modal opens FROM INSIDE the shop (its "i" button, .m-store-info below) and must paint
     ABOVE it. Both share .m-look-overlay's z-index:9000 (hero-port.css), so with no override the tie
     falls back to DOM order -- and #store-modal is declared LATER in this file than #chestpool-modal,
     so it was winning and the info popup rendered underneath the shop it opened from. */
  #chestpool-modal{z-index:9001}

  /* PALETTE A (Roman, 2026-11-13: "light and dark green" — our colours, not Skull Hero's): the free lane light green, the pass
     lane dark green, the rank numbers on our navy, the rank band leaf green, the bounty cards navy in a gold line. */
  /* ═══════ THE BATTLE PASS — DESIGN B (Roman, 2026-11-10, from the canvas: "B, in our popup like the events, the X top right,
     Get Pass like A, no Claim All and no back arrow"). The Events frame and wooden title; inside: the Gemini banner with the
     week's clock, the bounties as wide rows, the rank band, the FREE / Get Pass tickets (Gemini, redesign/bpass/), and each rank
     one strip FREE | rank | PASS. Flat tiles coloured by reward; a reward is taken by tapping its glowing tile. Lilita One
     (lobby.html's @font-face) with a dark outline, like the reference. Every size in the frame's cq units. ═══════ */
  .m-bp-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:calc(2.4 * var(--hbcq-w)) calc(1.7 * var(--hbcq-w)) calc(5 * var(--hbcq-w));padding:2.4cqw 1.7cqw 5cqw;margin:0 calc(3.3 * var(--hbcq-w)) calc(6.4 * var(--hbcq-w));margin:0 3.3cqw 6.4cqw;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 1.6%,#000 96.4%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 1.6%,#000 96.4%,transparent 100%);display:flex;flex-direction:column;
    gap:calc(2.2 * var(--hbcq-w));gap:2.2cqw;scrollbar-width:none;text-align:left;font-family:'Lilita One',sans-serif;font-weight:400}
  .m-bp-body::-webkit-scrollbar{display:none}
  .m-bp-foot{display:none}
  .m-bp-body button{font-family:inherit;font-weight:400}
  .m-bp-ol,.m-bp-body .m-bp-ol{color:#fff;text-shadow:0 calc(.4 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020;text-shadow:0 .4cqw 0 #1a1020,-.3cqw -.3cqw 0 #1a1020,.3cqw -.3cqw 0 #1a1020,-.3cqw .3cqw 0 #1a1020,.3cqw .3cqw 0 #1a1020}
  .m-bp-wait{margin:auto;color:#e8dcff;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;text-align:center}
  /* the banner: Gemini's dungeon arch, the week's clock on it */
  .m-bp-banner{position:relative;flex:none;height:calc(30 * var(--hbcq-w));height:30cqw;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw;background:#2a1d18 url('bpass/banner.webp') center 40%/cover no-repeat;
    box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #e0a43a,0 calc(.6 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w)) #0008;box-shadow:inset 0 0 0 .5cqw #e0a43a,0 .6cqw 1.2cqw #0008}
  .m-bp-timer{position:absolute;left:50%;bottom:calc(2 * var(--hbcq-w));bottom:2cqw;transform:translateX(-50%);display:flex;align-items:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;white-space:nowrap;
    padding:calc(1 * var(--hbcq-w)) calc(3.6 * var(--hbcq-w));padding:1cqw 3.6cqw;border-radius:calc(5 * var(--hbcq-w));border-radius:5cqw;background:rgba(10,6,20,.72);box-shadow:inset 0 0 0 calc(.3 * var(--hbcq-w)) #e0a43a;box-shadow:inset 0 0 0 .3cqw #e0a43a}
  .m-bp-timer i{width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw;border-radius:50%;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #ffd34d;box-shadow:inset 0 0 0 .5cqw #ffd34d;position:relative}
  .m-bp-timer i::after{content:'';position:absolute;left:50%;top:22%;width:calc(.5 * var(--hbcq-w));width:.5cqw;height:32%;background:#ffd34d;transform:translateX(-50%)}
  .m-bp-timer span{font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;color:#ffd34d}
  .m-bp-sect{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#f0d78f;margin:calc(.6 * var(--hbcq-w)) 0 calc(-.6 * var(--hbcq-w));margin:.6cqw 0 -.6cqw}
  /* a bounty: one wide row — portrait, the task and its bar, the stars, the ad refresh (or the lock) */
  .m-bp-brow{position:relative;display:flex;align-items:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;min-height:calc(15 * var(--hbcq-w));min-height:15cqw;padding:calc(1.4 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w));padding:1.4cqw 2.4cqw 1.4cqw 1.4cqw;border-radius:calc(2.8 * var(--hbcq-w));border-radius:2.8cqw;
    background:#0c2448;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c8902e,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #c8902e,0 .5cqw 0 #0008}
  .m-bp-brow.heroic{background:#f2b630;box-shadow:inset 0 0 0 calc(.7 * var(--hbcq-w)) #ffe08a,0 calc(.5 * var(--hbcq-w)) 0 #8a5a0c;box-shadow:inset 0 0 0 .7cqw #ffe08a,0 .5cqw 0 #8a5a0c}
  .m-bp-brow.heroic.locked{cursor:pointer}
  .m-bp-face{flex:none;width:calc(12.4 * var(--hbcq-w));width:12.4cqw;height:calc(12.4 * var(--hbcq-w));height:12.4cqw;border-radius:50%;background:#06172f;display:flex;align-items:center;justify-content:center}
  .m-bp-brow.heroic .m-bp-face{background:#c98a14}
  .m-bp-face img{width:calc(11 * var(--hbcq-w));width:11cqw;height:calc(11 * var(--hbcq-w));height:11cqw;object-fit:contain;filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .3cqw .4cqw #0009)}
  .m-bp-brow.waiting .m-bp-face img{filter:grayscale(.7) brightness(.5)}
  .m-bp-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(1 * var(--hbcq-w));gap:1cqw}
  .m-bp-task{font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .m-bp-sub{font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw;color:#fff3c4}
  .m-bp-bar{position:relative;height:calc(3.6 * var(--hbcq-w));height:3.6cqw;border-radius:calc(1.8 * var(--hbcq-w));border-radius:1.8cqw;background:#04101f;overflow:hidden}
  .m-bp-brow.heroic .m-bp-bar{background:#5a3a0c}
  .m-bp-bar i{position:absolute;left:0;top:0;bottom:0;background:#4cb84a}
  .m-bp-bar span{position:relative;display:block;text-align:center;font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:calc(3.6 * var(--hbcq-w));line-height:3.6cqw}
  .m-bp-done{font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;color:#62ff52}
  .m-bp-clock{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#ffd34d}
  .m-bp-stars{flex:none;width:calc(11 * var(--hbcq-w));width:11cqw;text-align:right;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;color:#ffd34d}
  .m-bp-brow.heroic .m-bp-stars{color:#fff}
  /* THE AD SWAPS THE BOUNTY (Roman, 2026-11-13: "it looks like kill 6 monsters OR watch an ad"; then "more our theme"): our painted swap medallion (bp_swap.webp) — was a green round button with a
     gold rim and a white two-arrow swap sign; the ad badge small at its corner; SWAP under it (palette A — it was a blue disc
     holding only the ad badge, which read as a second way to finish the bounty). */
  .m-bp-refresh{flex:none;display:flex;flex-direction:column;align-items:center;gap:calc(.6 * var(--hbcq-w));gap:.6cqw;background:none;border:none;padding:0;cursor:pointer}
  .m-bp-swapc{position:relative;width:calc(10.6 * var(--hbcq-w));width:10.6cqw;height:calc(10.6 * var(--hbcq-w));height:10.6cqw;display:flex;align-items:center;justify-content:center}
  .m-bp-swapi{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #0008);filter:drop-shadow(0 .4cqw .3cqw #0008)}
  .m-bp-swapad{position:absolute;right:calc(-1.4 * var(--hbcq-w));right:-1.4cqw;bottom:calc(-1 * var(--hbcq-w));bottom:-1cqw;width:calc(5 * var(--hbcq-w));width:5cqw;height:auto;filter:drop-shadow(0 calc(.2 * var(--hbcq-w)) calc(.2 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .2cqw .2cqw #0009)}
  .m-bp-swapw{font-family:'Lilita One',sans-serif;font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw;color:#fff;letter-spacing:.04em;line-height:1}
  .m-bp-refresh:active .m-bp-swapc{transform:scale(.94)}
  /* ═══════ THEME RULES, BOTH LAYOUTS (Roman, 2026-11-14: "we need theme rules — it makes no sense that every new window is
     suddenly something different"; "don't neglect landscape — people play that way"). The upright and the landscape lobby
     draw these windows on the same shop_frame.webp at the same shape (1180/1402: upright a nine-slice, sideways stretched),
     so one set of numbers serves both — measured on the art (1122x1402): the plank's wood band 44-149 art px (centre 96 =
     8.14cqw), the navy opening from 158 px under the plank (13.4cqw), 35 px in from each side (3.1cqw), 33 px up from the
     bottom (2.8cqw; the bottom corners' curls rise to ~9.7cqw). The wide windows (Chat, the Merchant, the sideways
     Leaderboard, the message popups) wear big_frame and keep their own. ═══════ */
  /* THE LIST STAYS INSIDE THE FRAME (Roman, on the Battle Pass: "the inner window touches the title and goes out of the popup
     at the bottom"): a body that SCROLLS sits in the opening — margin 0 3.3cqw 6.4cqw on .m-bp-body / .m-drag-body /
     .m-store-body above, a fixed 14.2cqw title over it, a short fade at its ends (the Shop: the bottom only; its pinned
     balance band fades on its own). Each body's side padding is its old one minus the margin, so nothing moved sideways; the
     edge-to-edge bands (the pass's rank band, the dragons' eggs) reach the opening's edges, never the gold sides. A NEW
     tall window whose body scrolls does the same. */
  .m-settings-land.m-bpass .m-settings-title,
  .m-settings-land.m-drag .m-settings-title,
  .m-store-land .m-store-title{height:calc(14.2 * var(--hbcq-w));height:14.2cqw;box-sizing:border-box;padding-top:calc(4.04 * var(--hbcq-w));padding-top:4.04cqw}
  /* THE WINDOW TITLE — ONE RULE ("SLIME ISLAND exactly in the middle — like that for all, but gold like the Battle Pass").
     Measured that day: four sizes (3.1-6cqw), white in the quest log, the 4cqw ones 1.3cqw ABOVE the plank's middle. Now:
     Cinzel 900, gold #f0d78f, 5cqw, the text centred on the plank (line-height 5.5cqw = the old 4cqw line, so a title's
     flow height did not change; `top` moves only the text). A title wider than the plank's board is shrunk to fit by
     popups.js titleFit, the longest wrap on two lines — one size + a fit, never a size per window. A NEW WINDOW'S TITLE
     joins this list (and titleFit's SEL). */
  .m-settings-land:not(.m-lb-land) .m-settings-title,
  .m-store-land .m-store-title,
  .m-quest2-land .m-quest2-title{font-family:'Cinzel',serif;font-weight:900;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;color:#f0d78f;letter-spacing:.05em;
    text-transform:uppercase;text-shadow:0 2px 4px #000b,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a33;text-shadow:0 2px 4px #000b,0 0 1.2cqw #ffd98a33}
  .m-settings-land:not(.m-lb-land) .m-settings-title,
  .m-store-land .m-store-title{position:relative;top:calc(1.35 * var(--hbcq-w));top:1.35cqw;line-height:calc(5.5 * var(--hbcq-w));line-height:5.5cqw;white-space:nowrap}

  /* THE LONG PLANK — ONE FRAME FOR A LONG TITLE (Roman, 2026-11-14: "another popup whose top part is longer, for when we have a
     lot of text"; on the result: "perfect"): shop_frame_wide.webp is shop_frame.webp with its two leaf ends moved out over the
     rail and the wood between stretched (the gem and the ends untouched). A NEW window with a long title adds .m-wide-title to its
     .m-settings-land; titleFit (popups.js) then lets the title take 60cqw before it shrinks. A window whose UPRIGHT look is the
     nine-slice border-image (Boat, Battle Pass, Events) needs the wide picture in its own portrait.css rule too. */
  .m-settings-land.m-wide-title{background-image:url('heropopup/shop/shop_frame_wide.webp')}

  /* ═══════ THE BLESSINGS OF THE WEEK (2026-11-14, redesign/arena.js openBlessWindow) — the Settings frame and its theme rules (the
     gold centred title, the X, the leaf pill): a line that says it changes every week, the two blessings each in a navy panel with
     a gold rim (the Boat window's), next week's gem, the clock, GOT IT. Every size in the frame's cq units, both layouts. ═══════ */
  .m-blessw-body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:calc(2.6 * var(--hbcq-w));gap:2.6cqw;
    margin:0 calc(3.3 * var(--hbcq-w)) calc(6.4 * var(--hbcq-w));margin:0 3.3cqw 6.4cqw;padding:calc(2 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:2cqw 4cqw 3cqw;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
    font-family:'Lilita One',sans-serif;font-weight:400;text-align:center}
  .m-blessw-body::-webkit-scrollbar{display:none}
  .m-blessw-ol{color:#fff;text-shadow:0 calc(.4 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020;text-shadow:0 .4cqw 0 #1a1020,-.3cqw -.3cqw 0 #1a1020,.3cqw -.3cqw 0 #1a1020,-.3cqw .3cqw 0 #1a1020,.3cqw .3cqw 0 #1a1020}
  .m-blessw-wait{margin:auto;color:#e8dcff;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
  .m-blessw-intro{font-size:calc(4.4 * var(--hbcq-w));font-size:4.4cqw;line-height:1.15;padding:0 calc(2 * var(--hbcq-w));padding:0 2cqw}
  .m-blessw-card{display:flex;align-items:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;padding:calc(2.2 * var(--hbcq-w)) calc(3.4 * var(--hbcq-w));padding:2.2cqw 3.4cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;text-align:left;
    background:#0c2448;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c8902e,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #c8902e,0 .5cqw 0 #0008}
  .m-blessw-card img{flex:none;width:calc(14 * var(--hbcq-w));width:14cqw;height:calc(14 * var(--hbcq-w));height:14cqw;object-fit:contain;filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .4cqw .3cqw #0009)}
  .m-blessw-card div{display:flex;flex-direction:column;gap:calc(.6 * var(--hbcq-w));gap:.6cqw;min-width:0}
  .m-blessw-card b{font-weight:400;font-size:calc(7 * var(--hbcq-w));font-size:7cqw;line-height:1;color:#ffd34d}
  .m-blessw-card span{font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1.2;color:#e8dcff}
  .m-blessw-next{display:flex;align-items:center;justify-content:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;color:#fff6e0}
  .m-blessw-next img{width:calc(7.5 * var(--hbcq-w));width:7.5cqw;height:calc(7.5 * var(--hbcq-w));height:7.5cqw;object-fit:contain}
  /* DESIGN A (2026-11-24): the week's arena painting with its gem's banner, and next week as its own card. */
  .m-blessw-banner{position:relative;flex:none;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;overflow:hidden;aspect-ratio:16/8;
    box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) #c8902e,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .6cqw #c8902e,0 .5cqw 0 #0008}
  .m-blessw-banner img{display:block;width:100%;height:100%;object-fit:cover}
  .m-blessw-banner::after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) #c8902e;box-shadow:inset 0 0 0 .6cqw #c8902e;pointer-events:none}
  .m-blessw-ribbon{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);white-space:nowrap;text-transform:uppercase;
    font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;line-height:1;padding:calc(1.4 * var(--hbcq-w)) calc(4.4 * var(--hbcq-w));padding:1.4cqw 4.4cqw;border-radius:calc(99 * var(--hbcq-w));border-radius:99cqw;background:#1b4a86;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #f0d78f,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #f0d78f,0 .5cqw 0 #0008}
  .m-blessw-ribbon.el-fire{background:#b8321f} .m-blessw-ribbon.el-ice{background:#1f5fa8} .m-blessw-ribbon.el-lightning{background:#a98510}
  .m-blessw-ribbon.el-wind{background:#1f8a74} .m-blessw-ribbon.el-light{background:#b58a12} .m-blessw-ribbon.el-dark{background:#5b2a86}
  .m-blessw-nextcard{display:flex;align-items:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;padding:calc(2 * var(--hbcq-w)) calc(3.4 * var(--hbcq-w));padding:2cqw 3.4cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;text-align:left;
    background:#16133a;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #8f7bd6,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #8f7bd6,0 .5cqw 0 #0008}
  .m-blessw-nextcard img{flex:none;width:calc(12 * var(--hbcq-w));width:12cqw;height:calc(12 * var(--hbcq-w));height:12cqw;object-fit:contain;filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .4cqw .3cqw #0009)}
  .m-blessw-nextcard div{display:flex;flex-direction:column;gap:calc(.5 * var(--hbcq-w));gap:.5cqw;min-width:0}
  .m-blessw-nextcard i{font-style:normal;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1;color:#cfc3ff;text-transform:uppercase;letter-spacing:.06em}
  .m-blessw-nextcard b{font-weight:400;font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;line-height:1;color:#ffd34d}
  .m-blessw-nextcard span{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;line-height:1.2;color:#e8dcff}
  .m-blessw-clock{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#cfe3ff}
  .m-blessw-ok{position:relative;align-self:center;flex:none;width:calc(36 * var(--hbcq-w));width:36cqw;aspect-ratio:440/150;margin-top:calc(3 * var(--hbcq-w));margin-top:3cqw;border:none;padding:0;
    cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:inherit;font-weight:400;
    background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  .m-blessw-ok::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;transform:translateX(-50%);
    pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-blessw-ok b{font-size:calc(5 * var(--hbcq-w));font-size:5cqw;line-height:1}

  /* ═══════ BIGARENA'S SETTINGS (2026-11-26, redesign/arena-settings.js): the Settings window's frame, its gold section titles and
     ON / OFF pills; a line under each row. A dimmed row = PvP off the base, or an invite row under Do not disturb. ═══════ */
  .m-aset .m-settings-content{-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 92%,transparent 100%);
    mask-image:linear-gradient(to bottom,#000 0,#000 92%,transparent 100%)}   /* the list scrolls inside the frame, soft at the bottom (THEME RULES) */
  .m-aset-row{width:100%;display:flex;flex-direction:column;align-items:center;gap:calc(1 * var(--hbcq-h));gap:1cqh}
  .m-aset-row.dim .m-perf-row{opacity:.55}
  .m-aset-sub{width:90%;text-align:center;font-family:'Lilita One',sans-serif;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;line-height:1.25;color:#cfe3ff;
    text-shadow:0 calc(.3 * var(--hbcq-w)) 0 #0a1830;text-shadow:0 .3cqw 0 #0a1830}
  .m-aset-note{width:90%;margin-top:calc(1 * var(--hbcq-h));margin-top:1cqh;text-align:center;font-family:'Lilita One',sans-serif;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;color:#ffcf6a;
    text-shadow:0 calc(.3 * var(--hbcq-w)) 0 #1a1020;text-shadow:0 .3cqw 0 #1a1020}
  .m-perf-btn.m-aset-pvp.on .m-perf-label{color:#ffb0a0}
  /* ═══════ THE BOATMAN'S WINDOW (2026-11-14, redesign/boat.js) — the Settings frame and its theme rules (the gold centred title,
     the navy lock, the leaf pills). Top: the Boat Tickets and the two ways to get one; below, where he sails — a painted island
     card, "1 ticket", SAIL; the rest locked. Every size in the frame's cq units, both layouts. ═══════ */
  .m-boat-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:calc(2.6 * var(--hbcq-w));gap:2.6cqw;margin:0 calc(3.3 * var(--hbcq-w)) calc(6.4 * var(--hbcq-w));margin:0 3.3cqw 6.4cqw;padding:calc(3 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:3cqw 2.4cqw 3cqw;
    overflow-y:auto;overflow-x:hidden;scrollbar-width:none;font-family:'Lilita One',sans-serif;font-weight:400;text-align:left;
    -webkit-mask-image:linear-gradient(to bottom,#000 0,#000 95%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0,#000 95%,transparent 100%)}   /* inside the frame's opening, soft at the bottom (THEME RULES) */
  .m-boat-body::-webkit-scrollbar{display:none}
  .m-boat-body button{font-family:inherit;font-weight:400}
  .m-boat-ol{color:#fff;text-shadow:0 calc(.4 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(-.3 * var(--hbcq-w)) 0 #1a1020,calc(-.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020,calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) 0 #1a1020;text-shadow:0 .4cqw 0 #1a1020,-.3cqw -.3cqw 0 #1a1020,.3cqw -.3cqw 0 #1a1020,-.3cqw .3cqw 0 #1a1020,.3cqw .3cqw 0 #1a1020}
  .m-boat-wait{margin:auto;color:#e8dcff;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;text-align:center}
  .m-boat-bal{flex:none;display:flex;align-items:center;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;padding:calc(1.6 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:1.6cqw 3cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;
    background:#0c2448;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c8902e,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #c8902e,0 .5cqw 0 #0008}
  .m-boat-bal img{width:calc(13 * var(--hbcq-w));width:13cqw;height:calc(13 * var(--hbcq-w));height:13cqw;object-fit:contain;filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .4cqw .3cqw #0009)}
  .m-boat-bal b{font-size:calc(9 * var(--hbcq-w));font-size:9cqw;line-height:1;color:#ffd34d}
  .m-boat-bal span{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
  .m-boat-bal.bump img{animation:mBoatBump .7s ease-out}
  .m-boat-bal.bump b{animation:mBoatBump .7s ease-out}
  @keyframes mBoatBump{0%{transform:scale(1)}30%{transform:scale(1.35)}100%{transform:scale(1)}}
  .m-boat-get{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:calc(4 * var(--hbcq-w));gap:4cqw;padding:calc(3.4 * var(--hbcq-w)) calc(2 * var(--hbcq-w)) 0;padding:3.4cqw 2cqw 0}
  .m-boat-getbtn{position:relative;aspect-ratio:440/150;border:none;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;
    gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;color:#fff8dc;background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  .m-boat-getbtn::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;transform:translateX(-50%);
    pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-boat-getbtn b{font-size:calc(5 * var(--hbcq-w));font-size:5cqw;line-height:1}
  .m-boat-getbtn small{display:flex;align-items:center;gap:calc(.6 * var(--hbcq-w));gap:.6cqw;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;line-height:1}
  .m-boat-getbtn small img{width:calc(4.2 * var(--hbcq-w));width:4.2cqw;height:calc(4.2 * var(--hbcq-w));height:4.2cqw;object-fit:contain}
  .m-boat-adtag{width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;object-fit:contain}
  .m-boat-getbtn.short{filter:grayscale(.5) brightness(.85)}
  .m-boat-getbtn:active{transform:scale(.95)}
  .m-boat-get.pulse .m-boat-getbtn{animation:mBoatPulse 1.2s ease-in-out infinite}
  @keyframes mBoatPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.3)}}
  .m-boat-list{display:flex;flex-direction:column;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw}
  .m-boat-row{position:relative;display:flex;align-items:center;gap:calc(2.6 * var(--hbcq-w));gap:2.6cqw;padding:calc(1.6 * var(--hbcq-w));padding:1.6cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;background:#0c2448;
    box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c8902e,0 calc(.5 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .5cqw #c8902e,0 .5cqw 0 #0008}
  .m-boat-art{flex:none;width:calc(30 * var(--hbcq-w));width:30cqw;aspect-ratio:3/2;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;background:#06172f center/cover no-repeat;
    box-shadow:inset 0 0 0 calc(.4 * var(--hbcq-w)) #e0a43a;box-shadow:inset 0 0 0 .4cqw #e0a43a}
  .m-boat-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(1 * var(--hbcq-w));gap:1cqw}
  .m-boat-info b{font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;line-height:1.05}
  .m-boat-info span{display:flex;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#ffd34d}
  .m-boat-info span img{width:calc(6.4 * var(--hbcq-w));width:6.4cqw;height:calc(6.4 * var(--hbcq-w));height:6.4cqw;object-fit:contain}
  /* the recommended level (2026-11-20): a word under the island, red while the hero is below it */
  .m-boat-info span.m-boat-rec{font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#cfe9b8}
  .m-boat-info span.m-boat-rec.low{color:#ff6b5e}
  .m-boat-sail{flex:none;position:relative;width:calc(24 * var(--hbcq-w));width:24cqw;aspect-ratio:440/150;border:none;padding:0;cursor:pointer;display:flex;align-items:center;
    justify-content:center;color:#fff8dc;background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  .m-boat-sail::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;transform:translateX(-50%);
    pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-boat-sail b{font-size:calc(4.4 * var(--hbcq-w));font-size:4.4cqw;letter-spacing:.04em}
  .m-boat-sail.off{background-image:url('heropopup/settings/performance_not_selected.webp');color:#e8dcc0}
  .m-boat-sail.off::before{display:none}
  .m-boat-sail:active{transform:scale(.95)}
  .m-boat-row.locked .m-boat-art{filter:grayscale(.4) brightness(.75)}
  .m-boat-row.locked .m-boat-info b{color:#c8d6ea}
  /* FAST TRAVEL (2026-11-22, redesign/travel.js): the Boatman's window, one row — the arch tapped on the map */
  .m-travel-daily{flex:none;text-align:center;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;color:#cfe9b8;margin-top:calc(-1 * var(--hbcq-w));margin-top:-1cqw}
  .m-travel-art{background-size:contain;background-color:#06172f}
  /* sideways: the Settings frame's width, shorter (one row) — the frame drawn nine-sliced so its plank keeps its shape (the
     Boatman's upright rule, portrait.css) */
  #travel-modal .m-settings-land.m-travel{height:auto;width:calc(min(900px,94vh,calc(64vw*1402/1180))*1180/1402);aspect-ratio:100/90;
    background:none;isolation:isolate}
  #travel-modal .m-settings-land.m-travel::before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;
    pointer-events:none;border-style:solid;border-width:calc(14.407 * var(--hbcq-w)) calc(4.456 * var(--hbcq-w)) calc(12.288 * var(--hbcq-w)) calc(4.456 * var(--hbcq-w));border-width:14.407cqw 4.456cqw 12.288cqw 4.456cqw;
    border-image:url('heropopup/shop/shop_frame.webp') 170 50 145 50 fill stretch}
  .m-boat-row .m-boat-lock{flex:none;width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw;margin:0 calc(2 * var(--hbcq-w)) 0 0;margin:0 2cqw 0 0}

  /* THE LOCK — ONE PICTURE, BOTH LAYOUTS (Roman, 2026-11-14: "where else do we have a lock or SWAP? it must all be the same —
     it's part of our theme"; then "yes, landscape too — don't neglect landscape, people play that way"). His pick of three
     painted in the SWAP medallion's style: the gold ring and its two leaves on our navy disc, a gold padlock — lock_navy.webp.
     EVERY lock in the lobby wears it (this file, lobby.html's ability card and forge badge, dragons.js, arena.js, the upright
     rows in portrait.css). It replaced five looks: a CSS blue disc with season/lock, the ab_locked medallion,
     ability_locked, the 🔒 emoji. A NEW LOCK uses .hb-lock-ico or this picture — never one of its own. The SWAP medallion
     (bp_swap.webp) is the only swap; a new swap / refresh / re-roll takes it. */
  .hb-lock-ico{display:inline-block;width:1.25em;height:1.25em;margin:0 .3em -.25em 0;font-style:normal;
    background:url('lock_navy.webp') center/contain no-repeat;filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}
  .m-bp-lockc{flex:none;width:calc(10.6 * var(--hbcq-w));width:10.6cqw;height:calc(10.6 * var(--hbcq-w));height:10.6cqw;background:url('lock_navy.webp') center/contain no-repeat;filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}
  /* the rank band */
  .m-bp-rankrow{display:flex;align-items:center;gap:calc(2.6 * var(--hbcq-w));gap:2.6cqw;margin:0 calc(-1.7 * var(--hbcq-w));margin:0 -1.7cqw;padding:calc(2 * var(--hbcq-w)) calc(1.7 * var(--hbcq-w));padding:2cqw 1.7cqw;background:#4a6119;
    box-shadow:inset 0 calc(.6 * var(--hbcq-w)) 0 #74932c,inset 0 calc(-.6 * var(--hbcq-w)) 0 #2c3a0c;box-shadow:inset 0 .6cqw 0 #74932c,inset 0 -.6cqw 0 #2c3a0c}
  .m-bp-badge{flex:none;width:calc(11 * var(--hbcq-w));width:11cqw;height:calc(11 * var(--hbcq-w));height:11cqw;border-radius:50%;background:#ffd34d;display:flex;align-items:center;justify-content:center}
  .m-bp-badge span{width:calc(9 * var(--hbcq-w));width:9cqw;height:calc(9 * var(--hbcq-w));height:9cqw;border-radius:50%;background:#6b3f12;display:flex;align-items:center;justify-content:center;font-size:calc(4.8 * var(--hbcq-w));font-size:4.8cqw}
  .m-bp-rmid{flex:1;display:flex;flex-direction:column;gap:calc(.8 * var(--hbcq-w));gap:.8cqw}
  .m-bp-rlabel{font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw}
  .m-bp-rankbar{position:relative;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;border-radius:calc(2.2 * var(--hbcq-w));border-radius:2.2cqw;background:#1f2a08;overflow:hidden}
  .m-bp-rankbar i{position:absolute;left:0;top:0;bottom:0;background:#9bd34a}
  .m-bp-rankbar span{position:relative;display:block;text-align:center;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;line-height:calc(4.4 * var(--hbcq-w));line-height:4.4cqw}
  .m-bp-last{display:flex;align-items:center;justify-content:space-between;gap:calc(2 * var(--hbcq-w));gap:2cqw;padding:calc(1.6 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:1.6cqw 3cqw;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;
    background:#4a2a12;box-shadow:inset 0 0 0 calc(.4 * var(--hbcq-w)) #b07a2a;box-shadow:inset 0 0 0 .4cqw #b07a2a;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#ffe9a8}
  .m-bp-last button{flex:none;border:none;cursor:pointer;padding:calc(1.4 * var(--hbcq-w)) calc(4.4 * var(--hbcq-w));padding:1.4cqw 4.4cqw;border-radius:calc(1.8 * var(--hbcq-w));border-radius:1.8cqw;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#fff;background:#4cc23f;
    box-shadow:inset 0 0 0 calc(.4 * var(--hbcq-w)) #9df08f,0 calc(.4 * var(--hbcq-w)) 0 #2a7a20;box-shadow:inset 0 0 0 .4cqw #9df08f,0 .4cqw 0 #2a7a20}
  /* FREE | Get the Pass — the Gemini tickets */
  .m-bp-heads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(9 * var(--hbcq-w));gap:9cqw;align-items:center}
  .m-bp-head{height:calc(14.6 * var(--hbcq-w));height:14.6cqw;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:none;padding:0 0 calc(.6 * var(--hbcq-w));padding:0 0 .6cqw;
    background:center/100% 100% no-repeat}
  .m-bp-head.free{background-image:url('bpass/ticket_free.webp')}
  .m-bp-head.prem{background-image:url('bpass/ticket_pass.webp');cursor:pointer}
  .m-bp-head.prem.on{cursor:default}
  .m-bp-head b{font-weight:400;font-size:calc(4 * var(--hbcq-w));font-size:4cqw;line-height:1.05}
  .m-bp-head small{display:flex;align-items:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;line-height:1.1}
  .m-bp-head small img{width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw;object-fit:contain}
  /* the pass's time left on the buy button (2026-11-22), red in its last 24 hours; bpFitHeadEnds shrinks a long language */
  .m-bp-headends{display:block;font-style:normal;white-space:nowrap;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;line-height:1.15;color:#ffd34d;margin-top:calc(.3 * var(--hbcq-w));margin-top:.3cqw}
  .m-bp-headends b{font-weight:400}
  .m-bp-headends.soon{color:#ff7a66}
  /* a rank: ONE strip — the free half, the rank, the pass half */
  .m-bp-track{display:flex;flex-direction:column;gap:calc(2 * var(--hbcq-w));gap:2cqw}
  .m-bp-row{display:grid;grid-template-columns:minmax(0,1fr) calc(10 * var(--hbcq-w)) minmax(0,1fr);grid-template-columns:minmax(0,1fr) 10cqw minmax(0,1fr);align-items:stretch;min-height:calc(18 * var(--hbcq-w));min-height:18cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;
    overflow:hidden;box-shadow:0 calc(.6 * var(--hbcq-w)) 0 #0006;box-shadow:0 .6cqw 0 #0006}
  .m-bp-lane{display:flex;align-items:center;justify-content:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;padding:calc(1.6 * var(--hbcq-w)) calc(.8 * var(--hbcq-w));padding:1.6cqw .8cqw}
  .m-bp-lane.free{background:#93b453}
  .m-bp-lane.prem{background:#3c5616}
  .m-bp-row.reached .m-bp-lane.free{background:#b3d36b}
  .m-bp-row.reached .m-bp-lane.prem{background:#4f7020}
  .m-bp-num{display:flex;align-items:center;justify-content:center;background:#00132b;color:#e8dcb0;font-size:calc(4.8 * var(--hbcq-w));font-size:4.8cqw}
  .m-bp-row.reached .m-bp-num{color:#ffd34d}
  .m-bp-tile{position:relative;flex:none;width:calc(12.4 * var(--hbcq-w));width:12.4cqw;height:calc(12.4 * var(--hbcq-w));height:12.4cqw;border:none;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;padding:0;cursor:default;
    display:flex;align-items:center;justify-content:center;background:#3f6fd8;box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) rgba(255,255,255,.35),0 calc(.5 * var(--hbcq-w)) 0 rgba(0,0,0,.35);box-shadow:inset 0 0 0 .6cqw rgba(255,255,255,.35),0 .5cqw 0 rgba(0,0,0,.35)}
  .m-bp-lane.free .m-bp-tile:nth-last-child(n+3),.m-bp-lane.free .m-bp-tile:nth-last-child(n+3) ~ .m-bp-tile{width:calc(10.6 * var(--hbcq-w));width:10.6cqw;height:calc(10.6 * var(--hbcq-w));height:10.6cqw}
  .m-bp-tile.k-gold{background:#e8a12a}
  .m-bp-tile.k-crystals,.m-bp-tile.k-chest,.m-bp-tile.k-chest_plus{background:#3f6fd8}
  .m-bp-tile.k-hp{background:#2f9a6a}
  .m-bp-tile.k-sword,.m-bp-tile.k-bow,.m-bp-tile.k-wand{background:#d64a3f}
  .m-bp-tile.k-egg,.m-bp-tile.k-stones{background:#9050d8}
  .m-bp-tile img{width:72%;height:72%;object-fit:contain}
  .m-bp-tile span{position:absolute;left:0;right:0;bottom:calc(-.8 * var(--hbcq-w));bottom:-.8cqw;text-align:center;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw}
  .m-bp-tile.claimable{cursor:pointer;box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) #ffd34d,0 0 calc(2.4 * var(--hbcq-w)) #ffd34d;box-shadow:inset 0 0 0 .6cqw #ffd34d,0 0 2.4cqw #ffd34d;animation:mBpGlow 1.1s ease-in-out infinite}
  @keyframes mBpGlow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.3)}}
  .m-bp-tile.claimed img,.m-bp-tile.claimed span{opacity:.4}
  /* A TILE TO TAKE SAYS SO (Roman, 2026-11-11): a green CLAIM pill across its top edge — FREE left, PASS right. */
  .m-bp-tile .m-bp-claimpill{position:absolute;left:calc(-1 * var(--hbcq-w));left:-1cqw;right:calc(-1 * var(--hbcq-w));right:-1cqw;top:calc(-2.2 * var(--hbcq-w));top:-2.2cqw;height:calc(4.2 * var(--hbcq-w));height:4.2cqw;border-radius:calc(2.1 * var(--hbcq-w));border-radius:2.1cqw;background:#3fbf4a;
    box-shadow:0 0 0 calc(.4 * var(--hbcq-w)) #fff;box-shadow:0 0 0 .4cqw #fff;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;color:#fff;z-index:2}
  /* A FINISHED CARD'S STARS: a green CLAIM with the stars it pays, where the stars sat (2026-11-11). */
  .m-bp-starclaim{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(.2 * var(--hbcq-w));gap:.2cqw;min-width:calc(20 * var(--hbcq-w));min-width:20cqw;height:calc(11 * var(--hbcq-w));height:11cqw;
    padding:0 calc(2 * var(--hbcq-w));padding:0 2cqw;border:none;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw;cursor:pointer;background:#3fbf4a;box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) #8ef08a,0 calc(.6 * var(--hbcq-w)) 0 #1d6b24;box-shadow:inset 0 0 0 .6cqw #8ef08a,0 .6cqw 0 #1d6b24;
    font-family:inherit;color:#fff;animation:mBpGlow 1.1s ease-in-out infinite}
  .m-bp-starclaim span{font-size:calc(4 * var(--hbcq-w));font-size:4cqw;line-height:1}
  .m-bp-starclaim b{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;line-height:1;color:#ffe680}
  .m-bp-starclaim:active{transform:scale(.95)}
  .m-bp-lane{overflow:visible}
  .m-bp-lock{position:absolute;top:calc(-2.6 * var(--hbcq-w));top:-2.6cqw;right:calc(-2.6 * var(--hbcq-w));right:-2.6cqw;width:calc(6.8 * var(--hbcq-w));width:6.8cqw;height:calc(6.8 * var(--hbcq-w));height:6.8cqw;background:url('lock_navy.webp') center/contain no-repeat;
    filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}
  .m-bp-tile.lk>img{filter:brightness(.72) saturate(.8)}   /* a locked reward is not his yet */
  .m-bp-check{position:absolute;top:calc(-1.6 * var(--hbcq-w));top:-1.6cqw;right:calc(-1.6 * var(--hbcq-w));right:-1.6cqw;width:calc(5 * var(--hbcq-w));width:5cqw;height:calc(5 * var(--hbcq-w));height:5cqw;border-radius:50%;background:#3fbf4a;box-shadow:0 0 0 calc(.45 * var(--hbcq-w)) #fff;box-shadow:0 0 0 .45cqw #fff}
  .m-bp-check::after{content:'\2713';position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;
    color:#fff;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;font-style:normal}
  .m-bp-tap{text-align:center;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#cfd7f2}
  @media (prefers-reduced-motion:reduce){.m-bp-tile.claimable{animation:none}}
  /* 2026-11-13: the piece he needs (its own picture) and the Holy Revive */
  /* AN ITEM WEARS ITS RARITY (2026-11-15 — the gold read as legendary on a common piece): the pack tiles' colours */
  .m-bp-tile.k-item,.m-bp-infopic.k-item{background:linear-gradient(180deg,#b9c2cf,#7d8796)}
  .m-bp-tile.k-item.r-rare,.m-bp-infopic.k-item.r-rare,.m-bp-tile.k-chest.r-rare,.m-bp-infopic.k-chest.r-rare{background:linear-gradient(180deg,#72b9ff,#2f6fe0)}
  .m-bp-tile.k-item.r-epic,.m-bp-infopic.k-item.r-epic,.m-bp-tile.k-chest.r-epic,.m-bp-infopic.k-chest.r-epic{background:linear-gradient(180deg,#c98eff,#7a3fe0)}
  .m-bp-tile.k-item.r-legendary,.m-bp-infopic.k-item.r-legendary,.m-bp-tile.k-chest.r-legendary,.m-bp-infopic.k-chest.r-legendary{background:linear-gradient(180deg,#ffe07a,#f3a41b)}
  .m-bp-tile.k-holy{background:#f2d36b}
  /* GET THE PASS (Roman, 2026-11-13: "a popup with two options — 250 crystals or the store's price") — IN OUR POPUP FRAME (Roman,
     the same day: "why is the popup gold like that? we have a fixed frame for popups in the game"): the stash's big frame with the
     leaves and the gem (js/game-popup.js .gp-frame), the gold Cinzel title, the close.webp corner, the green leaf pill for the
     buttons (tab_on + tab_leaves), the plain slate pill for a way that is not open (performance_not_selected). */
  .m-bp-buy{display:none;position:absolute;top:0;right:0;bottom:0;left:0;z-index:6;align-items:center;justify-content:center;
    background:rgba(8,5,18,.72);font-family:'Lilita One',sans-serif;font-weight:400}
  .m-bp-buy.open{display:flex}
  .m-bp-buycard{position:relative;width:calc(86 * var(--hbcq-w));width:86cqw;padding:calc(9 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) calc(8.4 * var(--hbcq-w));padding:9cqw 8cqw 8.4cqw;display:flex;flex-direction:column;align-items:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;
    text-align:center;background:url('heropopup/stash/big_frame.webp') center/100% 100% no-repeat;filter:drop-shadow(0 calc(1.4 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w)) #000c);filter:drop-shadow(0 1.4cqw 2.4cqw #000c)}
  .m-bp-buyx{position:absolute;top:calc(-2.4 * var(--hbcq-w));top:-2.4cqw;right:calc(-2 * var(--hbcq-w));right:-2cqw;width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw;padding:0;border:none;cursor:pointer;z-index:2;
    background:url('heropopup/close.webp') center/contain no-repeat}
  .m-bp-buytitle{font-family:'Cinzel',serif;font-weight:900;letter-spacing:.05em;text-transform:uppercase;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;line-height:1.1;
    color:#f0d78f;text-shadow:0 2px 4px #000b,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a33;text-shadow:0 2px 4px #000b,0 0 1.2cqw #ffd98a33}
  .m-bp-buytitle::after{content:'';display:block;height:1px;margin:calc(1.6 * var(--hbcq-w)) auto 0;margin:1.6cqw auto 0;width:60%;
    background:linear-gradient(90deg,transparent,#d3ac5e 22%,#d3ac5e 78%,transparent)}
  .m-bp-buytext{font-size:calc(3.5 * var(--hbcq-w));font-size:3.5cqw;line-height:1.2;color:#f0e4c0;max-width:calc(66 * var(--hbcq-w));max-width:66cqw}
  /* the pass's clock (2026-11-22): the banner's gold clock face beside it, red in its last 24 hours */
  .m-bp-buyends{display:flex;align-items:center;justify-content:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;padding:calc(1.2 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:1.2cqw 3cqw;border-radius:calc(99 * var(--hbcq-w));border-radius:99cqw;
    background:#0007;max-width:calc(70 * var(--hbcq-w));max-width:70cqw}
  .m-bp-buyends span{font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;line-height:1.15;color:#f0e4c0}
  .m-bp-buyends b{font-weight:400;color:#ffd34d;white-space:nowrap}
  .m-bp-buyends i{flex:none;width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw;border-radius:50%;box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #ffd34d;box-shadow:inset 0 0 0 .5cqw #ffd34d;position:relative}
  .m-bp-buyends i::after{content:'';position:absolute;left:50%;top:22%;width:calc(.5 * var(--hbcq-w));width:.5cqw;height:32%;background:#ffd34d;transform:translateX(-50%)}
  .m-bp-buyends.soon b{color:#ff6b5a} .m-bp-buyends.soon i{box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #ff6b5a;box-shadow:inset 0 0 0 .5cqw #ff6b5a} .m-bp-buyends.soon i::after{background:#ff6b5a}
  .m-bp-buyopts{display:flex;gap:calc(4 * var(--hbcq-w));gap:4cqw;margin-top:calc(5 * var(--hbcq-w));margin-top:5cqw}
  /* what the pass gives, one line each, in the lanes' own colours (2026-11-13) */
  .m-bp-buylist{display:flex;flex-direction:column;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;width:100%;text-align:left}
  .m-bp-buyli{display:flex;align-items:center;gap:calc(2.2 * var(--hbcq-w));gap:2.2cqw;padding:calc(1.8 * var(--hbcq-w)) calc(2.6 * var(--hbcq-w));padding:1.8cqw 2.6cqw;border-radius:calc(2.2 * var(--hbcq-w));border-radius:2.2cqw;font-size:calc(3.7 * var(--hbcq-w));font-size:3.7cqw;line-height:1.15}
  .m-bp-buyli.free{background:#93b453} .m-bp-buyli.prem{background:#3c5616} .m-bp-buyli.heroic{background:#c98a14}
  .m-bp-buyli i{flex:none;width:calc(5.6 * var(--hbcq-w));width:5.6cqw;height:calc(5.6 * var(--hbcq-w));height:5.6cqw;border-radius:50%;background:#fff;color:#2c3a0c;display:flex;align-items:center;
    justify-content:center;font-style:normal;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;text-shadow:none}
  /* the buttons: the green leaf pill (our main button), the slate pill while the store's way is not open */
  .m-bp-buyopt,.m-bp-infosee{position:relative;flex:none;width:calc(31 * var(--hbcq-w));width:31cqw;aspect-ratio:440/150;display:flex;align-items:center;justify-content:center;
    gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;border:none;padding:0;cursor:pointer;font-family:inherit;font-weight:400;color:#fff8dc;
    background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  .m-bp-buyopt::before,.m-bp-infosee::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;
    transform:translateX(-50%);pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-bp-buyopt b{font-weight:400;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;line-height:1}
  .m-bp-buyopt img{width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;object-fit:contain}
  .m-bp-buyopt.usd.off{background-image:url('heropopup/settings/performance_not_selected.webp');color:#e8dcc0}
  .m-bp-buyopt.usd.off::before{display:none}
  .m-bp-buyopt:active,.m-bp-infosee:active{transform:scale(.96)}
  .m-bp-buyopt[disabled]{opacity:.6;cursor:default}
  /* EVERY TILE SAYS WHAT IT IS (Roman, 2026-11-13): a caption under an egg / stones (the element), the Holy Revive (its name),
     an item (its slot) — and every tile opens a card when tapped (bpTileInfo). */
  .m-bp-tile{cursor:pointer}
  .m-bp-tile .m-bp-cap{position:absolute;left:50%;bottom:calc(-2.9 * var(--hbcq-w));bottom:-2.9cqw;transform:translateX(-50%);white-space:nowrap;font-style:normal;
    font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;line-height:1;z-index:2;pointer-events:none}
  .m-bp-tile.capped span{bottom:calc(.2 * var(--hbcq-w));bottom:.2cqw}
  /* AN ITEM'S CAPTION IS ITS FULL NAME (Roman, 2026-11-14): up to two smaller lines, centred under the tile — the name stays
     whole ("A WORD STAYS IN ITS BUTTON": a smaller font, not a shorter word). */
  .m-bp-tile .m-bp-cap.nm{white-space:normal;width:calc(24 * var(--hbcq-w));width:24cqw;text-align:center;line-height:1.15;
    bottom:auto;top:100%;margin-top:calc(.15 * var(--hbcq-w));margin-top:.15cqw;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .m-bp-row{min-height:calc(19.4 * var(--hbcq-w));min-height:19.4cqw}
  .m-bp-info{gap:calc(2 * var(--hbcq-w));gap:2cqw}
  .m-bp-infopic{width:calc(26 * var(--hbcq-w));width:26cqw;height:calc(26 * var(--hbcq-w));height:26cqw;border-radius:calc(4 * var(--hbcq-w));border-radius:4cqw;display:flex;align-items:center;justify-content:center;background:#3f6fd8;
    box-shadow:inset 0 0 0 calc(.7 * var(--hbcq-w)) rgba(255,255,255,.35),0 calc(.7 * var(--hbcq-w)) 0 rgba(0,0,0,.35);box-shadow:inset 0 0 0 .7cqw rgba(255,255,255,.35),0 .7cqw 0 rgba(0,0,0,.35)}
  .m-bp-infopic img{width:80%;height:80%;object-fit:contain}
  .m-bp-infopic.k-gold{background:#e8a12a} .m-bp-infopic.k-hp{background:#2f9a6a}
  .m-bp-infopic.k-sword,.m-bp-infopic.k-bow,.m-bp-infopic.k-wand{background:#d64a3f}
  .m-bp-infopic.k-egg,.m-bp-infopic.k-stones{background:#9050d8}
  .m-bp-infopic.k-holy{background:#f2d36b}
  .m-bp-infosub{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#ffd34d;margin-top:calc(-1 * var(--hbcq-w));margin-top:-1cqw}
  .m-bp-infost{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;color:#9fb0e8}
  .m-bp-infosee{width:calc(40 * var(--hbcq-w));width:40cqw;margin-top:calc(4 * var(--hbcq-w));margin-top:4cqw;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw}

  /* ═══════ THE MAILBOX (2026-09-29) — redesign/mail/letter.webp, 720x1098 ═══════
     The art IS the window. Regions are measured off the art in percent of the box: the wooden plank
     (title) 26-74% x 4-13% y; the parchment between the envelope's flaps (paragraphs) 15-85% x
     16-57% y; the gift sits where the parchment still shows between the flaps (58-66% y), CLAIM on the
     envelope's front under its leaf seal. Height-driven so a landscape phone never crops it. */
  /* THE WHOLE HEIGHT (Roman, 2026-09-29: "bigger — over all the space we have from bottom to top"): the
     overlay's padding is cut to 5px for this window and the letter takes the rest. */
  #mail-modal{padding:5px}
  .m-mail-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;height:calc(100vh - 10px);aspect-ratio:720/1098;
    background:url('mail/letter.webp') center/100% 100% no-repeat}   /* no drop-shadow: its paragraphs scroll, and a filter would redraw on every scroll frame (the 2026-09-29 performance pass) */
  .m-mail-close{position:absolute;top:1%;right:1%;width:calc(13 * var(--hbcq-w));width:13cqw;aspect-ratio:1;z-index:4;padding:0;border:none;
    background:url('heropopup/close.webp') center/contain no-repeat;font-size:0;cursor:pointer}
  .m-mail-close:hover{filter:brightness(1.12)}
  /* The speaker (mail.js toggleMailVoice): top-left, the X's mirror. Lit while Joe reads; pulses when the
     WebView wants a tap before it may start the sound (a letter opened over a running fight). */
  .m-mail-voice{position:absolute;top:2.2%;left:3%;width:calc(10 * var(--hbcq-w));width:10cqw;aspect-ratio:1;z-index:4;padding:0;cursor:pointer;
    border-radius:50%;border:calc(.6 * var(--hbcq-w)) solid #c9a24a;border:.6cqw solid #c9a24a;background:#3a2412 center/62% no-repeat
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffe6a8'><path d='M3 9v6h4l5 4V5L7 9H3z'/><path d='M15.5 8.5a5 5 0 0 1 0 7' stroke='%23ffe6a8' stroke-width='2' fill='none' stroke-linecap='round'/><path d='M18 6a8.5 8.5 0 0 1 0 12' stroke='%23ffe6a8' stroke-width='2' fill='none' stroke-linecap='round'/></svg>")}
  .m-mail-voice.on{border-color:#ffe08a;background-color:#5a3a12}
  .m-mail-voice.ask{animation:mMailAsk 1.2s ease-in-out infinite}
  @keyframes mMailAsk{0%,100%{transform:scale(1)}50%{transform:scale(1.14)}}
  .m-mail-title{position:absolute;left:27%;right:27%;top:4.2%;height:8.4%;display:flex;align-items:center;justify-content:center;
    text-align:center;font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;line-height:1.05;color:#fff0c8;
    text-shadow:0 2px 3px #000c;letter-spacing:.02em;overflow:hidden}
  .m-mail-body{position:absolute;left:15%;right:15%;top:16%;bottom:43%;overflow-y:auto;overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;color:#3a2814;font-family:Georgia,'Times New Roman',serif;font-size:calc(4.1 * var(--hbcq-w));font-size:4.1cqw;
    line-height:1.38;text-align:left}
  .m-mail-body p{margin:0 0 .8em}
  .m-mail-body .m-mail-link{margin-top:-.4em}
  .m-mail-body .m-mail-link a{color:#1b5fae;font-weight:700;text-decoration:underline;word-break:break-word}
  .m-mail-foot{position:absolute;left:0;right:0;top:57.5%;bottom:3%;display:flex;flex-direction:column;align-items:center}
  .m-mail-gift{display:flex;gap:calc(4 * var(--hbcq-w));gap:4cqw;align-items:center;justify-content:center;height:calc(8 * var(--hbcq-h));height:8cqh;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(6.2 * var(--hbcq-w));font-size:6.2cqw;color:#5a3a12;text-shadow:0 1px 0 #fff8}
  .m-mail-gift-i{display:inline-flex;align-items:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw}
  .m-mail-gift-i img{width:calc(8 * var(--hbcq-w));width:8cqw;height:calc(8 * var(--hbcq-w));height:8cqw;object-fit:contain}
  /* the letter's egg before CLAIM: a dark egg with a gold "?" — its colour is the surprise */
  .m-mail-egg i{position:relative;display:inline-block;width:calc(8 * var(--hbcq-w));width:8cqw;height:calc(8 * var(--hbcq-w));height:8cqw}
  .m-mail-egg i img{filter:saturate(0) brightness(.35)}
  .m-mail-egg i b{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);text-align:center;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;
    color:#ffd75a;text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #000;text-shadow:0 .2cqw .4cqw #000}
  .m-mail-got{margin-top:calc(6 * var(--hbcq-h));margin-top:6cqh;color:#ffe08a;text-shadow:0 2px 4px #000c;font-size:calc(8 * var(--hbcq-w));font-size:8cqw}
  .m-mail-note{max-width:70%;margin-top:calc(.5 * var(--hbcq-h));margin-top:.5cqh;text-align:center;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1.3;color:#7a1d10;font-weight:700}
  /* RIGHT UNDER THE GIFT (Roman, 2026-09-29: "the CLAIM button should be right under the 1000 GOLD, right
     there next to it") — it sat at the envelope's bottom edge, a hand's width away from what it claims. */
  .m-mail-claim{margin-top:calc(.8 * var(--hbcq-h));margin-top:.8cqh;width:46%;aspect-ratio:723/202;border:none;padding:0;cursor:pointer;
    background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;font-family:'Cinzel',serif;font-weight:900;
    letter-spacing:.06em;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;color:#3a1c08;text-transform:uppercase;display:flex;align-items:center;justify-content:center}
  .m-mail-claim:disabled{opacity:.5;cursor:default;filter:grayscale(.5)}
  .m-mail-claim:not(:disabled):hover{filter:brightness(1.1)}
  /* Shop's own frame (heropopup/shop/shop_frame.webp) -- the tall wood-bannered card, not the
     wide house frame.webp every other popup uses. Sizing recomputed for its real 1180/1402 ratio
     (was 1525/856) so the leaf/banner art is never stretched; width-driven like before since the
     shape is now portrait instead of landscape. */
  /* HEIGHT-driven, not width-driven -- this is a PORTRAIT box (1180/1402) now, so an unbounded
     width-first formula (the old wide-frame math) has no cap on the height it derives and runs off
     a landscape phone's short viewport top-and-bottom. Same shape of formula .m-store-land already
     uses successfully on this exact frame art, just a smaller vh cap since this popup's content is
     four short rows, not a scrolling catalog. */
  .m-settings-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    height:min(900px,94vh,calc(64vw*1402/1180));aspect-ratio:1180/1402;
    max-width:none;max-height:none;width:auto;min-height:0;display:flex;flex-direction:column;
    padding:0;overflow:visible;text-align:center;
    background:url('heropopup/shop/shop_frame.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:0 26px 80px #000d}
  /* Same corner placement as the Store's own close button on this same frame art (.m-store-close),
     nested into the frame's top-right corner instead of floating above it. */
  .m-settings-land .m-settings-close{position:absolute;top:calc(-.4 * var(--hbcq-h));top:-.4cqh;right:calc(.4 * var(--hbcq-w));right:.4cqw;width:calc(10.6 * var(--hbcq-w));width:10.6cqw;
    height:auto;aspect-ratio:1;z-index:4;padding:0;border:none;border-radius:0;box-shadow:none;
    font-size:0;cursor:pointer;background:url('heropopup/close.webp') center/contain no-repeat}
  .m-settings-land .m-settings-close:hover{filter:brightness(1.12)}
  .m-settings-land .m-settings-title{position:static;flex:none;z-index:2;font-family:'Cinzel',serif;
    font-weight:900;letter-spacing:.05em;font-size:calc(4.0 * var(--hbcq-w));font-size:4.0cqw;color:#f0d78f;text-transform:uppercase;
    padding:calc(3.4 * var(--hbcq-h)) calc(8 * var(--hbcq-w)) 0;padding:3.4cqh 8cqw 0;text-shadow:0 2px 4px #000b,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a33;text-shadow:0 2px 4px #000b,0 0 1.2cqw #ffd98a33}
  /* margin (not just padding) on top+bottom -- padding alone moves the CONTENT in from the edges,
     but the scrollable box itself (and therefore where overflow actually clips) still ran flush to
     the frame's own top/bottom border, so a scroll cut right at the frame's bottom edge with no
     breathing room. Margin shrinks the box itself, pulling the clip boundary in from both edges. */
  /* justify-content:flex-start, not center -- centering an overflowing flex column pushes part of
     its content ABOVE the visible top, and scrollTop can never go negative, so that pushed-up part
     (padding-top included) was unreachable. That's why padding-top had climbed to 19cqh and the
     first row still sat under the title: most of that padding was being centered away, not shown.
     flex-start makes padding-top behave like padding-top; reset to a sane value now that it isn't
     fighting the centering bug. */
  .m-settings-build{flex:none;text-align:center;font-family:monospace;font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;color:rgba(255,255,255,.75);
    letter-spacing:.06em;padding:calc(1.4 * var(--hbcq-h)) 0 calc(.6 * var(--hbcq-h));padding:1.4cqh 0 .6cqh;text-shadow:0 1px 2px rgba(0,0,0,.8);user-select:text}
  .m-settings-build.down{color:rgba(255,190,150,.85)}
  .m-settings-land .m-settings-content{position:static;flex:1;min-height:0;display:flex;
    flex-direction:column;align-items:center;justify-content:flex-start;gap:calc(1.6 * var(--hbcq-h));gap:1.6cqh;
    margin:calc(3.5 * var(--hbcq-h)) 0 calc(2.5 * var(--hbcq-h));margin:3.5cqh 0 2.5cqh;padding:calc(3 * var(--hbcq-h)) calc(3 * var(--hbcq-w)) calc(6 * var(--hbcq-h));padding:3cqh 3cqw 6cqh;overflow-y:auto;
    /* No scroll anchoring: the in-game variant inserts a row at the TOP after layout, and anchoring
       would answer by scrolling down to keep the old first row in place -- the panel then opens in
       the middle. openSettingsMenu resets scrollTop on open; this stops later reflows undoing it. */
    overflow-anchor:none}
  /* Settings menu row -- button.webp, a dedicated icon-nav bar with its OWN octagon icon well
     baked into the left end (same gold-frame style as the icon medallions) and a chevron baked
     into the right end. Replaced two earlier misses: button_big.webp's corners were a flat JPEG
     with no alpha (solid white triangles instead of transparent), and quest_no_badge.webp has no
     icon well at all, so the icon had to float half-on/half-off its plain left edge. Base class
     stays a plain centered-text bar, because TWO other buttons reuse it with no icon (the Google
     sign-in fallback and the gift-picker's "Take this", both built at runtime in popups.js) --
     giving the icon its own modifier keeps those from inheriting padding sized for a well they
     don't have. */
  /* flex-shrink:0 (2026-10-18): in this scrolling column an OLD engine (Chrome 102 — the S10+'s factory WebView) let the
     row shrink below its aspect-ratio to its text height — rows ~45 px instead of ~105, the icons spilling over the next
     row. A modern engine already keeps the aspect-ratio height as the row's minimum, so there this changes nothing. */
  .m-settings-land .m-settings-item{position:relative;width:94%;aspect-ratio:722/118;flex-shrink:0;
    border:none;padding:0;cursor:pointer;
    background:url('heropopup/settings/button.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:800;letter-spacing:.04em;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;
    color:#f0d78f;text-shadow:0 2px 3px #000b}
  .m-settings-land .m-settings-item:hover{filter:brightness(1.15)}
  .m-settings-land .m-settings-item:active{transform:scale(.97)}
  /* Icon variant -- the 4 real settings-menu rows only. Flex + left padding shifts the label clear
     of the bar's own baked-in icon well (measured off the source art: the well's dark socket runs
     roughly 0-16.6% of the bar's width). */
  .m-settings-land .m-settings-item-withicon{display:flex;align-items:center;justify-content:flex-start;
    padding:0 8% 0 19%}
  /* Sized to fill the bar's own icon well rather than straddle an edge -- the medallion's own gold
     octagon frame lands on top of the well's frame instead of floating beside a plain bar. */
  .m-settings-icon{position:absolute;left:2%;top:50%;transform:translateY(-50%);
    width:14%;height:auto;aspect-ratio:1;object-fit:contain;pointer-events:none;
    filter:drop-shadow(0 2px 4px #000a)}
  /* Settings -> Story (2026-09-28): one card per story video — the frame from the video, a play mark,
     its title; a locked one greyed with the reason under it. Built on open, removed on close (popups.js). */
  .m-story-list{gap:calc(2.4 * var(--hbcq-h));gap:2.4cqh}
  .m-story-card{width:88%;display:flex;flex-direction:column;align-items:center;gap:calc(1 * var(--hbcq-h));gap:1cqh;padding:0;border:none;
    background:none;cursor:pointer;font-family:'Cinzel',serif;color:#f0d78f;text-shadow:0 2px 3px #000b}
  .m-story-card:active{transform:scale(.98)}
  .m-story-thumb{position:relative;width:100%;aspect-ratio:16/9;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;overflow:hidden;
    border:calc(.5 * var(--hbcq-w)) solid #c9a45a;border:.5cqw solid #c9a45a;box-shadow:0 calc(1 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) #000a;box-shadow:0 1cqw 3cqw #000a}
  .m-story-thumb img{width:100%;height:100%;object-fit:cover;display:block}
  .m-story-play{position:absolute;left:50%;top:50%;width:calc(14 * var(--hbcq-w));width:14cqw;height:calc(14 * var(--hbcq-w));height:14cqw;transform:translate(-50%,-50%);
    border-radius:50%;background:#000a;border:calc(.5 * var(--hbcq-w)) solid #f0d78f;border:.5cqw solid #f0d78f}
  .m-story-play:after{content:'';position:absolute;left:38%;top:26%;border-style:solid;border-color:transparent;
    border-width:calc(3.6 * var(--hbcq-w)) 0 calc(3.6 * var(--hbcq-w)) calc(5.6 * var(--hbcq-w));border-width:3.6cqw 0 3.6cqw 5.6cqw;border-left-color:#f0d78f}
  .m-story-lock{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:0;width:calc(12 * var(--hbcq-w));width:12cqw;height:calc(12 * var(--hbcq-w));height:12cqw;
    background:url('lock_navy.webp') center/contain no-repeat;filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}   /* the theme lock (2026-11-14) */
  .m-story-card.locked{cursor:default}
  .m-story-card.locked .m-story-thumb img{filter:grayscale(1) brightness(.45)}
  .m-story-name{font-weight:800;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;letter-spacing:.03em}
  .m-story-why{font-family:inherit;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;color:#c0a0f0}
  /* Settings -> Guide (2026-11-20, Roman's second shape): Settings' tall frame (portrait.css #guide-modal). The LIST — "Game
     Guides", a line, a row per topic like Settings' — and a TOPIC: ← back, its name, a round play button (Roman's video), its
     explanation, its tabs (one per kind) and the chosen tab's card: his picture (16:9, gold frame), its name, its text, a TIP.
     Until his picture is in the bundle a card shows the game's own art, smaller (.m-guide-ph — never a bare `.ph`: lobby.html's
     own .ph is an absolutely placed button). Readable text is the Battle Pass's Lilita One — Cinzel has capitals only. */
  .m-guide-list{gap:calc(1.4 * var(--hbcq-h));gap:1.4cqh;padding-bottom:calc(2.5 * var(--hbcq-h));padding-bottom:2.5cqh}
  .m-guide-hero{width:92%;text-align:center}
  .m-guide-h1{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;letter-spacing:.05em;color:#f0d78f;text-shadow:0 2px 3px #000b}
  .m-guide-hero p{margin:calc(.6 * var(--hbcq-h)) 0 0;margin:.6cqh 0 0;font-family:'Lilita One',sans-serif;font-weight:400;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1.3;color:#e8dcbc;
    text-shadow:0 1px 2px #000c}
  .m-guide-row .m-settings-icon{object-fit:contain}
  .m-guide-topic{width:92%;display:flex;flex-direction:column;align-items:stretch;gap:calc(1.1 * var(--hbcq-h));gap:1.1cqh}
  .m-guide-headrow{position:relative;display:flex;align-items:center;justify-content:center;min-height:calc(9 * var(--hbcq-w));min-height:9cqw}
  .m-guide-head{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.4 * var(--hbcq-w));font-size:4.4cqw;text-align:center;letter-spacing:.05em;color:#f0d78f;
    text-shadow:0 2px 3px #000b;padding:0 calc(10 * var(--hbcq-w));padding:0 10cqw}
  .m-guide-back,.m-guide-vbtn{position:absolute;top:50%;transform:translateY(-50%);width:calc(9 * var(--hbcq-w));width:9cqw;height:calc(9 * var(--hbcq-w));height:9cqw;border-radius:50%;padding:0;
    cursor:pointer;border:calc(.5 * var(--hbcq-w)) solid #c9a45a;border:.5cqw solid #c9a45a;background:radial-gradient(circle at 40% 35%,#4a3614,#1b1530 72%);box-shadow:0 calc(.6 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w)) #000a;box-shadow:0 .6cqw 1.6cqw #000a}
  .m-guide-back{left:0}
  .m-guide-vbtn{right:0}
  .m-guide-back:active,.m-guide-vbtn:active{transform:translateY(-50%) scale(.92)}
  .m-guide-back::before{content:'';position:absolute;left:38%;top:50%;width:calc(2.6 * var(--hbcq-w));width:2.6cqw;height:calc(2.6 * var(--hbcq-w));height:2.6cqw;border-left:calc(.9 * var(--hbcq-w)) solid #f0d78f;border-left:.9cqw solid #f0d78f;
    border-bottom:calc(.9 * var(--hbcq-w)) solid #f0d78f;border-bottom:.9cqw solid #f0d78f;transform:translate(-20%,-50%) rotate(45deg)}
  .m-guide-vtri{position:absolute;left:40%;top:50%;transform:translateY(-50%);width:0;height:0;border-left:calc(3 * var(--hbcq-w)) solid #f0d78f;border-left:3cqw solid #f0d78f;
    border-top:calc(1.8 * var(--hbcq-w)) solid transparent;border-top:1.8cqw solid transparent;border-bottom:calc(1.8 * var(--hbcq-w)) solid transparent;border-bottom:1.8cqw solid transparent}
  .m-guide-note{text-align:center;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#c0a0f0;text-shadow:0 1px 2px #000c}
  .m-guide-note:empty{display:none}
  .m-guide-topic>p,.m-guide-card-x p{margin:0;font-family:'Lilita One',sans-serif;font-weight:400;letter-spacing:.02em;
    font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1.3;color:#f3ead2;text-shadow:0 1px 2px #000c}
  .m-guide-topic>p{text-align:center;color:#e8dcbc}
  .m-guide-card-x p{text-align:left}
  .m-guide-card-x p+p{margin-top:calc(.6 * var(--hbcq-h));margin-top:.6cqh}
  .m-guide-card-x p b{color:#f0d78f;font-weight:400}
  .m-guide-card-x p.m-guide-tip{margin-top:calc(.9 * var(--hbcq-h));margin-top:.9cqh;padding:calc(.8 * var(--hbcq-h)) calc(2.4 * var(--hbcq-w));padding:.8cqh 2.4cqw;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;background:#f0d78f1f;border-left:calc(.7 * var(--hbcq-w)) solid #f0d78f;border-left:.7cqw solid #f0d78f}
  .m-guide-sect{margin-top:calc(.8 * var(--hbcq-h));margin-top:.8cqh;font-family:'Cinzel',serif;font-weight:800;font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;letter-spacing:.04em;color:#f0d78f;
    text-align:center;text-shadow:0 2px 3px #000b;border-top:calc(.3 * var(--hbcq-w)) solid #c9a45a55;border-top:.3cqw solid #c9a45a55;padding-top:calc(1 * var(--hbcq-h));padding-top:1cqh}
  .m-guide-tabs{display:flex;justify-content:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw}
  .m-guide-tab{flex:1 1 0;max-width:calc(12 * var(--hbcq-w));max-width:12cqw;aspect-ratio:1;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;padding:0;cursor:pointer;display:flex;align-items:center;
    justify-content:center;border:calc(.4 * var(--hbcq-w)) solid #7d6430;border:.4cqw solid #7d6430;background:#1b1530;opacity:.72;transition:opacity .15s,box-shadow .15s}
  .m-guide-tab.on{opacity:1;border-color:#f0d78f;background:#3a2c12;box-shadow:0 0 calc(1.8 * var(--hbcq-w)) #f0d78f99;box-shadow:0 0 1.8cqw #f0d78f99}
  .m-guide-tab:active{transform:scale(.94)}
  .m-guide-tab img{width:80%;height:80%;object-fit:contain;pointer-events:none}
  /* TWO AXES = AN AXE ON AN AXE (Roman, 2026-11-20: "the axes picture is not good — an axe on an axe"): the second lies over the
     first, a step down and to the right. */
  .m-guide-pair{position:relative;width:90%;height:90%;display:block;pointer-events:none}
  .m-guide-pair img{position:absolute;width:72%;height:72%;object-fit:contain}
  .m-guide-pair img:first-child{left:0;top:0}
  .m-guide-pair img:last-child{right:0;bottom:0;filter:drop-shadow(calc(-.4 * var(--hbcq-w)) calc(-.2 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #000b);filter:drop-shadow(-.4cqw -.2cqw .4cqw #000b)}
  .m-guide-card{display:none;flex-direction:column;gap:calc(.9 * var(--hbcq-h));gap:.9cqh}
  .m-guide-card.on{display:flex}
  .m-guide-pic{display:flex;justify-content:center}
  .m-guide-frame{width:88%;aspect-ratio:16/9;box-sizing:border-box;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;overflow:hidden;
    border:calc(.5 * var(--hbcq-w)) solid #c9a45a;border:.5cqw solid #c9a45a;box-shadow:0 calc(1 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) #000a;box-shadow:0 1cqw 3cqw #000a;background:#1b1530}
  .m-guide-frame img{width:100%;height:100%;object-fit:cover;display:block}
  .m-guide-frame.m-guide-ph img{object-fit:contain;padding:9%;box-sizing:border-box}
  .m-guide-card-t{font-family:'Cinzel',serif;font-weight:800;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;color:#f0d78f;text-align:center;letter-spacing:.03em;
    text-shadow:0 2px 3px #000b}
  /* RARITY under the weapon types (not a tab): the four chests, each named in its rarity's colour. */
  .m-guide-chests{display:flex;justify-content:space-between;gap:calc(1.5 * var(--hbcq-w));gap:1.5cqw}
  .m-guide-chest{flex:1 1 0;margin:0;display:flex;flex-direction:column;align-items:center;gap:calc(.4 * var(--hbcq-h));gap:.4cqh}
  .m-guide-chest img{width:100%;aspect-ratio:1;object-fit:contain}
  .m-guide-chest figcaption{font-family:'Lilita One',sans-serif;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;text-shadow:0 1px 2px #000c;color:#e8e8e8}
  .m-guide-chest.r-rare figcaption{color:#72b9ff}
  .m-guide-chest.r-epic figcaption{color:#c98eff}
  .m-guide-chest.r-legendary figcaption{color:#ffd35a}
  /* THE RARITY TABLE (2026-11-25): a row per bonus, a column per rarity, each column in its rarity's colour. */
  .m-guide-rr{width:100%;border-collapse:collapse;margin:calc(.6 * var(--hbcq-h)) 0;margin:.6cqh 0;font-family:'Lilita One',sans-serif;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;
    color:#f3ead2;text-shadow:0 1px 2px #000c}
  .m-guide-rr th{font-weight:400;padding:calc(.3 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:.3cqh 1cqw;text-align:center}
  .m-guide-rr td{padding:calc(.5 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:.5cqh 1cqw;text-align:center;white-space:nowrap;border-top:calc(.2 * var(--hbcq-w)) solid #c9a45a33;border-top:.2cqw solid #c9a45a33}
  .m-guide-rr td:first-child{text-align:left;white-space:normal;color:#e8dcbc}
  .m-guide-rr .r-rare{color:#72b9ff}
  .m-guide-rr .r-epic{color:#c98eff}
  .m-guide-rr .r-legendary{color:#ffd35a}

  /* ═══ THE UPGRADE WINDOW (Roman, 2026-11-25 — hero-main.js _openUpgrade) ═══ The THEME RULES' window: shop_frame, the gold Cinzel
     title centred on its plank, the close leaf. ONE unit, --u = 1% of the window's column: upright the column (var(--pt-col)),
     sideways a share of the screen's height so the frame keeps its shape. No cq units (an old WebView drops them). */
  .m-upg-ov{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9020;display:flex;align-items:center;justify-content:center;
    background:rgba(8,4,20,.78);--u:min(1vw,.62vh)}
  html.hb-portrait-peek .m-upg-ov{--u:calc(var(--pt-col) / 100)}
  .m-upg{position:relative;isolation:isolate;box-sizing:border-box;width:calc(var(--u) * 88);
    padding:calc(var(--u) * 15) calc(var(--u) * 8) calc(var(--u) * 11);display:flex;flex-direction:column;align-items:center;
    gap:calc(var(--u) * 1.6);color:#f3ead2;font-family:'Lilita One',sans-serif;text-shadow:0 1px 2px #000c}
  .m-upg::before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;border-style:solid;
    border-width:calc(var(--u) * 13.25) calc(var(--u) * 4.1) calc(var(--u) * 11.3) calc(var(--u) * 4.1);
    border-image:url('heropopup/shop/shop_frame.webp') 170 50 145 50 fill stretch}
  .m-upg-x{position:absolute;top:calc(var(--u) * -0.6);right:calc(var(--u) * -0.6);width:calc(var(--u) * 10.5);aspect-ratio:120/136;
    border:none;padding:0;cursor:pointer;background:url('heropopup/close_leaf.webp') center/100% 100% no-repeat}
  .m-upg-title{position:absolute;left:0;right:0;top:calc(var(--u) * 7.16);transform:translateY(-50%);text-align:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--u) * 4.4);letter-spacing:.05em;color:#f0d78f;text-shadow:0 2px 3px #000b}
  .m-upg-name{font-family:'Cinzel',serif;font-weight:800;font-size:calc(var(--u) * 3.9);color:#f0d78f;text-align:center}
  .m-upg-row{display:flex;align-items:center;justify-content:center;gap:calc(var(--u) * 1.2);width:100%}
  .m-upg-row em{font-style:normal;font-size:calc(var(--u) * 4.6);color:#f0d78f}
  .m-upg-row em.arr{width:calc(var(--u) * 5);height:calc(var(--u) * 4);margin:0 calc(var(--u) * .6);
    background:#f0d78f;clip-path:polygon(0 30%,55% 30%,55% 0,100% 50%,55% 100%,55% 70%,0 70%)}
  .m-upg-tile{position:relative;width:calc(var(--u) * 13);aspect-ratio:1;box-sizing:border-box;border:calc(var(--u) * .6) solid #b8b8b8;
    border-radius:calc(var(--u) * 2);background:radial-gradient(circle at 50% 40%,#2c2350,#14102a 75%);display:flex;align-items:center;justify-content:center}
  .m-upg-tile img{width:82%;height:82%;object-fit:contain}
  .m-upg-tile.out{width:calc(var(--u) * 15)}
  .m-upg-tile.empty{border-style:dashed;border-color:#7d6430;background:#120e24}
  .m-upg-tile.empty span{font-size:calc(var(--u) * 6);color:#7d6430}
  .m-upg-forged{position:absolute;right:-8%;top:-8%;width:32%;aspect-ratio:1;border-radius:50%;background:#e0623a;box-shadow:0 0 0 calc(var(--u) * .4) #1a1230}
  .m-upg-line{font-size:calc(var(--u) * 4);letter-spacing:.02em}
  .m-upg-line b{font-weight:400}
  .m-upg-line .to{color:#f0d78f}
  .m-upg-p,.m-upg-warn{margin:0;text-align:center;font-size:calc(var(--u) * 3.3);line-height:1.3;color:#e8dcbc}
  .m-upg-warn{color:#ff9a7a}
  .m-upg-gives{width:100%;box-sizing:border-box;padding:calc(var(--u) * 1.4) calc(var(--u) * 3);border-radius:calc(var(--u) * 1.8);
    background:#f0d78f1a;border-left:calc(var(--u) * .7) solid #f0d78f;font-size:calc(var(--u) * 3.3)}
  .m-upg-gives .h{color:#f0d78f;margin-bottom:calc(var(--u) * .6)}
  .m-upg-gives .g{color:#9ff0b0}
  .m-upg-cost{display:flex;align-items:center;gap:calc(var(--u) * 1.2);font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--u) * 4.4);color:#f0d060}
  .m-upg-cost img{width:calc(var(--u) * 5.6);height:auto}
  .m-upg-cost.poor{color:#ff8a75}
  .m-upg-cost span{font-family:'Lilita One',sans-serif;font-weight:400;font-size:calc(var(--u) * 3.2)}
  .m-upg-act{display:flex;justify-content:center;width:100%}
  .m-upg-go{width:calc(var(--u) * 46);aspect-ratio:337/89;border:none;cursor:pointer;font-family:'Cinzel',serif;font-weight:800;letter-spacing:.04em;
    font-size:calc(var(--u) * 4);color:#2b1e08;background:url('heropopup/weaponpopup/wepaon_popup_button.webp') center/100% 100% no-repeat}
  .m-upg-go:disabled{filter:grayscale(1) brightness(.6);cursor:default}
  .m-upg-go:not(:disabled):active{transform:scale(.95)}
  /* THREE BUTTONS ON THE ITEM CARD (Equip · Left hand · Upgrade — an axe with its pair in the bag): each a third, a little gap. */
  .m-itemd-land .m-look-actions.n3{gap:1.5%}
  .m-itemd-land .m-look-actions.n3 button{width:32%;font-size:calc(3.2 * var(--hbcq-h));font-size:3.2cqh}
  .m-itemd-land .m-look-actions.n2{gap:2%}
  /* Logout — same bar, red text instead of gold so it reads as destructive without needing a
     separate frame asset */
  .m-settings-land .m-settings-item-danger{color:#ff8a75}
  /* Performance section, injected below the 4 menu rows by _ensurePerfSection (popups.js) -- a
     title matching the other section labels in this kit, and 3 art buttons instead of the old
     flat CSS-gradient pills. */
  /* Shared by every injected settings section's title (Performance, Language) -- was two copies,
     one a real class and one an inline style on the Language div, which is why the same edit had
     to be made twice. One class now; text-transform:uppercase dropped since Language's own text
     (English/Русский/...) must not be forced through it. */
  .m-settings-sec-title{font-family:'Cinzel',serif;font-weight:900;letter-spacing:.05em;color:#f0d78f;
    font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;margin:calc(1.4 * var(--hbcq-h)) 0 calc(1 * var(--hbcq-h));margin:1.4cqh 0 1cqh;text-shadow:0 2px 3px #000b}
  .m-perf-title{text-transform:uppercase}
  .m-perf-row{display:flex;align-items:flex-end;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;width:94%}
  /* SOUND: a switch with its volume slider under it (2026-09-26). Each column is one switch + one slider,
     so the two stay paired whatever the row's width; cq units only, like every panel (the fixed-aspect rule). */
  .m-sound-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:calc(1.2 * var(--hbcq-h));gap:1.2cqh}
  .m-sound-col .m-perf-btn{flex:none;width:100%}
  .m-sound-vol{width:100%;height:calc(4 * var(--hbcq-h));height:4cqh;margin:0;accent-color:#f0c050;cursor:pointer}
  .m-sound-vol:disabled{opacity:.35;cursor:default}
  /* Unselected pill (performance_not_selected.webp, 231x75 native) and the selected one
     (performance_selected.webp, 228x91 -- its own diamond ornament pokes up above the SAME pill
     height, so its native height is taller by exactly the ornament). Explicit cqh heights instead
     of aspect-ratio -- aspect-ratio on a flex item that is ALSO a flex container for its own label
     computed the wrong size here (a nested-flex/aspect-ratio interaction, not a content bug), and a
     fixed height sidesteps it outright; the ~3:1 background stretch this implies is imperceptible
     on a flat-color pill. flex:1 + min-width:0 still divides the row's width evenly across all 3;
     align-items:flex-end on the row keeps every pill's BOTTOM level so only the taller selected
     button's diamond pokes up above the row, matching the source mockup. */
  .m-perf-btn{flex:1;min-width:0;position:relative;height:calc(8.6 * var(--hbcq-h));height:8.6cqh;border:none;padding:0;cursor:pointer;
    background:url('heropopup/settings/performance_not_selected.webp') center/100% 100% no-repeat}
  .m-perf-btn.on{height:calc(10.4 * var(--hbcq-h));height:10.4cqh;background-image:url('heropopup/settings/performance_selected.webp')}
  .m-perf-btn:active{transform:scale(.96)}
  /* Label as its own absolutely-positioned span, not the button's flex content -- percentage
     PADDING on a block always resolves against WIDTH even for padding-top/bottom (a CSS quirk),
     which made text drift off a short, wide button; percentage top/bottom on an absolutely
     positioned element correctly resolves against height, which is what centering here needs.
     top% differs per state because the two pills' native art puts their body in a different
     fraction of the TOTAL image height (91 vs 75 -- the diamond eats the top of the taller one). */
  .m-perf-label{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);text-align:center;
    pointer-events:none;font-family:'Cinzel',serif;font-weight:900;letter-spacing:.03em;font-size:calc(4.1 * var(--hbcq-w));font-size:4.1cqw;
    color:#c8dde8;text-shadow:0 1px 2px #000a}
  .m-perf-btn.on .m-perf-label{top:59%;color:#fff8dc}
  /* LANGUAGE reuses the pill, but it has FIVE options where performance and orientation have three,
     and its labels are words rather than LOW/MED/HIGH. flex:1 divides the row evenly either way, so
     five pills are ~60% the width of three while the text is longer -- "Francais" at the shared
     4.1cqw label size overflows its pill. Only the two things that actually differ are overridden:
     a tighter gap to buy width back, and a label sized for the longest name. Everything else -- the
     art, the selected state, the diamond, the bottom alignment -- is inherited, which is the point. */
  .m-lang-row{gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw}
  .m-lang-row .m-perf-label{font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;letter-spacing:0;
    padding:0 calc(.3 * var(--hbcq-w));padding:0 .3cqw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .m-lang-row .m-lang-btn.long .m-perf-label{font-size:calc(1.85 * var(--hbcq-w));font-size:1.85cqw}   /* "Bahasa Indonesia" whole, not cut (2026-11-17) */
  /* FIFTEEN LANGUAGES SIDEWAYS (2026-11-17): one flex row squeezed 15 pills to a letter each. Three columns of the same pill,
     as upright has two (portrait.css) — the window scrolls, as it already does. */
  html:not(.hb-portrait-peek) #settings-modal .m-lang-row{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:calc(8.6 * var(--hbcq-h));grid-auto-rows:8.6cqh;
    align-items:end;column-gap:calc(2.4 * var(--hbcq-w));column-gap:2.4cqw;row-gap:calc(.9 * var(--hbcq-h));row-gap:.9cqh}
  html:not(.hb-portrait-peek) #settings-modal .m-lang-row .m-perf-btn{width:100%;height:100%}
  html:not(.hb-portrait-peek) #settings-modal .m-lang-row .m-perf-label{font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw}
  html:not(.hb-portrait-peek) #settings-modal .m-lang-row .m-lang-btn.long .m-perf-label{font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw}
  /* Leaderboard variant: left-aligned scrollable list instead of a single centered button */
  .m-settings-land .m-lb-content{align-items:stretch;justify-content:flex-start;gap:calc(.8 * var(--hbcq-h));gap:.8cqh;
    padding:calc(1.4 * var(--hbcq-h)) calc(6 * var(--hbcq-w)) calc(4 * var(--hbcq-h));padding:1.4cqh 6cqw 4cqh}
  /* Coupon-code variant: text input above the Redeem button */
  .m-settings-land .m-promo-content{gap:calc(1.2 * var(--hbcq-h));gap:1.2cqh}
  /* Currency-info variant: icon + description, no separate close button (the X handles that) */
  .m-settings-land .m-currency-content{gap:calc(2 * var(--hbcq-h));gap:2cqh}
  .m-currency-icon{width:calc(20 * var(--hbcq-w));width:20cqw;height:auto;object-fit:contain;filter:drop-shadow(0 3px 8px rgba(0,0,0,0.7))}
  .m-currency-desc{font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;color:#f0e4c0;line-height:1.55;font-family:'Cinzel',serif;padding:0 calc(2 * var(--hbcq-w));padding:0 2cqw}
  .m-promo-input{width:94%;border:1px solid #6b5028;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;
    background:rgba(10,7,20,.6);color:#f0e4c0;font-family:'Cinzel',serif;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;
    font-weight:700;letter-spacing:.08em;text-align:center;text-transform:uppercase;
    padding:calc(1.1 * var(--hbcq-w)) 0;padding:1.1cqw 0;outline:none}
  /* Save-account variant: same frame as .m-promo-input, minus the uppercase transform -- that's
     fine for a redemption CODE but would visually mangle a password while typing it. */
  #m-save-form{display:flex;flex-direction:column;align-items:center;gap:calc(.9 * var(--hbcq-h));gap:.9cqh;width:100%}
  .m-save-or{font-size:calc(1.3 * var(--hbcq-w));font-size:1.3cqw;color:#8a93ad;text-align:center;text-transform:uppercase;letter-spacing:.05em}
  /* The save / log-in switch: a text link, not a second big button (2026-09-30). */
  .m-save-switch{background:none;border:0;padding:calc(.4 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:.4cqh 1cqw;font:inherit;font-size:calc(1.3 * var(--hbcq-w));font-size:1.3cqw;color:#e8c36a;
    text-decoration:underline;cursor:pointer}
  .m-save-input{width:94%;border:1px solid #6b5028;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;
    background:rgba(10,7,20,.6);color:#f0e4c0;font-family:'Cinzel',serif;font-size:calc(2.2 * var(--hbcq-w));font-size:2.2cqw;
    font-weight:700;letter-spacing:.04em;text-align:center;padding:calc(1.1 * var(--hbcq-w)) 0;padding:1.1cqw 0;outline:none}
  .m-promo-input::placeholder{color:#8a7ab0;text-transform:none;letter-spacing:normal}
  .m-promo-input:focus{border-color:#d3ac5e}
  /* 3-way segmented control (e.g. Battle Screen orientation) */
  .orient-seg-btn{flex:1;padding:7px 2px;border:1px solid #4a3878;border-radius:8px;background:#241a3a;
    color:#b8a8d8;font-family:'Cinzel',serif;font-size:11px;font-weight:700;letter-spacing:0.3px;cursor:pointer;transition:0.15s}
  .orient-seg-btn.active{background:linear-gradient(180deg,#7a5cc0,#5a3ea0);color:#fff;border-color:#9a7ce0;
    box-shadow:0 0 8px rgba(150,120,224,0.5)}
  .orient-seg-btn:active{transform:scale(0.96)}

  /* Rank display */
  .m-rank-badge{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:800;color:#f0c030;
    background:linear-gradient(180deg,#2a1e48,#1e1535);border:1px solid #3a2860;
    border-radius:14px;padding:4px 12px 4px 5px}
  .m-rank-icon{font-size:16px}

  /* Leaderboard row list — rendered by loadLeaderboard() inside .m-lb-content */
  .m-sub-empty{text-align:center;color:#c8b890;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;padding:calc(4 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:4cqh 1cqw;
    font-family:'Cinzel',serif;line-height:1.6}
  .m-lb-row{display:flex;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:calc(1 * var(--hbcq-h)) calc(1.2 * var(--hbcq-w));padding:1cqh 1.2cqw;flex-shrink:0;
    background:linear-gradient(180deg,#1e1840,#160f2a);border:1px solid #3a286066;
    border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw}
  .m-lb-row.me{border-color:#c0a0f0;box-shadow:0 0 calc(.8 * var(--hbcq-w)) #a080e044;box-shadow:0 0 .8cqw #a080e044}
  .m-lb-rank{font-family:'Cinzel',serif;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;font-weight:900;
    color:#f0c030;width:calc(3.4 * var(--hbcq-w));width:3.4cqw;text-align:center;flex-shrink:0}
  .m-lb-name{flex:1;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;font-weight:700;color:#d0d4da;text-align:left}
  .m-lb-points{font-family:'Cinzel',serif;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;font-weight:900;color:#c0a0f0;flex-shrink:0}
  /* THE BOARDS (2026-09-30): tabs, a portrait per row, medals for the podium, a tap opens the hero. */
  .m-lb-tabs{display:flex;justify-content:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;margin:calc(1.2 * var(--hbcq-h)) calc(6 * var(--hbcq-w)) 0;margin:1.2cqh 6cqw 0}
  .m-lb-tab{flex:1;max-width:calc(22 * var(--hbcq-w));max-width:22cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;padding:calc(1 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:1cqh 1cqw;
    border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw;border:1px solid #6b5028;background:linear-gradient(180deg,#2a2150,#1a1434);color:#b8a8d8;cursor:pointer}
  .m-lb-tab.active{background:linear-gradient(180deg,#8a6420,#5a3e12);color:#fff2c8;border-color:#e8c36a;box-shadow:0 0 calc(.8 * var(--hbcq-w)) #e8c36a55;box-shadow:0 0 .8cqw #e8c36a55}
  .m-lb-row{cursor:pointer}
  .m-lb-row:active{transform:scale(.99)}
  .m-lb-row.r1{border-color:#e8c36a;background:linear-gradient(180deg,#3a2e12,#1e1640)}
  .m-lb-row.r2{border-color:#c9d2de}
  .m-lb-row.r3{border-color:#c98a4a}
  .m-lb-row.r1 .m-lb-rank{color:#ffd54a}
  .m-lb-row.r2 .m-lb-rank{color:#dfe6ee}
  .m-lb-row.r3 .m-lb-rank{color:#e0a060}
  .m-lb-pic{width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;border-radius:50%;flex-shrink:0;overflow:hidden;
    background:radial-gradient(circle at 50% 35%,#3a2e60,#150f28);border:1px solid #6b5028}
  .m-lb-pic img{width:100%;height:100%;object-fit:cover;object-position:50% 20%;display:block}
  .m-lb-go{color:#8a7aa8;font-size:calc(1.8 * var(--hbcq-w));font-size:1.8cqw;flex-shrink:0;margin-left:calc(.4 * var(--hbcq-w));margin-left:.4cqw}
  .m-lb-me{flex:none;margin:0 calc(6 * var(--hbcq-w)) calc(3.4 * var(--hbcq-h));margin:0 6cqw 3.4cqh}
  .m-lb-me .m-lb-row{border-color:#e8c36a;background:linear-gradient(180deg,#5a4214,#2a1e44);cursor:default}
  /* PODIUM + LIST (2026-09-30, Skull Hero's leaderboard). The frame is portrait (1180x1402), so theirs fits:
     the podium on top, the list under it. */
  .m-lb-body{flex:1;min-height:0;display:flex;flex-direction:column}
  .m-lb-podium{flex:none;display:flex;justify-content:center;margin-top:calc(1.6 * var(--hbcq-h));margin-top:1.6cqh}
  /* 2026-10-01 (Roman: "everything bigger; the podium as pictures, apart; tabs in our theme"): three columns
     with clear gaps, bottom-aligned, so the pedestals' different widths make the 1-2-3 steps. A hero's feet sit
     on the pedestal's top slab (the slab is the top ~22% of the art, hence the negative margin). */
  .m-lb-stage{display:flex;align-items:flex-end;justify-content:center;gap:calc(5 * var(--hbcq-w));gap:5cqw;height:calc(43 * var(--hbcq-h));height:43cqh}
  .m-lb-col{--pw:22cqw;position:relative;display:flex;flex-direction:column;align-items:center;cursor:pointer}@supports not (width:1cqw){.m-lb-col{--pw:calc(22 * var(--hbcq-w))}}
  .m-lb-col.c2{--pw:19cqw}@supports not (width:1cqw){.m-lb-col.c2{--pw:calc(19 * var(--hbcq-w))}}.m-lb-col.c3{--pw:17cqw}@supports not (width:1cqw){.m-lb-col.c3{--pw:calc(17 * var(--hbcq-w))}}
  .m-lb-col:active{transform:scale(.98)}
  .m-lb-ped{display:block;width:var(--pw);height:auto;pointer-events:none;position:relative;z-index:1}
  /* TWICE THE SIZE (Roman, 2026-10-02: "make the characters on the podiums 2x bigger"): 1.15 x 1.05 of the
     pedestal width -> 2.3 x 2.1. The negative side margins keep the column as wide as before, so the three
     pedestals do not spread apart — the hero simply grows up and out over them. */
  .m-lb-hero{position:relative;z-index:2;width:calc(var(--pw) * 2.3);height:calc(var(--pw) * 2.1);
    margin:0 calc(var(--pw) * -0.575) calc(var(--pw) * -0.4)}
  .m-lb-hero .m-char-preview{position:absolute;inset:0;width:auto;height:auto;margin:0}
  /* "YOU" over your own hero on the podium (Roman, 2026-10-18: "I'm first and couldn't tell it was me") — a gold tag
     with an arrow pointing down at the hero, bobbing gently; above the live 3D capture too (z-index). popups.js
     _lbPodium adds it by the list's own rule (the account). */
  .m-lb-you{position:absolute;left:50%;top:calc(-1 * var(--hbcq-h));top:-1cqh;z-index:4;transform:translateX(-50%);display:flex;flex-direction:column;
    align-items:center;pointer-events:none;animation:hbLbYou 1.4s ease-in-out infinite}
  .m-lb-you span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;letter-spacing:.08em;color:#3a2400;white-space:nowrap;
    padding:calc(.3 * var(--hbcq-h)) calc(.9 * var(--hbcq-w));padding:.3cqh .9cqw;border-radius:calc(.6 * var(--hbcq-w));border-radius:.6cqw;background:linear-gradient(180deg,#ffe07a,#f3a41b);box-shadow:0 calc(.2 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000a;box-shadow:0 .2cqw .5cqw #000a}
  .m-lb-you i{width:0;height:0;border-left:calc(.8 * var(--hbcq-w)) solid transparent;border-left:.8cqw solid transparent;border-right:calc(.8 * var(--hbcq-w)) solid transparent;border-right:.8cqw solid transparent;
    border-top:calc(1 * var(--hbcq-w)) solid #f3a41b;border-top:1cqw solid #f3a41b;filter:drop-shadow(0 calc(.15 * var(--hbcq-w)) calc(.2 * var(--hbcq-w)) #000a);filter:drop-shadow(0 .15cqw .2cqw #000a)}
  @keyframes hbLbYou{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,calc(.6 * var(--hbcq-h)));transform:translate(-50%,.6cqh)}}
  .m-lb-hero img.snap{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:50% 100%}
  /* ONLY where no 3D picture can be drawn (a run, no WebGL, a failed capture — popups.js _lbPortrait): the look
     portrait small and round on the pedestal, like the list's pictures. Stretched to the hero's box it was a giant
     head (Roman, 2026-10-18: "a bug"). */
  .m-lb-hero img.snap.portrait{inset:auto;left:50%;bottom:6%;transform:translateX(-50%);width:42%;height:auto;
    aspect-ratio:1;object-fit:cover;object-position:50% 50%;border-radius:50%;border:2px solid #b8913f;
    box-shadow:0 calc(.3 * var(--hbcq-w)) calc(.8 * var(--hbcq-w)) #000b;box-shadow:0 .3cqw .8cqw #000b;background:#1a1030}
  .m-lb-plate{position:relative;z-index:3;margin-top:calc(-1.2 * var(--hbcq-w));margin-top:-1.2cqw;width:calc(var(--pw) + 6cqw);aspect-ratio:520/138;
    background:url('leaderboard/nameplate.webp') center/100% 100% no-repeat;display:flex;flex-direction:column;
    align-items:center;justify-content:center;text-align:center;line-height:1.1;white-space:nowrap}@supports not (width:1cqw){.m-lb-plate{width:calc(var(--pw) + calc(6 * var(--hbcq-w)))}}
  .m-lb-plate:empty{visibility:hidden}
  .m-lb-plate b{display:block;font-size:calc(2.3 * var(--hbcq-w));font-size:2.3cqw;color:#fff;max-width:calc(var(--pw) + 2cqw);overflow:hidden;text-overflow:ellipsis}@supports not (width:1cqw){.m-lb-plate b{max-width:calc(var(--pw) + calc(2 * var(--hbcq-w)))}}
  .m-lb-plate span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;color:#ffd54a}
  .m-lb-side{flex:1;min-height:0;display:flex;flex-direction:column}
  /* Rows on the journey task art (its gold frame), tabs on the store tab art — the same pieces the rest of the
     lobby uses — and everything about 1.6x the first version's size. */
  .m-lb-row{gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;padding:calc(1.3 * var(--hbcq-h)) calc(2.4 * var(--hbcq-w));padding:1.3cqh 2.4cqw;border:none;border-radius:0;
    background:url('heropopup/journey_task_clean.webp') center/100% 100% no-repeat}
  .m-lb-row.r1,.m-lb-row.r2,.m-lb-row.r3{background:url('heropopup/journey_task_clean.webp') center/100% 100% no-repeat}
  .m-lb-row.me{box-shadow:none;filter:drop-shadow(0 0 calc(.8 * var(--hbcq-w)) #e8c36a88);filter:drop-shadow(0 0 .8cqw #e8c36a88)}
  .m-lb-me .m-lb-row{background:url('heropopup/store_tab_active.webp') center/100% 100% no-repeat;filter:none}
  .m-lb-rank{font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;width:calc(5.4 * var(--hbcq-w));width:5.4cqw}
  .m-lb-name{font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw}
  .m-lb-points{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#ffd54a}
  .m-lb-pic{width:calc(7.4 * var(--hbcq-w));width:7.4cqw;height:calc(7.4 * var(--hbcq-w));height:7.4cqw;border:2px solid #b8913f}
  .m-lb-go{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#c8b07a}
  .m-settings-land .m-lb-content{gap:calc(1 * var(--hbcq-h));gap:1cqh}
  .m-lb-tabs{gap:calc(2 * var(--hbcq-w));gap:2cqw;margin:calc(1.4 * var(--hbcq-h)) calc(5 * var(--hbcq-w)) 0;margin:1.4cqh 5cqw 0}
  /* THE BOARD TABS ARE THE SETTINGS PILLS, WITH A LEAF CROWN (Roman, 2026-10-02: "like the Rotation buttons in
     Settings — off, and on with the diamond in the middle; but the on one with leaves in the middle on top").
     Off = performance_not_selected (the slate pill); on = tab_on (the green pill, its diamond painted out) with
     tab_leaves (two leaf clusters cut from the shop's pill) poking up above its top centre, as the Settings
     diamond does. Both pills are 75 px tall art, so the two states are one size and the label just centres.
     Used by the leaderboard's boards and Settings' SAVE | LOAD. */
  .m-lb-tab{position:relative;max-width:calc(28 * var(--hbcq-w));max-width:28cqw;height:auto;aspect-ratio:231/75;padding:0 calc(1 * var(--hbcq-w));padding:0 1cqw;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;
    display:flex;align-items:center;justify-content:center;border:none;border-radius:0;box-shadow:none;
    color:#c8dde8;text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d;text-shadow:0 .15cqw .25cqw #000d;
    background:url('heropopup/settings/performance_not_selected.webp') center/100% 100% no-repeat}
  .m-lb-tab.active{color:#fff8dc;border:none;box-shadow:none;text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d,0 0 calc(.6 * var(--hbcq-w)) #c8ff9a77;text-shadow:0 .15cqw .25cqw #000d,0 0 .6cqw #c8ff9a77;
    background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  /* The leaves are Gemini's (2026-10-02, Roman: "something prettier — use Gemini"): they grow from a small gold
     bud on the green pill's frame. Cut in two (tab_on = the pill + the bud's base, tab_leaves = what rises above
     the frame), so this places the leaves over the bud: centred at 44.8% of the pill, standing on its top edge. */
  .m-lb-tab.active::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;
    transform:translateX(-50%);pointer-events:none;
    background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  /* THE LEADERBOARD IS LANDSCAPE (Roman, 2026-10-01: "everything should be bigger"): the podium stands on the left
     and the list runs on the right, like Skull Hero's. ON THE STASH'S FRAME (Roman, 2026-10-02: "a big popup takes
     the stash's frame" — the leaf-corner big_frame, as the Arena window does). It was frame.webp, the inventory's
     own, which belongs to the inventory only. Sized like .m-arena-land; everything inside is cq units of THIS box,
     so the rules below re-state the sizes the portrait rules above set. */
  .m-lb-land{width:min(1100px,98vw,calc(92vh*1125/680));height:auto;aspect-ratio:1125/680;
    background:url('heropopup/stash/big_frame.webp') center/100% 100% no-repeat}
  .m-lb-land .m-settings-close{top:calc(1.4 * var(--hbcq-w));top:1.4cqw;right:calc(1.4 * var(--hbcq-w));right:1.4cqw;width:calc(9.8 * var(--hbcq-h));width:9.8cqh}
  .m-lb-land .m-settings-title{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;padding:calc(6.4 * var(--hbcq-h)) calc(8 * var(--hbcq-w)) 0;padding:6.4cqh 8cqw 0}
  .m-lb-land .m-lb-tabs{gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;margin:calc(4.4 * var(--hbcq-h)) auto 0;margin:4.4cqh auto 0}   /* room above for the chosen tab's leaf crown */
  .m-lb-land .m-lb-tab{flex:none;width:calc(19 * var(--hbcq-w));width:19cqw;max-width:none;height:auto;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw}
  /* A board that is not open yet (the Arena before chapter 4): the same pill, greyed, and it does not answer a tap
     (Roman, 2026-10-04 — "not that I tap it and it says no data"). popups.js loadLeaderboard sets .locked. */
  .m-lb-tabs .m-lb-tab.locked{filter:grayscale(1) brightness(.75);opacity:.5;cursor:default;pointer-events:none}
  .m-lb-land .m-lb-body{flex-direction:row;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;padding:calc(1.6 * var(--hbcq-h)) calc(4 * var(--hbcq-w)) calc(5.4 * var(--hbcq-h));padding:1.6cqh 4cqw 5.4cqh;overflow:hidden}
  .m-lb-land .m-lb-podium{flex:0 0 47%;margin:0;align-items:flex-end}
  .m-lb-land .m-lb-stage{height:100%;gap:calc(2.2 * var(--hbcq-w));gap:2.2cqw}
  .m-lb-land .m-lb-col{--pw:12.4cqw}@supports not (width:1cqw){.m-lb-land .m-lb-col{--pw:calc(12.4 * var(--hbcq-w))}}
  .m-lb-land .m-lb-col.c2{--pw:10.8cqw}@supports not (width:1cqw){.m-lb-land .m-lb-col.c2{--pw:calc(10.8 * var(--hbcq-w))}}
  .m-lb-land .m-lb-col.c3{--pw:9.8cqw}@supports not (width:1cqw){.m-lb-land .m-lb-col.c3{--pw:calc(9.8 * var(--hbcq-w))}}
  .m-lb-land .m-lb-plate{margin-top:calc(-.7 * var(--hbcq-w));margin-top:-.7cqw;width:calc(var(--pw) + 3.6cqw)}@supports not (width:1cqw){.m-lb-land .m-lb-plate{width:calc(var(--pw) + calc(3.6 * var(--hbcq-w)))}}
  .m-lb-land .m-lb-plate b{font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;max-width:calc(var(--pw) + 1cqw)}@supports not (width:1cqw){.m-lb-land .m-lb-plate b{max-width:calc(var(--pw) + calc(1 * var(--hbcq-w)))}}
  .m-lb-land .m-lb-plate span{font-size:calc(1.3 * var(--hbcq-w));font-size:1.3cqw}
  .m-lb-land .m-lb-side{min-width:0}
  .m-lb-land .m-lb-content{margin:0;padding:calc(.6 * var(--hbcq-h)) calc(.6 * var(--hbcq-w)) calc(1 * var(--hbcq-h));padding:.6cqh .6cqw 1cqh;gap:calc(1 * var(--hbcq-h));gap:1cqh}
  .m-lb-land .m-lb-row{gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:calc(1.3 * var(--hbcq-h)) calc(1.6 * var(--hbcq-w));padding:1.3cqh 1.6cqw}
  .m-lb-land .m-lb-rank{font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;width:calc(3.4 * var(--hbcq-w));width:3.4cqw}
  .m-lb-land .m-lb-name{font-size:calc(1.8 * var(--hbcq-w));font-size:1.8cqw}
  .m-lb-land .m-lb-points{font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw}
  .m-lb-land .m-lb-pic{width:calc(4.6 * var(--hbcq-w));width:4.6cqw;height:calc(4.6 * var(--hbcq-w));height:4.6cqw}
  .m-lb-land .m-lb-go{font-size:calc(2 * var(--hbcq-w));font-size:2cqw}
  .m-lb-land .m-lb-me{margin:calc(1 * var(--hbcq-h)) 0 0;margin:1cqh 0 0}
  .m-lb-land .m-sub-empty{font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw}
  /* A visitor's view of another hero (hero-main.js peek): the Stats page, nothing you could change. Above the
     leaderboard it was opened from (.m-look-overlay is z 9000), and without YOUR gems, rename, badge or tabs. */
  #m-chcard.peek{z-index:9100}
  #m-chcard.peek .m-chcard-edit,#m-chcard.peek #m-chcard-active-badge,#m-chcard.peek #m-hc-gems,
  #m-chcard.peek .m-chcard-tab:not([data-ctab=stats]){display:none!important}
  /* Shop popup — house frame.webp skin, same treatment as the other ported popups. One continuous
     scroller (Gold & Gems, then Gear), not tabs. */
  /* Widened from the frame art's own 1122/1402 ratio (a mild stretch of shop_frame.webp, same
     tradeoff accepted for the Stash frame) to make real room for a wider, comfortable scrollbar in
     .m-store-body below -- the vw-based height term is recomputed for the SAME new ratio so the two
     don't drift apart on a width-constrained screen. */
  .m-store-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    height:min(950px,94vh,calc(72vw*1402/1180));aspect-ratio:1180/1402;
    max-width:none;width:auto;max-height:none;display:flex;flex-direction:column;padding:0;overflow:visible;
    background:url('heropopup/shop/shop_frame.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:0 26px 80px #000d}
  .m-store-close{position:absolute;top:calc(-.4 * var(--hbcq-h));top:-.4cqh;right:calc(.4 * var(--hbcq-w));right:.4cqw;width:calc(10.6 * var(--hbcq-w));width:10.6cqw;height:auto;aspect-ratio:1;z-index:4;
    padding:0;border:none;border-radius:0;box-shadow:none;font-size:0;cursor:pointer;
    background:url('heropopup/close.webp') center/contain no-repeat}
  .m-store-close:hover{filter:brightness(1.12)}
  .m-store-title{flex:none;position:relative;z-index:2;text-align:center;font-family:'Cinzel',serif;
    font-weight:900;letter-spacing:.06em;text-transform:uppercase;font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;
    padding:calc(3.4 * var(--hbcq-h)) calc(8 * var(--hbcq-w)) 0;padding:3.4cqh 8cqw 0;color:#f0d78f;text-shadow:0 2px 4px #000b,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a33;text-shadow:0 2px 4px #000b,0 0 1.2cqw #ffd98a33}
  /* Even left/right padding -- no scrollbar to clear anymore (hidden page-wide, see lobby.html);
     the wider right side used to be clearance for that rail's thumb. */
  .m-store-body{flex:1;min-height:0;overflow-y:auto;padding:0 calc(.7 * var(--hbcq-w)) calc(8 * var(--hbcq-w));padding:0 .7cqw 8cqw;margin:0 calc(3.3 * var(--hbcq-w)) calc(6.4 * var(--hbcq-w));margin:0 3.3cqw 6.4cqw;position:relative;z-index:2;-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 96.4%,transparent 100%);mask-image:linear-gradient(to bottom,#000 0,#000 96.4%,transparent 100%);}   /* inside the frame's opening (THE LIST STAYS INSIDE THE FRAME) */
  /* Current balance, ABOVE the first section title -- so "how much do I already have" is answered
     before the player even looks at what's for sale. Values are set on openStore() from
     accountData.gold/crystals and kept live by updateGoldDisplays/updateCrystalDisplays (same
     functions the topbar chips use), just against #m-shop-gold/#m-shop-crystals instead of
     #curGold/#curCrystals -- two independent displays of the same numbers, not a duplicate id. */
  .m-shop-balance{display:flex;align-items:center;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;flex-wrap:wrap;
    margin:calc(4.6 * var(--hbcq-w)) auto 0;margin:4.6cqw auto 0;width:100%;
    /* PINNED WHILE YOU SCROLL (Roman, 2026-09-28: "I reach what I want to buy and forget how many
       crystals I have"). Sticky inside .m-store-body; the band is the frame's own interior blue
       (sampled from shop_frame.webp) so the cards slide under it, fading out at its lower edge. */
    position:sticky;top:0;z-index:3;padding:calc(1 * var(--hbcq-h)) 0 calc(1.8 * var(--hbcq-h));padding:1cqh 0 1.8cqh;
    background:linear-gradient(to bottom,rgb(6,33,62) 0,rgb(6,33,62) 78%,rgba(6,33,62,0) 100%)}
  /* Two wooden plank badges (currency_badge.webp), one per currency -- replaces the single dark pill.
     The image's own leaf-and-gold-rivet border does the framing; this element just sizes/positions
     the icon+number pair centered on top of it. */
  .m-shop-balance-badge{position:relative;flex:0 1 220px;max-width:44%;aspect-ratio:1278/305;
    background:url('heropopup/shop/currency_badge.webp') center/100% 100% no-repeat;
    display:flex;align-items:center;justify-content:center;gap:calc(.7 * var(--hbcq-w));gap:.7cqw;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;color:#fff3d6;text-shadow:0 1px 2px #000c}
  .m-shop-balance-badge .c-icon{width:1.3em;height:1.3em;margin:0;flex:none}
  /* PACKAGES (redone 2026-10-29 — Roman: "at the top of the shop, with no clocks, dots at the bottom and an arrow to the
     right to move between the packs"): a carousel, one slide per pack not yet bought — its name, its island (opens the
     pack window, below), its contents (each one opens the bag's card, read-only) and its price. Every size in cqw of the
     store. The arrow is Gemini's gold arrow with leaves (pack/arrow_gold.webp — Roman picked it of three, 2026-10-29). */
  /* LANDSCAPE: the store is short there, so a slide lies on its side — the island left, the contents and the price right
     (clear of the arrows) — and the whole pack is in view without scrolling. Upright it stands (portrait.css §2). */
  .m-packs{position:relative;width:96%;margin:calc(1.2 * var(--hbcq-w)) auto 0;margin:1.2cqw auto 0;overflow:hidden;touch-action:pan-y}
  .m-packs-track{display:flex;transition:transform .32s ease}
  .m-packs-slide{flex:0 0 100%;min-width:0;box-sizing:border-box;padding:0 calc(13 * var(--hbcq-w));padding:0 13cqw;display:grid;column-gap:calc(2 * var(--hbcq-w));column-gap:2cqw;
    grid-template-columns:50% 1fr;grid-template-areas:"name name" "art items" "art buy";align-items:center;justify-items:center}
  .m-packs-name{grid-area:name;font-family:'Cinzel',serif;font-weight:900;font-size:calc(5.4 * var(--hbcq-w));font-size:5.4cqw;line-height:1.15;color:#ffd98a;white-space:nowrap;
    -webkit-text-stroke:calc(.3 * var(--hbcq-w)) #3a1a05;-webkit-text-stroke:.3cqw #3a1a05;paint-order:stroke fill;text-shadow:0 calc(.4 * var(--hbcq-w)) 0 #3a1a05;text-shadow:0 .4cqw 0 #3a1a05}
  .m-packs-art{grid-area:art;width:100%;height:auto;margin-top:calc(.6 * var(--hbcq-w));margin-top:.6cqw;cursor:pointer;filter:drop-shadow(0 calc(.8 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w)) #0008);filter:drop-shadow(0 .8cqw 1.2cqw #0008)}
  .m-packs-items{grid-area:items;align-self:end;display:flex;flex-wrap:wrap;justify-content:center;gap:calc(2 * var(--hbcq-w));gap:2cqw;margin-top:calc(.8 * var(--hbcq-w));margin-top:.8cqw}
  .m-packs-items .m-packpop-tile{height:calc(14 * var(--hbcq-w));height:14cqw;width:calc(14 * var(--hbcq-w));width:14cqw}
  .m-packs .m-packpop-tile .n{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw}
  /* the pack window's gold price button (a store card's button is drawn by its card's art, so it is bare text here) */
  .m-packs .m-pack-buy{grid-area:buy;align-self:start;width:100%;margin:calc(2.4 * var(--hbcq-w)) auto calc(1.2 * var(--hbcq-w));margin:2.4cqw auto 1.2cqw;padding:calc(1.4 * var(--hbcq-w)) 0;padding:1.4cqw 0;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;
    border:calc(.6 * var(--hbcq-w)) solid #7a4a06;border:.6cqw solid #7a4a06;background:linear-gradient(180deg,#ffe066,#ffbf1f 60%,#f0a010);box-shadow:inset 0 calc(.6 * var(--hbcq-w)) 0 #fff7,0 calc(.9 * var(--hbcq-w)) 0 #7a4a06;box-shadow:inset 0 .6cqw 0 #fff7,0 .9cqw 0 #7a4a06;
    font-size:calc(6 * var(--hbcq-w));font-size:6cqw;color:#fff;-webkit-text-stroke:calc(.4 * var(--hbcq-w)) #6a3a05;-webkit-text-stroke:.4cqw #6a3a05;paint-order:stroke fill;text-shadow:none}
  .m-packs .m-pack-buy:disabled{filter:grayscale(.5);opacity:.7;cursor:default}
  .m-packs-next,.m-packs-prev{position:absolute;right:0;top:40%;width:calc(13 * var(--hbcq-w));width:13cqw;aspect-ratio:1;z-index:2;padding:0;border:none;
    background:url('pack/arrow_gold.webp') center/contain no-repeat;font-size:0;cursor:pointer;filter:drop-shadow(0 calc(.5 * var(--hbcq-w)) calc(.8 * var(--hbcq-w)) #000a);filter:drop-shadow(0 .5cqw .8cqw #000a)}
  .m-packs-prev{right:auto;left:0;transform:scaleX(-1)}   /* the same arrow, mirrored */
  .m-packs-next:active{transform:scale(.92)}
  .m-packs-prev:active{transform:scaleX(-1) scale(.92)}
  .m-packs-dots{display:flex;justify-content:center;gap:calc(2 * var(--hbcq-w));gap:2cqw;margin:calc(1.2 * var(--hbcq-w)) 0 0;margin:1.2cqw 0 0}
  .m-packs-dots button{width:calc(2.8 * var(--hbcq-w));width:2.8cqw;height:calc(2.8 * var(--hbcq-w));height:2.8cqw;padding:0;border-radius:50%;border:calc(.45 * var(--hbcq-w)) solid #3a1a05;border:.45cqw solid #3a1a05;background:#ffffff55;cursor:pointer}
  .m-packs-dots button.on{background:#ffd98a;transform:scale(1.25)}

  /* ═══════ THE PACK WINDOW (Roman, 2026-09-29: "ours is not pretty — look at Skull Hero's, like theirs") ═══════
     No frame: the parts float over the dimmed backdrop — the ribbon title (pack/ribbon.webp), the big
     "LIMITED OFFER" splash, the pack's island (pack/<id>_island.webp, generated from the pack's own item
     icons), the contents as rarity tiles, and a big yellow price button. Portrait box, height-driven so a
     landscape phone never crops it. Paints above the store it can be opened from. */
  #pack-modal{z-index:9003}
  .m-packpop{contain:size layout;--hbcq-c:1;container-type:size;position:relative;height:min(94vh,900px);aspect-ratio:640/1000}
  .m-packpop-rib{position:absolute;left:0;right:0;top:0;aspect-ratio:900/254;display:flex;align-items:center;justify-content:center;
    padding:0 18% calc(3.4 * var(--hbcq-w));padding:0 18% 3.4cqw;background:url('pack/ribbon.webp') center/100% 100% no-repeat;z-index:2}
  .m-packpop-rib span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(7.4 * var(--hbcq-w));font-size:7.4cqw;line-height:1;color:#5a2a0a;
    text-shadow:0 calc(.35 * var(--hbcq-w)) 0 #ffe9a0;text-shadow:0 .35cqw 0 #ffe9a0;white-space:nowrap}
  .m-packpop-close{position:absolute;top:calc(-1.5 * var(--hbcq-w));top:-1.5cqw;right:0;width:calc(12 * var(--hbcq-w));width:12cqw;aspect-ratio:1;z-index:4;padding:0;border:none;
    background:url('heropopup/close.webp') center/contain no-repeat;font-size:0;cursor:pointer}
  /* (The "LIMITED OFFER" splash and the clock went 2026-10-29 — no window any more; the island takes their room.) */
  .m-packpop-art{position:absolute;left:4%;width:92%;top:20%;height:51%;object-fit:contain;z-index:1}
  .m-packpop-items{position:absolute;left:3%;right:3%;top:72.5%;height:12.5%;display:flex;justify-content:center;gap:calc(2.6 * var(--hbcq-w));gap:2.6cqw;z-index:2}
  .m-packpop-tile{position:relative;height:100%;aspect-ratio:1;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw;border:calc(.8 * var(--hbcq-w)) solid #231238;border:.8cqw solid #231238;
    display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#b9c2cf,#7d8796);
    box-shadow:inset 0 calc(-1 * var(--hbcq-w)) 0 #0003,inset 0 calc(.6 * var(--hbcq-w)) 0 #fff4;box-shadow:inset 0 -1cqw 0 #0003,inset 0 .6cqw 0 #fff4}
  .m-packpop-tile.r-rare{background:linear-gradient(180deg,#72b9ff,#2f6fe0)}
  .m-packpop-tile.r-epic{background:linear-gradient(180deg,#c98eff,#7a3fe0)}
  .m-packpop-tile.r-legendary,.m-packpop-tile.r-gold{background:linear-gradient(180deg,#ffe07a,#f3a41b)}
  button.m-packpop-tile{padding:0;font:inherit;cursor:pointer}   /* an item tile opens its card (2026-10-29) */
  button.m-packpop-tile:active{transform:scale(.94)}
  .m-packpop-tile img{width:80%;height:80%;object-fit:contain}
  .m-packpop-tile .n{position:absolute;left:0;right:0;bottom:3%;text-align:center;font-family:'Cinzel',serif;font-weight:900;
    font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;color:#fff;-webkit-text-stroke:calc(.35 * var(--hbcq-w)) #3a1a05;-webkit-text-stroke:.35cqw #3a1a05;paint-order:stroke fill}
  .m-packpop-buy{position:absolute;left:27%;right:27%;top:88%;height:9%;z-index:2;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;border:calc(.6 * var(--hbcq-w)) solid #7a4a06;border:.6cqw solid #7a4a06;
    background:linear-gradient(180deg,#ffe066,#ffbf1f 60%,#f0a010);box-shadow:inset 0 calc(.6 * var(--hbcq-w)) 0 #fff7,0 calc(.9 * var(--hbcq-w)) 0 #7a4a06;box-shadow:inset 0 .6cqw 0 #fff7,0 .9cqw 0 #7a4a06;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(7 * var(--hbcq-w));font-size:7cqw;color:#fff;-webkit-text-stroke:calc(.45 * var(--hbcq-w)) #6a3a05;-webkit-text-stroke:.45cqw #6a3a05;paint-order:stroke fill;cursor:pointer}
  .m-packpop-buy:disabled{filter:grayscale(.5);opacity:.7;cursor:default}
  .m-packpop-buy:not(:disabled):active{transform:translateY(calc(.5 * var(--hbcq-w)));transform:translateY(.5cqw)}
  /* Section header ribbon (title1.webp), used above both Gold & Gems and Gear now that the shop
     is one continuous scroller instead of tabs. */
  .m-shoptitle{position:relative;width:76%;max-width:420px;margin:12px auto 0;   /* longer for the new art, so the text sits in it (Roman, 2026-10-29) */
    aspect-ratio:900/296;background:url('heropopup/shop/title1.webp') center/100% 100% no-repeat;   /* Roman's sharper six, 2026-10-29 (900 px; were 313) */
    display:flex;align-items:center;justify-content:center;padding-top:calc(5 * var(--hbcq-h));padding-top:5cqh;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.06em;text-transform:uppercase;
    font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;color:#fff6e0;text-shadow:0 1px 2px #000a}
  /* Per-row color variants (the "six elements" title2-6/card2-6 kit) -- one color per Gear
     category so each row reads apart from the next at a glance. Gold & Gems keeps the original
     gold title1/card1 (no modifier needed). Paired by ACTUAL rendered color, not the source
     filenames' numbers -- title3.png (purple) and card3.png (wood) are NOT the same color despite
     matching numbers; the real pairs are title1+card1 (gold), title2+card2 (green),
     title3+card4 (purple), title4+card6 (blue), title5+card5 (red), title6+card3 (wood+blue-gem). */
  /* Rows since 2026-09-26: Items (helmet or armour) keeps the armour row's red, Weapons (with the
     shields) its blue, and Progress Stats takes the purple of the Helmets row it replaced. */
  .m-shoptitle-items{background-image:url('heropopup/shop/title_red.webp')}
  .m-shoptitle-weapon{background-image:url('heropopup/shop/title_blue.webp')}
  .m-shoptitle-stats{background-image:url('heropopup/shop/title_purple.webp')}
  .m-shoptitle-gems{background-image:url('heropopup/shop/title_wood.webp')}
  .m-shoptitle-eggs{background-image:url('heropopup/shop/title_green.webp')}   /* the Dragon Eggs shelf (2026-11-22) — the kit's unused green */
  .m-store-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(1 * var(--hbcq-w));gap:1cqw;row-gap:calc(1.6 * var(--hbcq-h));row-gap:1.6cqh;
    width:100%;align-self:stretch}
  /* Real-money IAP cards, hidden for launch -- Roman, 2026-09-12: fully free for the first ~6
     months to build a player base, IAP comes back after. The cards stay in the DOM (not deleted)
     so re-enabling later is deleting this one rule, not re-authoring six cards. */
  .m-iap-hidden{display:none}
  /* SKIP ADS TICKETS (2026-11-13, config/skip-ads.ts): a third header badge while he holds tickets (the three share the row —
     popups.js _paintSkipCount sets .three), and the row's one-line note under its title. Our card art, our gold ticket. */
  .m-shop-balance.three .m-shop-balance-badge{max-width:31%;font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw}
  .m-store-skip-note{width:100%;text-align:center;font-family:'Cinzel',serif;font-weight:700;font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;color:#ffe9b0;
    text-shadow:0 1px 2px #000c;margin:calc(-0.4 * var(--hbcq-h)) 0 calc(1.2 * var(--hbcq-h));margin:-0.4cqh 0 1.2cqh}
  #m-store-skip{display:flex;flex-direction:column;align-items:center;width:100%}
  #m-store-skip.m-iap-hidden{display:none}
  /* Universal item-slot card -- the "six elements" kit's card1.webp, now used EVERYWHERE in the
     shop (Gold & Gems above and every Gear row: armor/weapons/helmets/shields/gems), replacing
     the old store_card_frame_gold.webp everywhere it was used. A small gem accent at top, a big
     glowing icon well through the middle, a wood footer bar at the bottom for the price button.
     Measured off the source PNG (178x224): border+gem 0-18%, the glow well 18%-78%, footer
     bar 78%-100%. */
  /* READABLE (Roman, 2026-10-14: "make the text in the store a bit bigger — hard to read"). The shop is ~300 css px
     wide on a landscape phone, so 2.2-2.5cqw card text came out at 7-8 px. Card text +30% (desc 2.9, reward 3.2,
     price 4.1, section titles 3.8 — Russian "Золото и кристаллы" is the widest ribbon text — the chest "i" 2.2); the pictures give the room back (58->52%, stats 60->54%,
     margins 1.6->0.9cqh) — the card is a fixed .795 aspect with overflow hidden, so a second text line must
     not push the price button out of it. */
  .m-store-card{position:relative;background:url('heropopup/shop/card1.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;padding:19% 12% 3%;overflow:hidden;text-align:center;
    display:flex;flex-direction:column;align-items:center;transition:transform .12s;aspect-ratio:.795}
  .m-store-card:active{transform:scale(.95)}
  .m-store-card-items{background-image:url('heropopup/shop/card_red.webp')}
  .m-store-card-weapon{background-image:url('heropopup/shop/card_blue.webp')}
  .m-store-card-stats{background-image:url('heropopup/shop/card_purple.webp')}
  .m-store-card-gems{background-image:url('heropopup/shop/card_wood.webp')}
  .m-store-card-eggs{background-image:url('heropopup/shop/card_green.webp')}
  .m-store-img{width:52%;aspect-ratio:1;margin:calc(.9 * var(--hbcq-h)) auto;margin:.9cqh auto;object-fit:contain;display:block}
  /* The shadow under each store picture went 2026-09-29 (a filter per card, paid on every open and
     scroll); OLD = the FX switch (page-perf.js). */
  body.fx-legacy .m-store-img{filter:drop-shadow(0 3px 5px #0007)}
  /* The $4.99 pack's picture fills more of its canvas, so it is DRAWN smaller (43/52) — scaled, never narrowed: a narrower box
     is a shorter one (aspect-ratio 1), and its "120 Crystals / 1200 Gold" sat higher than the 290 and 700 (Roman, 2026-11-13). */
  .m-store-img[src*="gold-2"]{transform:scale(.83)}
  .m-store-reward{font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;font-weight:700;color:#fff6e0;text-shadow:0 1px 2px #000a;padding:0;display:flex;
    align-items:center;justify-content:center;gap:calc(.4 * var(--hbcq-w));gap:.4cqw;white-space:nowrap}
  .m-store-reward .c-icon{width:1.5em;height:1.5em;margin-right:5px}
  /* THE PASSES CARD's second line (2026-11-14) wraps inside the card in a smaller size — "Premium · this week" is wider than a card */
  .m-store-reward.m-store-pass-sub{white-space:normal;text-align:center;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;line-height:1.1;padding:0 7%}
  /* the pass's time left (2026-11-22, Roman: "the buy button shows how long is left"), red in its last 24 hours */
  .m-store-pass-ends{white-space:nowrap;text-align:center;font-family:'Lilita One',sans-serif;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;line-height:1.1;color:#ffd34d;
    text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #000;text-shadow:0 .2cqw .3cqw #000;margin:calc(.2 * var(--hbcq-w)) 0 calc(.4 * var(--hbcq-w));margin:.2cqw 0 .4cqw}
  .m-store-pass-ends.soon{color:#ff7a66}
  .m-store-pass-ends:empty{display:none}
  .m-store-btn{display:block;position:relative;margin-top:auto;width:100%;
    border:none;border-radius:0;background:none;box-shadow:none;
    font-family:'Cinzel',serif;font-size:calc(4.1 * var(--hbcq-w));font-size:4.1cqw;font-weight:900;letter-spacing:.02em;cursor:pointer;
    color:#fff3d6;text-shadow:0 1px 2px #000c;transition:transform .1s}
  .m-store-btn:active{transform:translateY(1px)}
  .m-store-btn-watch{background:none}
  /* Chest cards (Gear rows): a short description under the icon instead of a name badge, and a
     small "i" info button (top-right of the card) that lists every possible item the chest could
     roll -- see onShowChestPool() in popups.js. */
  .m-store-chestdesc{font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:1.15;color:#fff6e0;text-shadow:0 1px 2px #000a;
    margin:calc(.2 * var(--hbcq-h)) 0;margin:.2cqh 0}
  /* THE "!" ON A FREE CLAIM (Roman, 2026-10-19): the free-gold card's and the Progress Stats small cards' FREE button
     while its free claim waits — the same painted notice and the same bob + glow as the home's buttons (lobby.html
     .badge, keyframes hbNotice / hbNoticeGlow). It sits on the BUTTON's top-right corner, inside the card, above the
     picture and the text — Roman: "next to the Free, above the elements". It sat on the card's corner first, half
     outside it, and the card's overflow:hidden (its fixed .795 aspect) cut it, so it looked tucked behind the frame.
     Sized in % of the button, so old engines need no fallback. */
  .m-notice{position:absolute;z-index:4;bottom:55%;right:-12%;width:34%;aspect-ratio:1;pointer-events:none;
    animation:hbNotice 1.6s ease-in-out infinite;transform-origin:50% 70%}
  .m-notice::before{content:'';position:absolute;inset:-38%;border-radius:50%;
    background:radial-gradient(circle,rgba(255,92,64,.75) 0%,rgba(255,92,64,0) 62%);animation:hbNoticeGlow 1.6s ease-in-out infinite}
  .m-notice::after{content:'';position:absolute;inset:0;background:url('notice.webp') center/contain no-repeat}
  .m-store-info{position:absolute;z-index:3;top:8%;right:10%;width:7%;aspect-ratio:1;min-width:16px;
    border-radius:50%;border:none;cursor:pointer;padding:0;background:rgba(20,10,10,.55);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.4);color:#fff6e0;
    font-family:'Cinzel',serif;font-weight:900;font-style:italic;font-size:calc(2.2 * var(--hbcq-w));font-size:2.2cqw;line-height:1}
  /* Chest possible-items list popup (#chestpool-modal) -- icon + name grid, not plain text. */
  .m-chestpool-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 8px}
  .m-chestpool-item{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
  .m-chestpool-icon{width:100%;aspect-ratio:1;object-fit:contain;border-radius:8px;
    background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
  .m-chestpool-name{font-size:13px;color:#c0b8de;line-height:1.2}
  /* the drop odds (2026-10-13) — store policy: every prize's chance, before the purchase */
  .m-chestpool-pct{font-size:14px;font-weight:700;color:#ffd76a;line-height:1}
  .m-chestpool-note{font-size:13px;color:#c0b8de;line-height:1.35;text-align:center;margin:0 0 10px}
  .m-store-info:hover{background:rgba(20,10,10,.8)}
  /* A WIDER TAP AREA, invisible (2026-10-24): the whole card buys now (popups.js), so a near-miss on the "i" must still
     land on the "i" — its own click opens the list and stops there. */
  .m-store-info::before{content:'';position:absolute;top:-60%;right:-60%;bottom:-60%;left:-60%;border-radius:50%}
  .m-store-card{cursor:pointer}
  /* Gear tab — 5 rows (armor/weapons/helmets/shields/gems), each a horizontally scrollable strip
     of .m-store-card (reused as-is, just narrower + fixed-width instead of the 3-col grid) so a
     curated handful per row doesn't need its own new card design. */
  .m-shopgear-section{margin-bottom:calc(1.6 * var(--hbcq-h));margin-bottom:1.6cqh}
  .m-shopgear-section .m-shoptitle{margin-top:calc(4 * var(--hbcq-h));margin-top:4cqh;margin-bottom:calc(1.2 * var(--hbcq-h));margin-bottom:1.2cqh}
  .m-shopgear-row{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(1 * var(--hbcq-w));gap:1cqw;row-gap:calc(1.6 * var(--hbcq-h));row-gap:1.6cqh;
    width:100%;padding:calc(.2 * var(--hbcq-h)) 0 calc(.3 * var(--hbcq-h));padding:.2cqh 0 .3cqh}
  /* Four progress-stat cards (sword, bow, magic, HP) in one line. */
  /* 3 A ROW (2026-09-30): small / medium / large of each stat — the four stats become four rows. ONE picture
     size for all three (Roman: the pictures shrinking with the pack left the text and buttons out of line);
     the size lives in the ART instead — the items alone, a small pouch, the big bag (stat_<kind>_small /
     _medium, stat_<kind> for large). */
  .m-shopgear-stats{grid-template-columns:repeat(3,1fr)}
  .m-shopgear-stats .m-store-img{width:54%}
  .m-store-btn-ad{display:inline-flex;align-items:center;justify-content:center;gap:calc(.6 * var(--hbcq-w));gap:.6cqw}
  /* Inline currency icon — use anywhere text previously used 🪙 / 💎 emoji */
  .c-icon{width:1.15em;height:1.15em;object-fit:contain;vertical-align:-0.22em;margin-right:3px;
    display:inline-block;filter:drop-shadow(0 1px 1px rgba(0,0,0,0.35))}
  /* AP shop — vertical stack (icon + earn-label) auto-centered in the card */
  .m-ap-stack{display:flex;flex-direction:column;align-items:center;gap:16px;
    margin:auto 0}
  .m-ap-icon{width:60px;height:60px;object-fit:contain;flex-shrink:0;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,0.4))}
  .m-placeholder-desc{font-size:14px;color:#6a5a8a;max-width:300px}

  /* Watch-ad daily quest row */
  /* Watch-ad row — same purple base as other quest rows but with a gold border
   * (the WATCH button is the eye-catcher, not the row chrome). */
  /* Watch-ad row uses the dedicated watchad banner (coins art baked on the left). */
  .m-quest-watchad{background:url('/sprites-opt/ui/season/watchad.webp') center / 100% 100% no-repeat!important;
    border:none!important;border-radius:0!important;box-shadow:none!important;
    aspect-ratio:1229/270;padding:0 14px 0 26%!important}
  /* Watch button uses the gold points_button sprite. */
  .m-quest-watchad-btn{flex-shrink:0;width:80px;aspect-ratio:415/152;height:auto;cursor:pointer;border:none;padding:0;
    background:url('/sprites-opt/ui/season/points_button.webp') center / 100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:1px;font-size:11px;
    color:#3a2400;text-shadow:0 1px 0 rgba(255,230,150,0.45);text-transform:uppercase;
    transition:transform 0.1s}
  .m-quest-watchad-btn:active{transform:scale(0.96)}
  .m-quest-watchad-btn.cooldown{filter:grayscale(0.6) brightness(0.55);cursor:not-allowed}
  /* The Quest Log's ad daily: the same gold button, sized to the row (where its 0/1 bar used to be). */
  .m-quest2-adbtn{width:auto;min-width:calc(26 * var(--hbcq-w));min-width:26cqw;height:calc(5.2 * var(--hbcq-w));height:5.2cqw;aspect-ratio:auto;padding:0 calc(2.2 * var(--hbcq-w));padding:0 2.2cqw;margin-top:calc(.6 * var(--hbcq-w));margin-top:.6cqw;
    display:inline-flex;align-items:center;justify-content:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;letter-spacing:.04em}
  .m-quest2-adbtn img{height:70%;width:auto}
  /* NO GOLD PLATE BEHIND IT (Roman, 2026-10-25: "remove the ugly button behind — only WATCH AD and our ad picture";
     "in the daily, fix landscape too in this case"): our ad badge and the words, in the bar's gold — both layouts. */
  .m-quest2-adbtn{background:none;color:#ffd877;text-shadow:0 2px 3px #000c;padding:0;min-width:0;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw}
  .m-quest2-adbtn img{height:100%}
  /* ═══ Mobile Quest Sections — season-frame palette ═══ */
  /* Subtle frame; the season frame.webp is already doing the heavy lifting
   * around the whole modal. Drop the heavy blue/purple panel border so this
   * doesn't feel like a competing frame inside a frame. */
  .m-quest-section{border-radius:0;overflow:visible;
    box-shadow:none;background:transparent;border:none}
  .m-quest-section.daily{background:transparent;border:none}
  /* Section header row */
  .m-quest-section-header{display:flex;justify-content:space-between;align-items:center;
    padding:2px 0 8px;gap:10px}
  /* "DAILY" label uses the title_free.webp pill (same one as the FREE column header) */
  .m-quest-section-title{aspect-ratio:553/137;height:34px;
    background:url('/sprites-opt/ui/season/title_free.webp') center / 100% 100% no-repeat;
    display:flex;align-items:center;justify-content:center;
    font-family:'Cinzel',serif;font-size:13px;font-weight:900;letter-spacing:3px;
    color:#fff;text-shadow:0 2px 4px rgba(0,0,0,0.85);padding:0 18px;min-width:120px}
  /* "Resets daily" timer uses the duration.webp pill */
  .m-quest-timer-badge{aspect-ratio:346/74;height:30px;
    background:url('/sprites-opt/ui/season/duration.webp') center / 100% 100% no-repeat;
    display:flex;align-items:center;justify-content:center;gap:5px;
    font-family:'Cinzel',serif;font-size:10px;font-weight:800;letter-spacing:1.5px;
    color:#fff;text-shadow:0 1px 3px rgba(0,0,0,0.8);padding:0 14px}
  .m-quest-timer-badge::before{content:'⏱';font-size:11px}
  /* Quest rows — tightened so all 6 dailies fit inside the frame's visible
   * content area without scrolling past the bottom decoration. */
  .m-quest-list{display:flex;flex-direction:column;gap:5px;padding:0}
  .m-quest-item{display:flex;align-items:center;gap:10px;
    background:url('/sprites-opt/ui/season/quest_no_badge.webp') center / 100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:none;
    aspect-ratio:1210/206;padding:0 14px 0 8px}
  /* Completed rows: same banner; the green check alone marks "done" (no glow ring). */
  .m-quest-item.done{opacity:1;box-shadow:none}
  /* Per-quest badge medallion — pops slightly above/below the row like the mockup.
     (Named -medal, NOT -badge: .m-quest-badge is the red notification dot.) */
  .m-quest-medal{flex-shrink:0;width:52px;height:52px;object-fit:contain;
    filter:drop-shadow(0 2px 4px rgba(0,0,0,0.6))}
  .m-quest-item-info{flex:1;min-width:0}
  .m-quest-name{font-family:'Cinzel',serif;font-size:12px;color:#f0e4c0;font-weight:800;
    letter-spacing:0.5px;line-height:1.15;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
    text-shadow:0 1px 2px rgba(0,0,0,0.6)}
  .m-quest-progress-row{display:flex;align-items:center;gap:7px;margin-top:4px}
  .m-quest-bar{flex:1;height:6px;background:rgba(0,0,0,0.5);border-radius:3px;overflow:hidden;
    border:1px solid rgba(240,200,112,0.25)}
  .m-quest-fill{height:100%;border-radius:2px;transition:width 0.3s;
    background:linear-gradient(90deg,#f0c870,#ffe080)}
  .m-quest-pct{font-family:'Cinzel',serif;font-size:10px;color:#c0a0f0;font-weight:800;
    min-width:34px;text-align:right;text-shadow:0 1px 2px rgba(0,0,0,0.6)}
  /* Progress count under the quest name (progress bar removed). */
  .m-quest-count{font-family:'Cinzel',serif;font-size:11px;color:#c0a0f0;font-weight:800;
    margin-top:3px;letter-spacing:0.5px;text-shadow:0 1px 2px rgba(0,0,0,0.6)}
  /* Reward chip — uses the gold points_button sprite. */
  .m-quest-reward{font-family:'Cinzel',serif;font-size:10px;font-weight:900;text-transform:uppercase;
    color:#3a2400;white-space:nowrap;letter-spacing:0.5px;
    flex-shrink:0;width:64px;aspect-ratio:415/152;
    display:flex;align-items:center;justify-content:center;
    background:url('/sprites-opt/ui/season/points_button.webp') center / 100% 100% no-repeat;
    text-shadow:0 1px 0 rgba(255,230,150,0.5)}
  .m-quest-check{width:24px;height:24px;border-radius:50%;
    background:linear-gradient(180deg,#80e040,#408020);
    border:2px solid #1a3010;
    display:flex;align-items:center;justify-content:center;
    font-size:13px;font-weight:900;color:#fff;text-shadow:0 1px 0 rgba(0,0,0,0.4);
    flex-shrink:0}
  .m-craft-card{position:absolute;right:6px;bottom:20px;width:100px;max-width:30vw;z-index:6;cursor:pointer;transition:transform .1s;filter:drop-shadow(0 4px 11px rgba(0,0,0,.6))}
  .m-craft-card:active{transform:scale(0.93)}
  .m-craft-card img{width:100%;display:block}
  .m-craft-card-label{position:absolute;left:0;right:0;bottom:8%;text-align:center;color:#ffe6a0;font-family:Cinzel,serif;font-weight:800;font-size:11px;letter-spacing:1px;text-shadow:0 1px 3px #000,0 0 6px rgba(0,0,0,.85);pointer-events:none}
  /* Treasure box card — opposite corner from Craft. Uses the chest art (closed/open on tap). */
  .m-treasure-card{position:absolute;left:6px;bottom:26px;width:104px;max-width:30vw;z-index:6;cursor:pointer;transition:transform .1s;
    filter:drop-shadow(0 4px 11px rgba(0,0,0,.6))}
  .m-treasure-card:active{transform:scale(0.93)}
  .m-treasure-card .m-tc-img{width:100%;display:block}
  .m-treasure-card.hb-locked{filter:grayscale(1) brightness(.55)}
  .m-treasure-card.hb-locked::after{content:'';position:absolute;top:3px;right:6px;width:20px;height:20px;filter:none;
    background:url('lock_navy.webp') center/contain no-repeat}   /* the theme lock (2026-11-14) */
  /* Treasure stash grid (deposit/withdraw cells) -- a portrait card (icon / name / action button)
     instead of the old icon-only square with text crammed along the bottom edge. */
  /* min-width:0 on the cell is the actual fix for "3 per row without a sideways scrollbar" -- grid
     items default to min-width:auto, which stops a 1fr column shrinking past its CONTENT's natural
     size (an unbreakable name, an unconstrained icon) even though the track math says 1/3 each.
     Without it a wide-enough item silently pushes the grid past 100% and the row starts scrolling
     sideways instead of the card just getting smaller. */
  .m-tb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:6px}
  .m-tb-cell{position:relative;min-width:0;aspect-ratio:3/4;border-radius:8px;border:2px solid #caa14e;
    background:linear-gradient(180deg,#2e2456,#1e183e);
    display:flex;flex-direction:column;align-items:center;cursor:pointer;
    padding:6px 4px 5px;box-sizing:border-box;transition:transform .1s}
  .m-tb-cell:active{transform:scale(0.96)}
  .m-tb-cell img{width:70%;height:50%;object-fit:contain;pointer-events:none;margin-top:1px}
  .m-tb-cell .m-pd-name{width:100%;text-align:center;font-family:'Cinzel',serif;font-weight:700;
    font-size:9px;letter-spacing:.01em;text-transform:uppercase;color:#e8dcc0;
    overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:auto}
  .m-tb-cell .m-tb-act{display:block;width:100%;margin-top:4px;padding:2px 0;border-radius:5px;
    background:linear-gradient(180deg,#3a2c60,#241a40);border:1px solid #caa14e88;box-sizing:border-box;
    text-align:center;font-family:'Cinzel',serif;font-size:8px;font-weight:800;
    text-transform:uppercase;letter-spacing:.03em;color:#ffd98a}
  #m-econ-panel{position:fixed;inset:0;z-index:520;background:rgba(0,0,0,0.8);
    display:none;align-items:flex-end;justify-content:center}
  #m-econ-panel.open{display:flex}

  /* ═══════ Gem Altar — weapon PASSIVE upgrade only, house frame.webp skin ═══════
     Own class family (not reusing lobby.html's inline .m-craft-* rules) so this popup has zero
     dependency on the rest of the lobby's chrome/CSS -- it needs to keep working unchanged once it's
     embedded standalone in the running 3D game. Sized like the Store (bigger than Settings: this one
     needs a weapon list AND a detail pane side by side, not a single centered column). The outer
     .m-galtar-land establishes the container-query root in vw/vh/px (unavoidable -- a container can't
     size itself in its own cqw/cqh); every element INSIDE it is cqw/cqh only, per the project's fixed
     landscape-mobile scale rule. */
  .m-galtar-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    width:min(1100px,96vw,calc(88vh*1525/856));aspect-ratio:1525/856;
    max-width:none;max-height:none;height:auto;display:flex;flex-direction:column;padding:0;overflow:visible;
    background:url('heropopup/frame.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:0 26px 80px #000d}
  .m-galtar-close{position:absolute;top:calc(-2.4 * var(--hbcq-h));top:-2.4cqh;right:calc(-1.6 * var(--hbcq-w));right:-1.6cqw;width:calc(4.6 * var(--hbcq-w));width:4.6cqw;height:auto;aspect-ratio:1;z-index:4;
    padding:0;border:none;border-radius:0;box-shadow:none;font-size:0;cursor:pointer;
    background:url('heropopup/close.webp') center/contain no-repeat}
  .m-galtar-close:hover{filter:brightness(1.12)}
  .m-galtar-title{flex:none;position:relative;z-index:2;text-align:center;font-family:'Cinzel',serif;
    font-weight:900;letter-spacing:.1em;text-transform:uppercase;font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;
    padding:calc(5 * var(--hbcq-h)) calc(8 * var(--hbcq-w)) 0;padding:5cqh 8cqw 0;color:#f0d78f;text-shadow:0 2px 4px #000d,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a33;text-shadow:0 2px 4px #000d,0 0 1.2cqw #ffd98a33}
  .m-galtar-body{flex:1;min-height:0;display:flex;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;padding:calc(3 * var(--hbcq-h)) calc(3.4 * var(--hbcq-w)) calc(3 * var(--hbcq-h));padding:3cqh 3.4cqw 3cqh;overflow:hidden}
  .m-galtar-collabel{flex:none;font-family:'Cinzel',serif;font-weight:800;letter-spacing:.08em;
    font-size:calc(1.8 * var(--hbcq-w));font-size:1.8cqw;color:#8a93ad;text-transform:uppercase;margin-bottom:calc(.3 * var(--hbcq-h));margin-bottom:.3cqh}
  /* Same divider the Forge uses under its own "Weapon" column label -- craft_separator.webp,
     same aspect-ratio, same treatment (see .m-craft-sep in lobby.html). */
  .m-galtar-sep{flex:none;width:100%;aspect-ratio:1313/100;
    background:url('heropopup/craft_separator.webp') center/100% 100% no-repeat;
    margin-bottom:calc(.6 * var(--hbcq-h));margin-bottom:.6cqh;opacity:.9}

  /* LEFT — the weapon list (only weapons with core.element; un-imbued weapons never show here) */
  .m-galtar-left{flex:0 0 32%;min-width:0;display:flex;flex-direction:column;min-height:0}
  .m-galtar-wlist{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;
    gap:calc(.8 * var(--hbcq-h));gap:.8cqh;padding-right:calc(.2 * var(--hbcq-w));padding-right:.2cqw}
  /* MATCHED TO THE FORGE'S ROW (2026-09-16). Roman: "in Passive, the weapon selection window on the
     left should be identical to the one in the Forge." The two had drifted — different padding (and
     on a different unit AXIS, .7cqh vs .72cqw), a different background, and no box-sizing here.

     ⚠ THE NUMBERS CANNOT SIMPLY BE COPIED and be the same SIZE, which is why this matches the
     STYLE and not the pixels. The two panels are different container-query roots: .m-econ-inner is
     min(1900px,99vw,97vh*2.2196), .m-galtar-land is min(1100px,96vw,88vh*1.7816). Both are
     height-bound on a landscape phone, so this container is a constant ~73% of the Forge's width and
     an identical cqw renders ~27% smaller here. Same design, sized for its own frame. */
  .m-galtar-wrow{position:relative;flex:none;display:flex;align-items:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;width:100%;min-width:0;
    border:none;cursor:pointer;text-align:left;padding:calc(.72 * var(--hbcq-w)) calc(.9 * var(--hbcq-w));padding:.72cqw .9cqw;border-radius:calc(.9 * var(--hbcq-w));border-radius:.9cqw;box-sizing:border-box;
    background:rgba(15,10,32,.55);box-shadow:inset 0 0 0 1px #3a2c6055}
  .m-galtar-wrow.sel{box-shadow:inset 0 0 0 2px #ffd98a;background:rgba(60,45,15,.5)}
  /* The Forge's gem-socket, not a flat square — this was the loudest difference between the two
     lists. overflow:hidden stays (the Altar's icon can fall back to a NAME via _pdOnerrorImg, which
     is better than the Forge's visibility:hidden and is deliberately kept). */
  .m-galtar-wicon{flex:none;width:calc(4 * var(--hbcq-w));width:4cqw;aspect-ratio:1;border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw;
    background:radial-gradient(ellipse at 50% 35%,#26325a,#111a34);box-shadow:inset 0 0 0 1px #caa14e66;
    display:flex;align-items:center;justify-content:center;overflow:hidden}
  .m-galtar-wicon img{width:78%;height:78%;object-fit:contain;filter:drop-shadow(0 2px 3px #0009)}
  .m-galtar-wtext{flex:1;min-width:0}
  /* THE SELECTED-ROW CHECK, SHARED BY BOTH WEAPON LISTS (2026-09-16). Was .m-craft-wcheck, inline in
     lobby.html and Forge-only; promoted here rather than copied, the same call .m-eq-badge already
     made. Two byte-identical rules under two names is exactly how .m-craft-wrow and .m-galtar-wrow
     drifted apart in the first place.

     ⚠ The Forge's inline copy is DELETED in the same commit. popups.css is <link>ed before
     lobby.html's inline <style>, so an inline rule of equal specificity would silently win and the
     two would diverge again without anyone noticing. */
  /* THE BADGE GETS ITS OWN LINE IN BOTH LISTS. It began inline-after-the-name in the Altar and on
     its own line in the Forge, whose column is narrower — then the Altar adopted the Forge's
     padding and its inline pill started clipping too ("Equip..."). One flow for both: the name keeps
     its ellipsis line to itself, and the pill can never be truncated by it. */
  .m-craft-wtext .m-eq-badge,
  .m-galtar-wtext .m-eq-badge{display:inline-block;margin-left:0;margin-top:calc(.35 * var(--hbcq-h));margin-top:.35cqh}
  .m-wcheck{flex:none;width:calc(2.5 * var(--hbcq-w));width:2.5cqw;height:calc(2.5 * var(--hbcq-w));height:2.5cqw;border-radius:50%;background:#3cae5a;
    box-shadow:0 0 0 2px #143a1e;display:flex;align-items:center;justify-content:center}
  .m-wcheck::after{content:'';width:38%;height:60%;border-right:calc(.32 * var(--hbcq-w)) solid #eafff0;border-right:.32cqw solid #eafff0;border-bottom:calc(.32 * var(--hbcq-w)) solid #eafff0;border-bottom:.32cqw solid #eafff0;
    transform:rotate(40deg) translate(-8%,-12%)}
  .m-galtar-wname{font-family:'Cinzel',serif;font-weight:800;font-size:calc(1.85 * var(--hbcq-w));font-size:1.85cqw;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* The row for the weapon actually in the hero's hands — it leads the list and says so, because
     levelling the wrong weapon is invisible until a quest refuses to move (see gem-altar.js). */
  .m-galtar-wrow.eq{box-shadow:inset 0 0 0 1px #6ad39a77;background:rgba(18,38,28,.55)}
  .m-galtar-wrow.eq.sel{box-shadow:inset 0 0 0 2px #ffd98a;background:rgba(60,45,15,.5)}
  /* ONE badge for every list that marks the held weapon — the Gem Altar and the Forge both use it.
     Was .m-galtar-weq until 2026-09-16; renamed rather than copied into the Forge's own stylesheet,
     because two identical rules under two names is how .m-craft-wrow and .m-galtar-wrow already
     drifted. Lives here, in popups.css, which is loaded on the same page as the Forge. */
  .m-eq-badge{margin-left:calc(.6 * var(--hbcq-w));margin-left:.6cqw;padding:calc(.1 * var(--hbcq-h)) calc(.5 * var(--hbcq-w));padding:.1cqh .5cqw;border-radius:calc(.5 * var(--hbcq-w));border-radius:.5cqw;vertical-align:middle;
    font-family:system-ui,sans-serif;font-size:calc(1.15 * var(--hbcq-w));font-size:1.15cqw;font-weight:700;letter-spacing:.04em;
    color:#0d2419;background:#6ad39a}
  .m-galtar-eqwarn{flex:none;margin-bottom:calc(.6 * var(--hbcq-h));margin-bottom:.6cqh;padding:calc(.7 * var(--hbcq-h)) calc(.8 * var(--hbcq-w));padding:.7cqh .8cqw;border-radius:calc(.9 * var(--hbcq-w));border-radius:.9cqw;
    background:rgba(60,30,20,.55);box-shadow:inset 0 0 0 1px #d3866a55;
    color:#ffb99a;font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;line-height:1.45}
  .m-galtar-wlvl{font-size:calc(1.55 * var(--hbcq-w));font-size:1.55cqw;color:#ffd98a;font-weight:800;letter-spacing:.03em}
  .m-galtar-wlvl.off{color:#8a7ab0;font-weight:400}
  .m-galtar-welem{flex:none;width:calc(2.4 * var(--hbcq-w));width:2.4cqw;height:calc(2.4 * var(--hbcq-w));height:2.4cqw;object-fit:contain}
  .m-galtar-empty{color:#8a93ad;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;padding:calc(2 * var(--hbcq-w));padding:2cqw;text-align:center;line-height:1.6;margin:auto}

  /* RIGHT — the selected weapon's NOW / AFTER passive detail */
  .m-galtar-right{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;
    background:rgba(15,10,28,.4);border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw;box-shadow:inset 0 0 0 1px #3a2c6055;
    padding:calc(1.6 * var(--hbcq-h)) calc(1.6 * var(--hbcq-w));padding:1.6cqh 1.6cqw;overflow-y:auto}
  .m-galtar-dhead{flex:none;display:flex;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;margin-bottom:calc(1.2 * var(--hbcq-h));margin-bottom:1.2cqh}
  .m-galtar-dgem{width:calc(5 * var(--hbcq-w));width:5cqw;height:calc(5 * var(--hbcq-w));height:5cqw;object-fit:contain;filter:drop-shadow(0 3px 8px rgba(0,0,0,.7))}
  .m-galtar-dname{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;color:#f0d78f;text-transform:uppercase}
  .m-galtar-dlvl{font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#c0a0f0;font-weight:700}
  .m-galtar-stage{flex:none;border:1px solid #3a2860;border-radius:calc(.9 * var(--hbcq-w));border-radius:.9cqw;padding:calc(1.1 * var(--hbcq-h)) calc(1.2 * var(--hbcq-w));padding:1.1cqh 1.2cqw;margin-bottom:calc(1.1 * var(--hbcq-h));margin-bottom:1.1cqh;
    background:linear-gradient(180deg,rgba(46,36,86,.5),rgba(30,24,62,.5))}
  .m-galtar-stage-lbl{font-family:'Cinzel',serif;font-weight:800;letter-spacing:.08em;font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;
    color:#8a93ad;text-transform:uppercase;margin-bottom:calc(.3 * var(--hbcq-h));margin-bottom:.3cqh}
  .m-galtar-stage-main{font-family:'Cinzel',serif;font-weight:800;font-size:calc(2.05 * var(--hbcq-w));font-size:2.05cqw;color:#fff;margin-bottom:calc(.2 * var(--hbcq-h));margin-bottom:.2cqh}
  .m-galtar-stage-main.dim{color:#8a7ab0;font-weight:600}
  .m-galtar-stage-sub{font-size:calc(1.55 * var(--hbcq-w));font-size:1.55cqw;color:#c0a0f0;line-height:1.4}
  .m-galtar-stage.next .m-galtar-stage-main{color:#7ee29a}
  .m-galtar-mastery{flex:none;font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;color:#ffd98a;font-style:italic;margin-bottom:calc(.6 * var(--hbcq-h));margin-bottom:.6cqh}
  /* Bottom action row -- same shape as the Forge's Imbue bar (.m-craft-bottombar/.m-craft-bb-item
     in lobby.html): a hairline divider, a couple of label/value stats, then the action button
     sharing the row (flex:1 on the button itself, set inline, exactly like .m-craft-imbue). */
  .m-galtar-bottombar{flex:none;display:flex;align-items:center;gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw;margin-top:auto;
    padding-top:calc(1 * var(--hbcq-h));padding-top:1cqh;border-top:1px solid #3a2c6055}
  .m-galtar-bb-item{flex:none;display:flex;flex-direction:column;align-items:flex-start;gap:calc(.15 * var(--hbcq-h));gap:.15cqh}
  .m-galtar-bb-item .lbl{font-family:'Cinzel',serif;font-weight:800;letter-spacing:.05em;font-size:calc(1.2 * var(--hbcq-w));font-size:1.2cqw;
    color:#8a93ad;text-transform:uppercase}
  .m-galtar-bb-item .val{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#f0e4c0;
    display:flex;align-items:center;gap:calc(.3 * var(--hbcq-w));gap:.3cqw}
  .m-galtar-bb-item .val.good{color:#7ee29a}
  .m-galtar-bb-item .val.poor{color:#ff8a75}
  /* The ad was watched for this level (2026-09-27) — the forge's own look, sized for this window. */
  .m-galtar-bb-item .val.boosted{color:#9dffb4;text-shadow:0 0 calc(.6 * var(--hbcq-w)) #3dff7a88;text-shadow:0 0 .6cqw #3dff7a88}
  .m-galtar-bottombar .m-craft-adboost{font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;padding:calc(.5 * var(--hbcq-h)) calc(.8 * var(--hbcq-w));padding:.5cqh .8cqw}
  .m-galtar-bottombar .m-craft-adboost img{width:calc(2.4 * var(--hbcq-w));width:2.4cqw}
  .m-galtar-bb-item .val img{width:calc(1.4 * var(--hbcq-w));width:1.4cqw;height:calc(1.4 * var(--hbcq-w));height:1.4cqw;object-fit:contain}
  .m-galtar-bb-item .val .have{font-size:.85em;color:#8a93ad;font-weight:700}
  /* BIGGER (Roman, 2026-09-27, at the altar: "make the Upgrade button bigger") — 16cqw from 11. */
  .m-galtar-actbtn{flex:none;position:relative;width:calc(16 * var(--hbcq-w));width:16cqw;aspect-ratio:723/202;margin-left:auto;
    border:none;padding:0;cursor:pointer;background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.06em;font-size:calc(1.8 * var(--hbcq-w));font-size:1.8cqw;color:#3a1c08;
    text-transform:uppercase;display:flex;align-items:center;justify-content:center}
  .m-galtar-actbtn:disabled{opacity:.45;cursor:default;filter:grayscale(.5)}
  .m-galtar-actbtn:not(:disabled):hover{filter:brightness(1.1)}

  /* ═══════ Quest popup v2 (PROTOTYPE) — tmp/six elements/task art ═══════
     Portrait card (607x909). Region boundaries below are MEASURED off frame.webp (PowerShell
     pixel-sampled the vertical center + two horizontal rows, not eyeballed): wood banner ends /
     navy body starts at y=120px (13.2cqh), body ends / footer divider starts at y=768 (84.5cqh),
     footer strip runs 87.8-97.7cqh, and the navy area's usable left/right inner edge is ~4.5% in
     on both the body row (y=400) and the footer row (y=840). Keep everything inside those bands.
     cqw and cqh are a FIXED ratio here (909/607) since .m-quest2-land is aspect-ratio-locked, so
     the row-list math below mixes both freely without them ever drifting apart. */
  /* NOT background:none here -- #quest2-modal .m-look-modal (id+class) out-specifies the plain
     .m-quest2-land{background:url(frame.webp)} (class-only) below, so it was silently winning and
     blanking the frame out entirely. Only strip the base .m-look-modal chrome that .m-quest2-land
     doesn't already redeclare itself (border/padding/shadow) -- leave background alone. */
  #quest2-modal .m-look-modal{border:none;border-radius:0;padding:0;box-shadow:none;overflow:visible}
  /* Shared .m-look-overlay (hero-port.css) sets 16px -- scoped down here so every OTHER popup on
     that same class keeps its normal margin; only quest2 wants to run edge-to-edge. */
  #quest2-modal{padding:2px}
  .m-quest2-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    height:min(900px,98vh,calc(54vw*909/607));aspect-ratio:607/750;
    max-width:none;max-height:none;width:auto;display:block;padding:0;overflow:visible;
    background:url('heropopup/quest2/frame.webp') center/100% 100% no-repeat}
  .m-quest2-close{position:absolute;top:calc(-0.2 * var(--hbcq-h));top:-0.2cqh;right:calc(-2.6 * var(--hbcq-h));right:-2.6cqh;width:calc(8.4 * var(--hbcq-h));width:8.4cqh;height:auto;aspect-ratio:1;z-index:4;
    padding:0;border:none;border-radius:0;box-shadow:none;font-size:0;cursor:pointer;
    background:url('heropopup/close.webp') center/contain no-repeat}
  .m-quest2-close:hover{filter:brightness(1.12)}
  .m-quest2-title{position:absolute;left:16%;right:16%;top:calc(2.5 * var(--hbcq-h));top:2.5cqh;height:calc(10.2 * var(--hbcq-h));height:10.2cqh;z-index:2;
    display:flex;align-items:center;justify-content:center;text-align:center;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.06em;font-size:calc(4.3 * var(--hbcq-h));font-size:4.3cqh;color:#fff;
    text-shadow:0 1px 3px rgba(0,0,0,.8)}
  /* body band: 13.2cqh-84.5cqh measured; inset slightly so rows never touch the border. Scrollbar
     hidden entirely (not just thinned) -- a touch UI reads "content keeps going" from the row just
     getting cut off at the edge, a visible scrollbar was just extra chrome. */
  .m-quest2-body{position:absolute;left:5.6%;right:6.6%;top:calc(14 * var(--hbcq-h));top:14cqh;bottom:calc(16 * var(--hbcq-h));bottom:16cqh;z-index:2;
    overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
  .m-quest2-body::-webkit-scrollbar{display:none}
  .m-quest2-empty{text-align:center;color:#8fa0c0;font-family:'Cinzel',serif;font-size:calc(4 * var(--hbcq-h));font-size:4cqh;padding:calc(4 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:4cqh 1cqw}
  /* Two columns: a fixed-width node/line timeline on the left, task bars filling the rest.
     Node-slot height is HARDCODED (not aspect-ratio) to exactly match the row's own
     aspect-ratio-derived height at ITS width (78cqw here) -- aspect-ratio on the slim node
     column would give a totally different (much shorter) height than the wide row column, so
     matching them requires one to give up aspect-ratio and just state the number. */
  .m-quest2-list{display:flex;gap:calc(3 * var(--hbcq-w));gap:3cqw}
  .m-quest2-nodecol{flex:none;width:calc(10 * var(--hbcq-w));width:10cqw;position:relative}
  .m-quest2-lineglow{position:absolute;left:50%;top:9%;width:calc(.6 * var(--hbcq-w));width:.6cqw;transform:translateX(-50%);
    background:linear-gradient(180deg,#c8ffb0,#5ad02a);border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh;
    box-shadow:0 0 calc(1.4 * var(--hbcq-w)) rgba(140,255,90,.9);box-shadow:0 0 1.4cqw rgba(140,255,90,.9);z-index:0}
  .m-quest2-linedim{position:absolute;left:50%;top:9%;bottom:9%;width:calc(.5 * var(--hbcq-w));width:.5cqw;transform:translateX(-50%);
    background:rgba(255,255,255,.14);border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh;z-index:-1}
  .m-quest2-nodeslot{position:relative;height:calc(19.43 * var(--hbcq-w));height:19.43cqw;margin-bottom:calc(1 * var(--hbcq-w));margin-bottom:1cqw;display:flex;align-items:center;justify-content:center}
  /* Text color is white everywhere in this popup regardless of row/node state (was dark-brown on
     gold/green, light-gray on locked -- inconsistent, and the user's flagged standing rule is one
     text color per popup, not one-per-background). Shadow strength is what carries contrast now. */
  .m-quest2-node{position:relative;z-index:1;width:66%;aspect-ratio:1;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-h));font-size:3.6cqh;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.85);
    background:radial-gradient(ellipse at 50% 32%,#eafff0,#3ba848);
    box-shadow:0 0 calc(.9 * var(--hbcq-w)) rgba(140,255,90,.75),inset 0 0 0 calc(.15 * var(--hbcq-h)) rgba(0,0,0,.3);box-shadow:0 0 .9cqw rgba(140,255,90,.75),inset 0 0 0 .15cqh rgba(0,0,0,.3)}
  .m-quest2-node.current{background:radial-gradient(ellipse at 50% 32%,#fff3c0,#e0a020);
    box-shadow:0 0 calc(1.2 * var(--hbcq-w)) rgba(255,210,90,.95),inset 0 0 0 calc(.15 * var(--hbcq-h)) rgba(0,0,0,.3);box-shadow:0 0 1.2cqw rgba(255,210,90,.95),inset 0 0 0 .15cqh rgba(0,0,0,.3)}
  .m-quest2-node.locked{background:radial-gradient(ellipse at 50% 32%,#9aa7b6,#4c5560);
    box-shadow:inset 0 0 0 calc(.15 * var(--hbcq-h)) rgba(0,0,0,.3);box-shadow:inset 0 0 0 .15cqh rgba(0,0,0,.3)}
  .m-quest2-node img{width:58%;height:58%;object-fit:contain}
  .m-quest2-rowcol{flex:1;min-width:0}
  .m-quest2-row{position:relative;width:100%;height:calc(19.43 * var(--hbcq-w));height:19.43cqw;margin-bottom:calc(1 * var(--hbcq-w));margin-bottom:1cqw;
    background:center/100% 100% no-repeat;display:flex;align-items:center;padding:0 4%}
  .m-quest2-row.done{background-image:url('heropopup/quest2/task_done.webp')}
  .m-quest2-row.current{background-image:url('heropopup/quest2/current_task.webp')}
  .m-quest2-row.locked{background-image:url('heropopup/quest2/task_not_ready.webp')}
  /* Icon (left) / text+progress stacked (middle) / reward (right, absolute -- see .m-quest2-rw)
     -- matches the reference: a picture identifying the task, not just a number. */
  .m-quest2-icon{flex:none;width:16%;aspect-ratio:1;margin-right:2.5%;display:flex;
    align-items:center;justify-content:center;font-size:calc(3.4 * var(--hbcq-h));font-size:3.4cqh;line-height:1;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.55))}
  /* Monster portrait in place of the emoji. contain, not cover: the art runs 155x159 to
     400x398 and cropping a square out of a wide salamander cuts its head off. */
  .m-quest2-mon{width:100%;height:100%;object-fit:contain}
  .m-quest2-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(.5 * var(--hbcq-h));gap:.5cqh;padding-right:19%}
  .m-quest2-lbl{font-family:'Cinzel',serif;font-weight:800;font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;color:#fff;
    white-space:normal;line-height:1.15;text-shadow:0 1px 3px rgba(0,0,0,.85)}
  .m-quest2-bar{position:relative;width:78%;height:calc(3.2 * var(--hbcq-w));height:3.2cqw;border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh;background:rgba(0,0,0,.32);
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.25);overflow:hidden}
  .m-quest2-barfill{position:absolute;inset:0 auto 0 0;background:linear-gradient(180deg,#ffdb7a,#e8971f);border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh}
  .m-quest2-barlbl{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;font-weight:800;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.7)}
  /* Single reward (gold/crystal/chest): column, icon THEN number (see _quest2RewardHtml -- the
     img now comes before the span in the markup), so the count always sits under the image, never
     beside it. */
  .m-quest2-rw{position:absolute;right:3.6%;top:50%;transform:translateY(-50%);width:16%;aspect-ratio:1;
    display:flex;align-items:center;justify-content:center;flex-direction:column;flex-wrap:nowrap;gap:calc(.2 * var(--hbcq-w));gap:.2cqw}
  .m-quest2-rw .m-quest2-rwicon{width:68%;height:68%;object-fit:contain;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
  /* Multiple reward icons (the "element" quest -- a random gem, shown as a few sample gem icons)
     side by side instead of stacked, and shrunk so 3 of them actually fit the slot. */
  .m-quest2-rw.multi{flex-direction:row}
  .m-quest2-rw.multi .m-quest2-rwicon{width:30%;height:30%}
  .m-quest2-rw .m-quest2-rwtxt{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.7)}
  /* footer band: 87.8-97.7cqh measured, same 4.5% left/right inner edge as the body */
  .m-quest2-navbar{position:absolute;left:4.6%;right:4.6%;top:calc(87.3 * var(--hbcq-h));top:87.3cqh;bottom:calc(2.2 * var(--hbcq-h));bottom:2.2cqh;z-index:2;
    display:flex;align-items:center;justify-content:space-between;gap:2%}
  .m-quest2-navbtn{flex:1;position:relative;height:82%;border:none;padding:0;cursor:pointer;
    background:url('heropopup/quest2/button_nav.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:800;letter-spacing:.04em;font-size:calc(3.8 * var(--hbcq-h));font-size:3.8cqh;color:#c8d6ea;
    text-shadow:0 1px 2px rgba(0,0,0,.6)}
  .m-quest2-navbtn.active{background-image:url('heropopup/quest2/button_nav_selected.webp');color:#3a2408;
    text-shadow:0 1px 1px rgba(255,220,150,.5)}
  .m-quest2-navbtn:active{transform:scale(.96)}
  /* THE SIDE QUESTS TAB (Roman, 2026-11-14: "it goes out of its button — a bit smaller, less space between the words"): its two
     lines a size under the other tabs, set tight; popups.js titleFit's fitTab shrinks any tab word wider than its button. */
  .m-quest2-navbtn[data-tab="side"]{font-size:calc(3.3 * var(--hbcq-h));font-size:3.3cqh;line-height:.96;letter-spacing:.01em;word-spacing:-.12em;padding:0 calc(1.8 * var(--hbcq-w));padding:0 1.8cqw}
  /* THE DAILY TAB'S "!" (2026-11-11): a daily waits for its CLAIM — the painted notice on the tab's top-right corner, sized by the
     tab's HEIGHT (the tab is wide; the button rule's 34% of its width would be huge). */
  .m-quest2-navbtn .m-notice{width:auto;height:72%;right:-3%;bottom:58%}

  /* ═══════ Daily/Weekly tab — daily_timer.webp + progress_empty.webp ═══════
     Text-slot / track bounds below are PowerShell pixel-sampled off each PNG (same method as the
     main frame), not eyeballed. */
  .m-quest2-timer{position:relative;width:92%;aspect-ratio:1030/228;margin:0 auto calc(1.6 * var(--hbcq-w));margin:0 auto 1.6cqw;
    background:url('heropopup/quest2/daily_timer.webp') center/100% 100% no-repeat}
  /* dark text-slot measured at x=330-735 of 923 (35.7%-79.6%) */
  .m-quest2-timertext{position:absolute;left:36%;right:20.5%;top:0;bottom:0;
    display:flex;align-items:center;justify-content:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;color:#fff;
    text-shadow:0 1px 3px rgba(0,0,0,.85);letter-spacing:.04em}
  .m-quest2-progresswrap{position:relative;width:98%;aspect-ratio:1186/177;margin:0 auto calc(2.2 * var(--hbcq-w));margin:0 auto 2.2cqw;
    background:url('heropopup/quest2/progress_empty.webp') center/100% 100% no-repeat}
  /* transparent track measured at x=206-1086 (17.4%-91.6%), y=89-129 of 177 (50.3%-72.9%) */
  .m-quest2-progresstrack{position:absolute;left:17.4%;right:8.4%;top:50.3%;bottom:27.1%;
    border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh;background:rgba(30,18,10,.6);box-shadow:inset 0 0 0 1px rgba(0,0,0,.3);overflow:hidden}
  .m-quest2-progressfill{position:absolute;inset:0 auto 0 0;border-radius:calc(1 * var(--hbcq-h));border-radius:1cqh;
    background:linear-gradient(180deg,#fff3b0,#ffb020);box-shadow:0 0 calc(.8 * var(--hbcq-w)) rgba(255,200,80,.85);box-shadow:0 0 .8cqw rgba(255,200,80,.85)}
  .m-quest2-progresstext{position:absolute;left:17.7%;right:8.9%;top:8px;bottom:0;z-index:2;
    display:flex;align-items:center;justify-content:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.7 * var(--hbcq-w));font-size:3.7cqw;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.8)}
  /* Flat row list -- same task-row art as Main, no node/line column (daily/weekly have no fixed
     unlock sequence to show), plain stacked block children instead of the two-column flex list. */
  .m-quest2-flatlist{display:flex;flex-direction:column}


  /* (dev) quest skip — deliberately plain and ugly so it never reads as shipped UI. */
  .m-quest2-devskip{display:block;width:100%;margin-top:calc(1.2 * var(--hbcq-h));margin-top:1.2cqh;padding:calc(1 * var(--hbcq-h)) 0;padding:1cqh 0;font-family:monospace;
    font-size:calc(3 * var(--hbcq-w));font-size:3cqw;letter-spacing:.5px;color:#ffd9a0;background:#3a2a12;border:1px dashed #b98a3a;
    border-radius:calc(.6 * var(--hbcq-h));border-radius:.6cqh;cursor:pointer}
  .m-quest2-devskip:disabled{opacity:.6;cursor:default}

  /* ═══════ THE DAILY BAR'S PRIZE (2026-09-24) — the helmet became a crystal ═══════
     progress_crystal.webp is progress_empty.webp with a crystal medallion (same 1186x177, same track
     bounds), and the amount is HTML so it is always the server's number (dailyBonusCrystals). */
  .m-quest2-progresswrap.crystal{background-image:url('heropopup/quest2/progress_crystal.webp')}
  .m-quest2-bonus{position:absolute;left:4.2%;width:13.5%;bottom:4%;z-index:3;text-align:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#fff;
    text-shadow:0 0 calc(.4 * var(--hbcq-w)) #000,0 1px 2px #000,0 0 calc(1 * var(--hbcq-w)) rgba(80,170,255,.8);text-shadow:0 0 .4cqw #000,0 1px 2px #000,0 0 1cqw rgba(80,170,255,.8)}
  .m-quest2-bonus.paid{color:#9dffa0}
  /* THE DAILY CLAIM (2026-11-10, Skull Hero's green tab): on a finished, unpaid daily, and on the bar once every daily is done */
  .m-quest2-claim{display:block;margin:calc(.6 * var(--hbcq-w)) auto 0;margin:.6cqw auto 0;border:none;cursor:pointer;padding:calc(.9 * var(--hbcq-w)) calc(2.2 * var(--hbcq-w));padding:.9cqw 2.2cqw;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;
    font-family:inherit;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#fff;background:linear-gradient(#7de06a,#3fa53a);
    text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #0008;text-shadow:0 .2cqw .3cqw #0008;box-shadow:0 calc(.4 * var(--hbcq-w)) 0 #1f6a1c;box-shadow:0 .4cqw 0 #1f6a1c;animation:mQ2Claim 1.1s ease-in-out infinite}
  .m-quest2-claim[disabled]{filter:grayscale(.8);animation:none;cursor:default}
  /* CLAIM ABOVE ITS REWARD, every quest row (Roman, 2026-11-21): the button first, then the reward in its own group — stacked
     for one, side by side for two (the boss's gold + crystals, a weekly's) — so a CLAIM is never to the right of or under it */
  .m-quest2-rw .m-quest2-claim{margin:0 auto calc(.3 * var(--hbcq-w));margin:0 auto .3cqw;padding:calc(.55 * var(--hbcq-w)) calc(1.8 * var(--hbcq-w));padding:.55cqw 1.8cqw;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw}
  .m-quest2-rwset .m-quest2-rwtxt{font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;line-height:1}
  .m-quest2-rwset{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:calc(.2 * var(--hbcq-w));gap:.2cqw;width:100%}
  /* two rewards = two lines under CLAIM (picture + number each): side by side they were wider than the box */
  .m-quest2-rwset.multi{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;column-gap:calc(.5 * var(--hbcq-w));column-gap:.5cqw;row-gap:calc(.1 * var(--hbcq-w));row-gap:.1cqw}
  .m-quest2-rwset.multi .m-quest2-rwicon{width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw}
  .m-quest2-rwset.multi .m-quest2-rwtxt{font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw}
  /* one reward under CLAIM: a smaller picture, so its number stays inside the box */
  .m-quest2-rwset:not(.multi) .m-quest2-rwicon{width:46%;height:auto}
  .m-quest2-claim.bonus{position:absolute;left:1.5%;bottom:6%;z-index:4;margin:0;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;padding:calc(.8 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:.8cqw 1.6cqw}
  @keyframes mQ2Claim{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
  @media (prefers-reduced-motion:reduce){.m-quest2-claim{animation:none}}
  /* SIDE QUESTS (2026-11-13, side-quests.js): the line over the chain (where / how to get there), and the Battle Pass's small
     lock on a step not reached yet */
  .m-sq-head{text-align:center;font-family:'Cinzel',serif;font-weight:700;font-size:calc(2.3 * var(--hbcq-w));font-size:2.3cqw;color:#ffe9b0;
    text-shadow:0 1px 2px #000c;padding:calc(.4 * var(--hbcq-h)) calc(2 * var(--hbcq-w)) calc(1 * var(--hbcq-h));padding:.4cqh 2cqw 1cqh}
  /* The lock is pinned to the reward's corner: .m-quest2-rw is ALREADY position:absolute (on the row art's green box). A
     `.m-quest2-rw{position:relative}` added here on 2026-11-13 for this lock un-pinned EVERY quest reward — main, daily
     and side — into the row's flow, left of and below its box (Roman, 2026-11-14). Never re-position .m-quest2-rw. */
  .m-sq-lock{position:absolute;top:calc(-1.1 * var(--hbcq-w));top:-1.1cqw;right:calc(-1.1 * var(--hbcq-w));right:-1.1cqw;width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;background:url('lock_navy.webp') center/contain no-repeat;
    filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}
  /* THE WEAPON PICK of a step that pays +N damage (2026-11-24, side-quests.js _sqPickHtml): the CLAIM button's place, three weapons. */
  .m-sq-pick{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;max-width:100%}
  .m-sq-pick i{flex-basis:100%;text-align:center;font-style:normal;font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;line-height:1.1;color:#ffe9a8;
    text-shadow:0 calc(.25 * var(--hbcq-w)) 0 #1a1020;text-shadow:0 .25cqw 0 #1a1020}
  .m-sq-pick button{width:calc(6.2 * var(--hbcq-w));width:6.2cqw;height:calc(6.2 * var(--hbcq-w));height:6.2cqw;padding:calc(.5 * var(--hbcq-w));padding:.5cqw;border:none;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;cursor:pointer;
    background:#0c2448;box-shadow:inset 0 0 0 calc(.35 * var(--hbcq-w)) #c8902e,0 calc(.35 * var(--hbcq-w)) 0 #0008;box-shadow:inset 0 0 0 .35cqw #c8902e,0 .35cqw 0 #0008}
  .m-sq-pick button:active{transform:translateY(calc(.2 * var(--hbcq-w)));transform:translateY(.2cqw)}
  .m-sq-pick button img{width:100%;height:100%;object-fit:contain;display:block}
  /* THE SIDE-QUEST MAP (2026-11-21): four islands on a dotted path above the steps — the theme's lock (lock_navy) on a waiting or
     coming-soon island, the journey's check on a finished one, a glow on the one he plays, a gold ring on the one shown. */
  .m-sq-map{display:flex;align-items:flex-start;justify-content:center;padding:calc(.6 * var(--hbcq-h)) calc(2 * var(--hbcq-w)) calc(.2 * var(--hbcq-h));padding:.6cqh 2cqw .2cqh}
  .m-sq-stop{position:relative;flex:0 1 calc(18 * var(--hbcq-w));flex:0 1 18cqw;min-width:0;display:flex;flex-direction:column;align-items:center;background:none;border:0;
    padding:0;margin:0;cursor:pointer;color:#ffe9b0;font:inherit}
  .m-sq-isle{position:relative;display:block;width:100%;aspect-ratio:3/2;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;background:center/cover no-repeat;
    border:calc(.3 * var(--hbcq-w)) solid #a77b35;border:.3cqw solid #a77b35;box-shadow:0 calc(.3 * var(--hbcq-w)) calc(.6 * var(--hbcq-w)) rgba(0,0,0,.5);box-shadow:0 .3cqw .6cqw rgba(0,0,0,.5)}
  .m-sq-stop.sel .m-sq-isle{border-color:#ffe08a}
  .m-sq-stop.current .m-sq-isle{animation:m-sq-glow 1.6s ease-in-out infinite}
  @keyframes m-sq-glow{0%,100%{box-shadow:0 0 calc(.5 * var(--hbcq-w)) #ffd76a;box-shadow:0 0 .5cqw #ffd76a}50%{box-shadow:0 0 calc(1.8 * var(--hbcq-w)) #ffe9a8;box-shadow:0 0 1.8cqw #ffe9a8}}
  .m-sq-stop.waiting .m-sq-isle,.m-sq-stop.soon .m-sq-isle{filter:grayscale(.7) brightness(.72)}
  .m-sq-name{display:block;max-width:100%;font-family:'Cinzel',serif;font-weight:700;font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;line-height:1.1;margin-top:calc(.4 * var(--hbcq-h));margin-top:.4cqh;
    text-align:center;text-shadow:0 1px 2px #000c;overflow-wrap:anywhere}
  .m-sq-line{display:block;max-width:100%;font-size:calc(1.25 * var(--hbcq-w));font-size:1.25cqw;line-height:1.1;color:#e9dcb6;text-align:center;text-shadow:0 1px 2px #000c}
  .m-sq-tick,.m-sq-maplock{position:absolute;top:calc(-1 * var(--hbcq-w));top:-1cqw;right:calc(-1 * var(--hbcq-w));right:-1cqw;width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw;background:center/contain no-repeat;
    filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .3cqw .3cqw rgba(0,0,0,.55))}
  .m-sq-tick{background-image:url('heropopup/journey_checkmark.webp')}
  .m-sq-maplock{background-image:url('lock_navy.webp')}
  .m-sq-path{flex:0 0 calc(1.6 * var(--hbcq-w));flex:0 0 1.6cqw;align-self:flex-start;margin-top:calc(5.6 * var(--hbcq-w));margin-top:5.6cqw;border-top:calc(.35 * var(--hbcq-w)) dotted #e8c47a;border-top:.35cqw dotted #e8c47a;opacity:.85}
  /* PAST FIVE PLACES THE ROW SLIDES (2026-11-21, side-quests.js _sqMapFit): every place in a track that scrolls sideways, five in
     view (their width is MEASURED and set there), no bar. The track clips, so it keeps room for what pokes out of a place — the
     tick / lock in its corner (the edges, top) and the glow (top, bottom). Up to five places none of this is drawn. */
  .m-sq-map.carousel{display:block}
  .m-sq-track{position:relative;display:flex;align-items:flex-start;overflow-x:auto;overflow-y:hidden;padding:calc(1.9 * var(--hbcq-w)) 0 calc(1 * var(--hbcq-w));padding:1.9cqw 0 1cqw;
    scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;scroll-padding:0 calc(1.6 * var(--hbcq-w));scroll-padding:0 1.6cqw}
  .m-sq-track::-webkit-scrollbar{display:none}
  .m-sq-track .m-sq-stop{flex:0 0 calc(17 * var(--hbcq-w));flex:0 0 17cqw;scroll-snap-align:start}
  .m-sq-edge{flex:0 0 calc(1.6 * var(--hbcq-w));flex:0 0 1.6cqw;height:1px}
  /* the corner tick / lock tucked in: out at the right it reached past the gap into view from the place just off the left edge
     (both layouts — the id + html out-rank portrait.css's own corner rule) */
  html #quest2-modal .m-sq-map .m-sq-track .m-sq-tick,html #quest2-modal .m-sq-map .m-sq-track .m-sq-maplock{right:calc(-.3 * var(--hbcq-w));right:-.3cqw}

  /* ═══════ THE QUEST LOG'S ARENA TAB (2026-09-24) — the helmet IS Arena points ═══════ */
  .m-quest2-progresswrap.arena .m-quest2-arenatext{position:absolute;left:17.7%;right:8.9%;top:44%;bottom:22%;z-index:2;
    display:flex;align-items:center;justify-content:center;gap:calc(2 * var(--hbcq-w));gap:2cqw;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}
  .m-quest2-arenatext .place{color:#ffd66e}
  .m-quest2-sechead{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#f0d78f;
    letter-spacing:.05em;text-transform:uppercase;margin:calc(1.4 * var(--hbcq-h)) 0 calc(.6 * var(--hbcq-h)) calc(1 * var(--hbcq-w));margin:1.4cqh 0 .6cqh 1cqw;text-shadow:0 1px 2px #000a}
  .m-quest2-locked{padding:calc(6 * var(--hbcq-h)) calc(4 * var(--hbcq-w));padding:6cqh 4cqw;text-align:center;font-family:'Cinzel',serif;font-weight:800;
    font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;line-height:1.5;color:#e8dcc0;text-shadow:0 1px 2px #000a}
  .m-quest2-rw .m-quest2-rwtxt.tier{font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw}
  /* The balance the Arena Merchant takes (2026-11-03), under the week's line. */
  .m-quest2-arenabal{display:flex;align-items:center;justify-content:center;gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw;margin:calc(.6 * var(--hbcq-h)) 0 calc(.2 * var(--hbcq-h));margin:.6cqh 0 .2cqh;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#ffe9a8;text-shadow:0 1px 2px #000c}
  .m-quest2-arenabal img{width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:auto}

  /* ═══════ THE ARENA WINDOW (2026-09-24) ═══════
     Leaf-corner frame (heropopup/stash/big_frame.webp, 1125x680) — a placeholder for Roman's own art,
     so the structure is plain columns that a reskin can restyle without touching arena.js. Two since 2026-11-07:
     the hero and the middle (the Wall of Fame column went with the Arena leaderboard). */
  .m-arena-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    width:min(900px,98vw,calc(92vh*1125/680));aspect-ratio:1125/680;
    max-width:none;max-height:none;height:auto;padding:0;overflow:visible;
    background:url('heropopup/stash/big_frame.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:0 26px 80px #000d;color:#fff}
  .m-arena-close{position:absolute;top:calc(1.4 * var(--hbcq-w));top:1.4cqw;right:calc(1.4 * var(--hbcq-w));right:1.4cqw;width:calc(9.8 * var(--hbcq-h));width:9.8cqh;height:auto;aspect-ratio:1;
    z-index:4;padding:0;border:none;font-size:0;cursor:pointer;color:transparent;
    background:url('heropopup/close.webp') center/contain no-repeat}
  .m-arena-title{position:absolute;top:calc(7 * var(--hbcq-h));top:7cqh;left:0;right:0;text-align:center;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.08em;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#f0d78f;
    text-shadow:0 2px 4px #000b,0 0 calc(1.2 * var(--hbcq-w)) #ffd98a44;text-shadow:0 2px 4px #000b,0 0 1.2cqw #ffd98a44}
  .m-arena-cols{position:absolute;left:calc(4.5 * var(--hbcq-w));left:4.5cqw;right:calc(4.5 * var(--hbcq-w));right:4.5cqw;top:calc(16 * var(--hbcq-h));top:16cqh;bottom:calc(6 * var(--hbcq-h));bottom:6cqh;
    display:grid;grid-template-columns:38% 1fr;gap:calc(3 * var(--hbcq-w));gap:3cqw}
  .m-arena-left{position:relative;min-height:0}
  .m-arena-hero{position:absolute;inset:0}
  .m-arena-hero .m-char-preview{position:absolute;inset:0}
  .m-arena-hero img.m-prev-layer{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
  /* THE LIVE VIEWER NEEDS A SIZE OF ITS OWN (2026-10-25). _mountHeroInto puts the 3D holder straight into this box —
     no .m-char-preview around it, so hero-port.css's holder rules never matched: a static block as tall as its
     canvas, which the viewer's ResizeObserver then re-sized from the canvas — doubling to 67,108,864 px (measured at
     412x915). Hidden while the home podium had already rendered the hero (the snapshot path); with no lobby home for
     players since 2026-10-22, the Arena NPC's window takes the live path. */
  .m-arena-hero .hb3d-holder{position:absolute;inset:0}
  .m-arena-hero .hb3d-holder canvas{display:block;width:100%;height:100%;touch-action:none}
  .m-arena-mid{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:calc(1.6 * var(--hbcq-h));gap:1.6cqh;min-height:0}
  .m-arena-score{display:flex;align-items:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;margin-top:calc(1 * var(--hbcq-h));margin-top:1cqh}
  .m-arena-helmet{width:calc(9 * var(--hbcq-w));width:9cqw;height:auto}
  .m-arena-pts{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;line-height:1.05;text-shadow:0 2px 3px #000c}
  .m-arena-ptslbl{font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#e8dcc0}
  .m-arena-hint{font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#c7bfe0;margin-top:calc(.4 * var(--hbcq-h));margin-top:.4cqh}
  .m-arena-enter{width:64%;aspect-ratio:723/202;border:none;padding:0;cursor:pointer;
    background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.06em;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;color:#3a1c08;
    display:flex;align-items:center;justify-content:center}
  .m-arena-enter:hover{filter:brightness(1.1)}
  .m-arena-enter:active{transform:scale(.97)}
  .m-arena-how{width:100%;display:flex;flex-direction:column;gap:calc(.6 * var(--hbcq-h));gap:.6cqh}
  .m-arena-howrow{display:flex;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:calc(.5 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:.5cqh 1cqw;border-radius:calc(.8 * var(--hbcq-w));border-radius:.8cqw;background:rgba(10,20,40,.45)}
  .m-arena-howrow img{width:calc(3.6 * var(--hbcq-w));width:3.6cqw;height:calc(3.6 * var(--hbcq-w));height:3.6cqw;object-fit:contain;flex:none}
  .m-arena-howrow .lbl{flex:1;font-size:calc(1.65 * var(--hbcq-w));font-size:1.65cqw;color:#e8dcc0;line-height:1.2}
  .m-arena-howrow .val{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#ffd66e}
  .m-arena-reset{font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#c7bfe0;text-align:center}
  /* This week's blessings, one line over the clock that changes them (2026-11-03, arena.js _arRenderMid). */
  .m-arena-bless{font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#9be36b;text-align:center;line-height:1.3;padding:0 calc(1 * var(--hbcq-w));padding:0 1cqw}
  /* .m-arena-wallmsg: the Merchant's loading / failure line (arena-shop.js) — the Wall of Fame is gone. */
  .m-arena-wallmsg{padding:calc(3 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:3cqh 1cqw;text-align:center;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#c7bfe0}

  /* ═══════ THE PRIZE WINDOW'S FRAME — Auto Mode's now (the weekly prize went 2026-11-03) ═══════ */
  .m-arena-prize-land{contain:size layout;--hbcq-c:1;container-type:size;position:relative;
    width:min(720px,96vw,calc(86vh*1125/680));aspect-ratio:1125/680;
    max-width:none;max-height:none;height:auto;padding:0;overflow:visible;
    background:url('heropopup/stash/big_frame.webp') center/100% 100% no-repeat;
    border:none;border-radius:0;box-shadow:0 26px 80px #000d;color:#fff}
  .m-arena-prize-title{position:absolute;top:calc(10 * var(--hbcq-h));top:10cqh;left:calc(6 * var(--hbcq-w));left:6cqw;right:calc(6 * var(--hbcq-w));right:6cqw;text-align:center;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#f0d78f;text-shadow:0 2px 4px #000b}
  .m-arena-prize-body{position:absolute;left:calc(6 * var(--hbcq-w));left:6cqw;right:calc(6 * var(--hbcq-w));right:6cqw;top:calc(21 * var(--hbcq-h));top:21cqh;bottom:calc(8 * var(--hbcq-h));bottom:8cqh;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(2.4 * var(--hbcq-h));gap:2.4cqh}
  /* ═══════ THE ARENA MERCHANT (2026-11-03, redesign/arena-shop.js) — the Arena window's frame, a scrolling body of
     shelves; each card is the old prize chest's card (.m-arena-card) with a price button ═══════ */
  /* ═══════ THE ARENA CHAT (2026-11-13, arena-chat.js) — the stash frame (.m-arena-land), the leaderboard's tab pills (.m-lb-tab),
     palette A: our navy cards with a gold line, his own lines a dark green one; a leaf-pill SEND (the shared popup's art). */
  .m-chat-tabs{position:absolute;top:calc(14 * var(--hbcq-h));top:14cqh;left:0;right:0;display:flex;justify-content:center;gap:calc(2 * var(--hbcq-w));gap:2cqw}
  .m-chat-tabs .m-lb-tab{width:calc(20 * var(--hbcq-w));width:20cqw}
  .m-chat-list{position:absolute;left:calc(6 * var(--hbcq-w));left:6cqw;right:calc(6 * var(--hbcq-w));right:6cqw;top:calc(30.5 * var(--hbcq-h));top:30.5cqh;bottom:calc(21 * var(--hbcq-h));bottom:21cqh;overflow-y:auto;overflow-x:hidden;
    display:flex;flex-direction:column;gap:calc(1.2 * var(--hbcq-h));gap:1.2cqh;padding:calc(.4 * var(--hbcq-h)) calc(.6 * var(--hbcq-w));padding:.4cqh .6cqw}
  .m-chat-row{display:flex;align-items:flex-start;gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw;padding:calc(1 * var(--hbcq-h)) calc(1.2 * var(--hbcq-w));padding:1cqh 1.2cqw;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;
    background:#0c2448;border:1px solid #d3ac5e88;box-shadow:inset 0 0 calc(.8 * var(--hbcq-w)) #00000066;box-shadow:inset 0 0 .8cqw #00000066;cursor:pointer;flex:none}
  .m-chat-row.mine{background:#21401a;border-color:#93b453aa;cursor:default}
  .m-chat-badge{flex:none;width:calc(4.2 * var(--hbcq-w));width:4.2cqw;height:calc(4.2 * var(--hbcq-w));height:4.2cqw;border-radius:50%;display:flex;align-items:center;justify-content:center;
    background:radial-gradient(circle at 35% 30%,#93b453,#3c5616);border:2px solid #d3ac5e;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#fff8dc;text-shadow:0 1px 2px #000c}
  /* the writer's face (2026-11-13 — his look's portrait, the leaderboard row's crop); the initial stays only without one */
  .m-chat-badge.face{overflow:hidden;background:radial-gradient(circle at 50% 35%,#3a2e60,#150f28)}
  .m-chat-badge img{width:100%;height:100%;object-fit:cover;object-position:50% 20%;display:block}
  .m-chat-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(.3 * var(--hbcq-h));gap:.3cqh}
  .m-chat-name{display:flex;justify-content:space-between;gap:calc(1 * var(--hbcq-w));gap:1cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#f0d78f}
  .m-chat-time{font-family:inherit;font-weight:700;font-size:calc(1.4 * var(--hbcq-w));font-size:1.4cqw;color:#c7bfe0;flex:none}
  .m-chat-text{font-family:'Lilita One',sans-serif;font-weight:400;letter-spacing:.02em;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#f0e4c0;line-height:1.3;overflow-wrap:anywhere}
  .m-chat-empty{margin:auto;text-align:center;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#c7bfe0}
  .m-chat-blocked-link{align-self:center;flex:none;background:none;border:none;cursor:pointer;
    font-family:'Cinzel',serif;font-weight:700;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#c7bfe0;text-decoration:underline}
  .m-chat-mini{flex:none;align-self:center;border:none;cursor:pointer;width:calc(14 * var(--hbcq-w));width:14cqw;aspect-ratio:231/75;
    background:url('heropopup/settings/performance_not_selected.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;color:#c8dde8;text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d;text-shadow:0 .15cqw .25cqw #000d}
  .m-chat-bar{position:absolute;left:calc(6 * var(--hbcq-w));left:6cqw;right:calc(6 * var(--hbcq-w));right:6cqw;bottom:calc(9 * var(--hbcq-h));bottom:9cqh;height:calc(10 * var(--hbcq-h));height:10cqh;display:flex;align-items:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw}
  .m-chat-input{flex:1;min-width:0;height:100%;box-sizing:border-box;padding:0 calc(1.6 * var(--hbcq-w));padding:0 1.6cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;
    background:#00132b;border:2px solid #d3ac5e;color:#fff8dc;font-family:'Lilita One',sans-serif;font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;outline:none}
  .m-chat-input::placeholder{color:#8f9bb8}
  .m-chat-send{position:relative;flex:none;height:100%;aspect-ratio:440/150;border:none;padding:0;cursor:pointer;
    background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;letter-spacing:.06em;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#fff8dc;
    text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d,0 0 calc(.6 * var(--hbcq-w)) #c8ff9a77;text-shadow:0 .15cqw .25cqw #000d,0 0 .6cqw #c8ff9a77}
  .m-chat-send::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;transform:translateX(-50%);
    pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-chat-send:active{transform:scale(0.96)}
  .m-chat-foot{position:absolute;left:calc(6 * var(--hbcq-w));left:6cqw;right:calc(6 * var(--hbcq-w));right:6cqw;bottom:calc(4.4 * var(--hbcq-h));bottom:4.4cqh;text-align:center;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#ffe9b0;
    text-shadow:0 1px 2px #000c;min-height:1em}
  .m-ashop-bal{position:absolute;top:calc(7.4 * var(--hbcq-h));top:7.4cqh;right:calc(13 * var(--hbcq-w));right:13cqw;display:flex;align-items:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#ffe9a8;text-shadow:0 2px 3px #000c}
  .m-ashop-bal img{width:calc(3.6 * var(--hbcq-w));width:3.6cqw;height:auto}
  .m-ashop-body{position:absolute;left:calc(5 * var(--hbcq-w));left:5cqw;right:calc(5 * var(--hbcq-w));right:5cqw;top:calc(17 * var(--hbcq-h));top:17cqh;bottom:calc(6 * var(--hbcq-h));bottom:6cqh;overflow-y:auto;overflow-x:hidden;
    -webkit-overflow-scrolling:touch;padding-right:calc(.6 * var(--hbcq-w));padding-right:.6cqw}
  .m-ashop-head{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#f0d78f;letter-spacing:.05em;
    margin:calc(1.6 * var(--hbcq-h)) 0 calc(1 * var(--hbcq-h));margin:1.6cqh 0 1cqh;text-shadow:0 1px 2px #000c}
  .m-ashop-head small{font-family:inherit;font-weight:700;font-size:calc(1.4 * var(--hbcq-w));font-size:1.4cqw;color:#c7bfe0;letter-spacing:0;margin-left:calc(.8 * var(--hbcq-w));margin-left:.8cqw}
  .m-ashop-body .m-arena-cards{grid-template-columns:repeat(4,1fr)}
  .m-arena-card .set{font-size:calc(1.35 * var(--hbcq-w));font-size:1.35cqw;color:#9be36b;text-align:center;line-height:1.3}
  .m-arena-card button.ashop-buy{display:flex;align-items:center;justify-content:center;gap:calc(.5 * var(--hbcq-w));gap:.5cqw;margin-top:auto}
  .m-arena-card button.ashop-buy img{width:calc(2 * var(--hbcq-w));width:2cqw;height:auto}
  .m-arena-card button.ashop-buy:disabled{filter:grayscale(.8);opacity:.6;cursor:default}
  /* ═══════ AUTO MODE (2026-10-15) — the prize window's frame and buttons, its own lines ═══════ */
  /* SMALLER (Roman, 2026-10-19: "the frame is really big for what it holds"): ~72% of the prize window, and everything
     inside it — in cq units of THIS box — a third bigger, so the text and the two buttons fill the frame. */
  .m-arena-prize-land.m-auto-land{width:min(520px,72vw,calc(62vh*1125/680))}
  .m-auto-land .m-arena-prize-title{font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw}
  .m-auto-land .m-auto-close{position:absolute;top:calc(5.5 * var(--hbcq-h));top:5.5cqh;right:calc(4.2 * var(--hbcq-w));right:4.2cqw;width:calc(9 * var(--hbcq-w));width:9cqw;height:auto;aspect-ratio:1;z-index:4;
    padding:0;border:none;border-radius:0;box-shadow:none;font-size:0;cursor:pointer;background:url('heropopup/close.webp') center/contain no-repeat}
  .m-auto-how{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;line-height:1.35;color:#e8dcc0;text-align:center;max-width:86%}
  .m-auto-state{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;color:#c7bfe0;letter-spacing:.04em}
  .m-auto-state.on{color:#ffe066;text-shadow:0 0 calc(1.4 * var(--hbcq-w)) #ffcc33aa;text-shadow:0 0 1.4cqw #ffcc33aa}
  .m-auto-btns{display:flex;gap:calc(3 * var(--hbcq-w));gap:3cqw;align-items:center;justify-content:center;width:100%}
  .m-auto-btn{width:42%;aspect-ratio:723/202;border:none;padding:0 calc(1.4 * var(--hbcq-w));padding:0 1.4cqw;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;
    background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#3a1c08;white-space:nowrap}
  .m-auto-btn img{width:calc(3.6 * var(--hbcq-w));width:3.6cqw;height:auto}
  .m-auto-btn:disabled{opacity:.55;cursor:default}
  .m-auto-stock{font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw;color:#c7bfe0}
  /* THE EVENTS (events.js, 2026-11-02 — Skull Hero's event list): the shop's frame, a column of cards. Each card: its
     picture on the right fading into its colour, the name on a ribbon, a line about it, its state on a chip; locked = grey. */
  .m-settings-land.m-ev-land{height:min(900px,88vh,calc(92vw*1402/1180))}
  .m-ev-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:calc(3.4 * var(--hbcq-w));gap:3.4cqw;padding:calc(15 * var(--hbcq-w)) calc(7 * var(--hbcq-w)) calc(13 * var(--hbcq-w));padding:15cqw 7cqw 13cqw;scrollbar-width:none}
  .m-ev-list::-webkit-scrollbar{display:none}
  .m-ev-card{--c:#7a6aa8;--d:#2a2246;position:relative;flex:none;width:100%;height:calc(34 * var(--hbcq-w));height:34cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;border:calc(.7 * var(--hbcq-w)) solid;border:.7cqw solid;border-color:var(--c);
    background:var(--d);overflow:hidden;text-align:left;padding:0;cursor:pointer;box-shadow:0 calc(1 * var(--hbcq-w)) 0 #0007;box-shadow:0 1cqw 0 #0007;font-family:inherit}
  .m-ev-card:active{transform:scale(.98)}
  .m-ev-card.ev-colosseum{--c:#d8433b;--d:#4e1a24}
  .m-ev-card.ev-arena{--c:#e8b52a;--d:#5a3e10}
  .m-ev-card.ev-survival{--c:#3c9be8;--d:#172e55}
  .m-ev-card.ev-snakes{--c:#3fae5f;--d:#13382a}
  .m-ev-art{position:absolute;right:0;top:0;bottom:0;width:68%;background:center/cover no-repeat;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 34%);mask-image:linear-gradient(90deg,transparent 0,#000 34%)}
  .m-ev-ribbon{position:absolute;left:0;top:calc(2.6 * var(--hbcq-w));top:2.6cqw;padding:calc(1.3 * var(--hbcq-w)) calc(7 * var(--hbcq-w)) calc(1.3 * var(--hbcq-w)) calc(4 * var(--hbcq-w));padding:1.3cqw 7cqw 1.3cqw 4cqw;background:var(--c);color:#fff;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;
    text-shadow:0 calc(.3 * var(--hbcq-w)) 0 #0009;text-shadow:0 .3cqw 0 #0009;-webkit-clip-path:polygon(0 0,100% 0,93% 50%,100% 100%,0 100%);clip-path:polygon(0 0,100% 0,93% 50%,100% 100%,0 100%)}
  .m-ev-desc{position:absolute;left:calc(4 * var(--hbcq-w));left:4cqw;top:calc(12.6 * var(--hbcq-w));top:12.6cqw;width:56%;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;line-height:1.25;font-weight:700;color:#fff;
    text-shadow:0 calc(.25 * var(--hbcq-w)) 0 #000b;text-shadow:0 .25cqw 0 #000b}
  .m-ev-chip{position:absolute;left:calc(4 * var(--hbcq-w));left:4cqw;bottom:calc(2.6 * var(--hbcq-w));bottom:2.6cqw;display:flex;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:calc(.8 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:.8cqw 3cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;
    background:#000a;color:#ffe9a8;font-weight:800;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;white-space:nowrap}
  .m-ev-lock{display:inline-block;width:calc(3.6 * var(--hbcq-w));width:3.6cqw;height:calc(3.6 * var(--hbcq-w));height:3.6cqw;vertical-align:calc(-.6 * var(--hbcq-w));vertical-align:-.6cqw;margin-right:calc(.5 * var(--hbcq-w));margin-right:.5cqw;
    background:url('lock_navy.webp') center/contain no-repeat}   /* the theme lock (2026-11-14) */
  .m-ev-card.locked{cursor:default}
  .m-ev-card.locked .m-ev-art{-webkit-filter:grayscale(1) brightness(.55);filter:grayscale(1) brightness(.55)}
  .m-ev-card.locked .m-ev-ribbon{background:#6c6c78}
  .m-ev-card.soon{--c:#56617e;--d:#323b55;display:flex;align-items:center;justify-content:center;cursor:default;
    background:repeating-linear-gradient(135deg,#323b55 0 calc(4 * var(--hbcq-w)),#2c3450 calc(4 * var(--hbcq-w)) calc(8 * var(--hbcq-w)));background:repeating-linear-gradient(135deg,#323b55 0 4cqw,#2c3450 4cqw 8cqw)}
  .m-ev-soon{font-family:'Cinzel',serif;font-weight:900;font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;color:#fff;text-shadow:0 calc(.35 * var(--hbcq-w)) 0 #000a;text-shadow:0 .35cqw 0 #000a;letter-spacing:.04em}
  /* THE FORGE'S POSSIBLE SKILLS (_craftPoolInfo): the circles (the old pool row's ability_circle frame), the one tapped
     shown big below — picture, name, what it does, its damage and cooldown */
  /* the shop's upright frame (m-settings-land, 1180x1402), a size up from the small popups on it */
  .m-settings-land.m-skl-land{height:min(900px,90vh,calc(88vw*1402/1180))}
  .m-skl-body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(3.4 * var(--hbcq-w));gap:3.4cqw;
    padding:calc(15 * var(--hbcq-w)) calc(9 * var(--hbcq-w)) calc(13 * var(--hbcq-w));padding:15cqw 9cqw 13cqw}
  .m-skl-intro{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#e8dcc0;text-align:center;max-width:88%}
  .m-skl-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;max-width:88%}
  .m-skl-dot{flex:none;width:calc(13 * var(--hbcq-w));width:13cqw;aspect-ratio:1;border:none;border-radius:50%;padding:0;cursor:pointer;
    background:url('heropopup/ability_circle.webp') center/100% 100% no-repeat;display:flex;align-items:center;justify-content:center;
    transition:transform .1s,filter .1s}
  .m-skl-dot img{width:64%;height:64%;object-fit:contain;filter:drop-shadow(0 calc(.3 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #0009);filter:drop-shadow(0 .3cqw .4cqw #0009)}
  .m-skl-dot span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;color:#c0b8de}
  .m-skl-dot.sel{transform:scale(1.12);filter:brightness(1.25);box-shadow:0 0 0 calc(.6 * var(--hbcq-w)) #ffd98a,0 0 calc(2.4 * var(--hbcq-w)) #ffcc55aa;box-shadow:0 0 0 .6cqw #ffd98a,0 0 2.4cqw #ffcc55aa}
  .m-skl-card{display:flex;gap:calc(3 * var(--hbcq-w));gap:3cqw;align-items:center;width:86%;padding:calc(2.4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:2.4cqw 3cqw;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;
    background:rgba(15,10,32,.62);box-shadow:inset 0 0 0 calc(.3 * var(--hbcq-w)) #c9a24a66;box-shadow:inset 0 0 0 .3cqw #c9a24a66}
  .m-skl-card .m-skl-dot{width:calc(20 * var(--hbcq-w));width:20cqw;cursor:default;transform:none;filter:none;box-shadow:none}
  .m-skl-txt{display:flex;flex-direction:column;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;min-width:0}
  .m-skl-txt b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4 * var(--hbcq-w));font-size:4cqw;color:#ffe9a8}
  .m-skl-txt span{font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:1.35;color:#d8cdb0}
  .m-skl-txt i{font-style:normal;font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;color:#ffd36b}
  /* ALL 10 LEVELS (the skills rework, 2026-11-03 — _skAllLevels, _galtarAllLevels): one row a level, the one he holds lit;
     it scrolls inside the frame when a curse's sentences make it tall */
  .m-sk-tablewrap{width:100%;max-height:100%;overflow-y:auto}
  .m-sk-table{width:100%;border-collapse:collapse;font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:1.3;color:#e8dcc0}
  .m-sk-table th{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#c9a24a;text-align:center;padding:calc(.8 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w));padding:.8cqw 1.4cqw;
    border-bottom:1px solid #c9a24a66}
  .m-sk-table td{padding:calc(.9 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w));padding:.9cqw 1.4cqw;border-bottom:1px solid #ffffff14;vertical-align:top}
  .m-sk-table td:first-child{width:calc(8 * var(--hbcq-w));width:8cqw;text-align:center;font-weight:900}
  .m-sk-table tr.cur td{background:#ffd98a22;color:#ffe9a8;font-weight:700}
  /* THE SKILL CARD on the landscape Forge (_skCardHtml): label | value rows, the next level in a green box, the ⓘ button */
  .m-sk-card{display:flex;flex-direction:column;gap:calc(.5 * var(--hbcq-h));gap:.5cqh;margin-bottom:calc(.6 * var(--hbcq-h));margin-bottom:.6cqh}
  .m-sk-row{display:flex;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;align-items:baseline;font-size:calc(1.4 * var(--hbcq-w));font-size:1.4cqw;line-height:1.35}
  .m-sk-row .k{flex:none;min-width:calc(6 * var(--hbcq-w));min-width:6cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.15 * var(--hbcq-w));font-size:1.15cqw;letter-spacing:.05em;
    text-transform:uppercase;color:#c9a24a}
  .m-sk-row .v{flex:1;min-width:0;color:#e8e0f4;font-weight:700}
  .m-sk-row em{font-style:normal;color:#7ee29a}
  .m-sk-new{font-size:calc(1.05 * var(--hbcq-w));font-size:1.05cqw;padding:0 calc(.5 * var(--hbcq-w));padding:0 .5cqw;border-radius:calc(.5 * var(--hbcq-w));border-radius:.5cqw;background:#3fbf5a;color:#fff}
  .m-sk-next{padding:calc(.5 * var(--hbcq-h)) calc(.8 * var(--hbcq-w));padding:.5cqh .8cqw;border-radius:calc(.8 * var(--hbcq-w));border-radius:.8cqw;background:rgba(255,255,255,.05);box-shadow:inset 0 0 0 1px #7ee29a55;
    display:flex;flex-direction:column;gap:calc(.3 * var(--hbcq-h));gap:.3cqh}
  .m-sk-nexthd{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.2 * var(--hbcq-w));font-size:1.2cqw;color:#7ee29a}
  .m-sk-all{align-self:flex-start;padding:calc(.3 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:.3cqh 1cqw;border:none;border-radius:calc(.8 * var(--hbcq-w));border-radius:.8cqw;background:#2a3d6e;color:#ffe9a8;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.2 * var(--hbcq-w));font-size:1.2cqw;cursor:pointer;box-shadow:inset 0 0 0 1px #c9a24a88}
  /* THE HERO'S PROFILE (openHeroProfile): the shop's leaf frame like Settings and the leaderboard (Roman, 2026-11-02: "a
     better design, like all our popups") — the portrait big in a gold ring, the name on a plank of its own, the level, Rename */
  .m-settings-land.m-prof-land{height:min(900px,72vh,calc(80vw*1402/1180))}
  .m-prof-body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;
    padding:calc(15 * var(--hbcq-w)) calc(10 * var(--hbcq-w)) calc(14 * var(--hbcq-w));padding:15cqw 10cqw 14cqw}
  .m-prof-side{display:flex;flex-direction:column;align-items:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;min-width:0;width:100%}
  .m-prof-pic{width:calc(42 * var(--hbcq-w));width:42cqw;aspect-ratio:1;border-radius:50%;overflow:hidden;background:radial-gradient(#3a2a5c,#140c26);
    box-shadow:0 0 0 calc(.9 * var(--hbcq-w)) #c9a24a,0 0 0 calc(1.4 * var(--hbcq-w)) #3a2410,0 calc(1.2 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w)) #000a;box-shadow:0 0 0 .9cqw #c9a24a,0 0 0 1.4cqw #3a2410,0 1.2cqw 2.4cqw #000a;flex:none}
  .m-prof-pic img{width:100%;height:100%;object-fit:cover}
  .m-prof-name{font-family:'Cinzel',serif;font-weight:900;font-size:calc(6.4 * var(--hbcq-w));font-size:6.4cqw;color:#ffe9a8;text-shadow:0 calc(.3 * var(--hbcq-w)) 0 #000;text-shadow:0 .3cqw 0 #000;
    text-align:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none;
    padding:calc(1.6 * var(--hbcq-w)) calc(6 * var(--hbcq-w));padding:1.6cqw 6cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;background:rgba(15,10,32,.62);box-shadow:inset 0 0 0 calc(.35 * var(--hbcq-w)) #c9a24a77;box-shadow:inset 0 0 0 .35cqw #c9a24a77}
  .m-prof-lv{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4 * var(--hbcq-w));font-size:4cqw;color:#c7bfe0;letter-spacing:.04em}
  .m-prof-btn{width:calc(46 * var(--hbcq-w));width:46cqw;flex:none;font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
  .m-prof-btn img{width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:auto}
  .m-arena-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;width:100%}
  .m-arena-card{display:flex;flex-direction:column;align-items:center;gap:calc(.8 * var(--hbcq-h));gap:.8cqh;padding:calc(1.4 * var(--hbcq-h)) calc(1 * var(--hbcq-w));padding:1.4cqh 1cqw;
    border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;border:2px solid var(--rc,#fff);background:rgba(5,12,28,.7);min-height:0}
  .m-arena-card img.ic{width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw;object-fit:contain}
  .m-arena-card .nm{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:var(--rc,#fff);text-align:center}
  .m-arena-card .lv{font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;color:#c7bfe0}
  .m-arena-card .st{font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;color:#e8dcc0;text-align:center;line-height:1.35}
  .m-arena-card .req{font-size:calc(1.4 * var(--hbcq-w));font-size:1.4cqw;color:#ffb070}
  .m-arena-card button{width:80%;aspect-ratio:723/202;border:none;padding:0;cursor:pointer;
    background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#3a1c08}

  /* A DAILY'S NAME, small under its objective (2026-09-24). The objective is the line now, and it runs
     longer than the old flavour title, so the daily list sets it a step smaller than a story step. */
  .m-quest2-flatlist .m-quest2-lbl{font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw}
  .m-quest2-sub{font-family:'Cinzel',serif;font-weight:700;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;color:#e8dcc0;
    line-height:1.1;margin-top:calc(-.3 * var(--hbcq-h));margin-top:-.3cqh;text-shadow:0 1px 2px rgba(0,0,0,.85)}

  /* THE COLOSSEUM PANEL (2026-09-30, Skull Hero's floor screen; redesign/colosseum.js). The frame is portrait
     (1180x1402): the hall (art + stage plate + the monsters standing on its floor), the rewards, START. */
  /* The hall sits a little lower (Roman, 2026-10-02: "lower the big picture a bit"): 1cqh -> 3.5cqh of top padding. */
  .m-colo-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:calc(1.6 * var(--hbcq-h));gap:1.6cqh;padding:calc(3.5 * var(--hbcq-h)) calc(6 * var(--hbcq-w)) calc(4.2 * var(--hbcq-h));padding:3.5cqh 6cqw 4.2cqh}
  .m-colo-hall{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;
    border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;border:calc(.3 * var(--hbcq-w)) solid #6b5028;border:.3cqw solid #6b5028;overflow:hidden;padding:calc(2 * var(--hbcq-h)) calc(1 * var(--hbcq-w)) calc(2.4 * var(--hbcq-h));padding:2cqh 1cqw 2.4cqh;
    background:url('colosseum/arena.webp') center 62%/cover no-repeat,#2a2340}
  /* the survival door's hall: the Survival board's dungeon (leaderboard/bg_survival.webp), 2026-11-02 */
  .m-colo-hall.surv{background:url('leaderboard/bg_survival.webp') center 60%/cover no-repeat,#1a1230}
  /* 2026-10-01 (Roman: "why not a big colosseum behind them; the stage label and START are not our design"):
     a generated colosseum interior (its sandy floor is where the monsters stand), the stage on the gold-framed
     name plate, START on the game's golden_button — the Forge's and the Gem Altar's. */
  .m-colo-plate{font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;color:#ffe9a8;letter-spacing:.1em;
    width:calc(44 * var(--hbcq-w));width:44cqw;aspect-ratio:520/138;display:flex;align-items:center;justify-content:center;
    background:url('leaderboard/nameplate.webp') center/100% 100% no-repeat;
    filter:drop-shadow(0 calc(.6 * var(--hbcq-w)) calc(1 * var(--hbcq-w)) #000a);filter:drop-shadow(0 .6cqw 1cqw #000a);text-shadow:0 calc(.2 * var(--hbcq-w)) 0 #000a,0 0 calc(.8 * var(--hbcq-w)) #e8c36a66;text-shadow:0 .2cqw 0 #000a,0 0 .8cqw #e8c36a66}
  .m-colo-waves{margin-top:calc(1 * var(--hbcq-h));margin-top:1cqh;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#f2e6c8;background:#120c22b3;border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw;padding:calc(.4 * var(--hbcq-h)) calc(1.6 * var(--hbcq-w));padding:.4cqh 1.6cqw}
  .m-colo-mons{margin-top:auto;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:calc(1.2 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));gap:1.2cqw 1.6cqw}
  .m-colo-mon{width:calc(13 * var(--hbcq-w));width:13cqw;display:flex;flex-direction:column;align-items:center;position:relative}
  .m-colo-mon img{width:calc(11 * var(--hbcq-w));width:11cqw;height:calc(11 * var(--hbcq-w));height:11cqw;object-fit:contain;filter:drop-shadow(0 calc(.6 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000a);filter:drop-shadow(0 .6cqw .5cqw #000a)}
  .m-colo-mon span{margin-top:calc(.3 * var(--hbcq-h));margin-top:.3cqh;font-size:calc(1.45 * var(--hbcq-w));font-size:1.45cqw;font-weight:700;color:#fff;background:#120c22cc;border-radius:calc(.8 * var(--hbcq-w));border-radius:.8cqw;
    padding:calc(.2 * var(--hbcq-h)) calc(.9 * var(--hbcq-w));padding:.2cqh .9cqw;white-space:nowrap;max-width:calc(15 * var(--hbcq-w));max-width:15cqw;overflow:hidden;text-overflow:ellipsis}
  /* LANDSCAPE: A LONG MONSTER NAME WRAPS TO TWO LINES (Roman, 2026-11-19 — "Mushroom Angry" was cut in English, "Cogumelo
     Alegre" in Portuguese). Sideways only, like the forge's weapon list. */
  html:not(.hb-portrait-peek) .m-colo-mon span{white-space:normal;text-align:center;line-height:1.15;display:-webkit-box;
    -webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:break-word}
  .m-colo-mon.boss{width:calc(18 * var(--hbcq-w));width:18cqw}
  .m-colo-mon.boss img{width:calc(16 * var(--hbcq-w));width:16cqw;height:calc(16 * var(--hbcq-w));height:16cqw}
  /* A rung with SEVERAL bosses (2026-10-26: 35 the Lizard + the Ice Golem, 40 the three brothers) — each a bit smaller, so
     the row stays one line. */
  .m-colo-mon.boss.multi{width:calc(15 * var(--hbcq-w));width:15cqw}
  .m-colo-mon.boss.multi img{width:calc(13 * var(--hbcq-w));width:13cqw;height:calc(13 * var(--hbcq-w));height:13cqw}
  .m-colo-mon.boss b{position:absolute;top:calc(-.6 * var(--hbcq-h));top:-.6cqh;z-index:1;font-family:'Cinzel',serif;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;color:#fff;
    background:linear-gradient(180deg,#d8342c,#8e1610);border:calc(.2 * var(--hbcq-w)) solid #ffcf6a;border:.2cqw solid #ffcf6a;border-radius:calc(.8 * var(--hbcq-w));border-radius:.8cqw;padding:calc(.1 * var(--hbcq-h)) calc(1.2 * var(--hbcq-w));padding:.1cqh 1.2cqw}
  .m-colo-rewards{flex:none;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;background:#160f2ae6;border:calc(.25 * var(--hbcq-w)) solid #3a2c5c;border:.25cqw solid #3a2c5c;padding:calc(1 * var(--hbcq-h)) calc(2 * var(--hbcq-w)) calc(1.4 * var(--hbcq-h));padding:1cqh 2cqw 1.4cqh;text-align:center}
  .m-colo-rtitle{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.2 * var(--hbcq-w));font-size:2.2cqw;color:#fff;letter-spacing:.08em;margin-bottom:calc(.8 * var(--hbcq-h));margin-bottom:.8cqh}
  .m-colo-tiles{display:flex;justify-content:center;gap:calc(2 * var(--hbcq-w));gap:2cqw}
  /* A REWARD IS ITS PICTURE WITH ITS WORDS BESIDE IT, NO FRAME (2026-10-24, a production player: "a chest drawn on a chest,
     too big — draw a chest and write 'chest' next to it"; Roman: "without the frame"). It was a green square with the name
     printed across the icon. */
  .m-colo-tile{height:calc(9 * var(--hbcq-w));height:9cqw;display:flex;align-items:center;justify-content:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;position:relative}
  .m-colo-tile img{width:calc(8 * var(--hbcq-w));width:8cqw;height:calc(8 * var(--hbcq-w));height:8cqw;object-fit:contain;flex:none;filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000a);filter:drop-shadow(0 .4cqw .5cqw #000a)}
  .m-colo-tile span{white-space:nowrap;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;
    color:#fff;text-shadow:0 calc(.15 * var(--hbcq-w)) 0 #000,0 0 calc(.4 * var(--hbcq-w)) #000;text-shadow:0 .15cqw 0 #000,0 0 .4cqw #000}
  .m-colo-none{color:#8a7aa8;font-size:calc(2 * var(--hbcq-w));font-size:2cqw}

  /* THE DRAGONS (2026-10-28, redesign/dragons.js) — the settings frame like the Colosseum; every size in cq units of the
     frame (container-type:size), so landscape is the same centred card and upright (portrait.css) only widens it. */
  .m-drag-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:calc(2.4 * var(--hbcq-w)) calc(2.7 * var(--hbcq-w)) calc(7 * var(--hbcq-w));padding:2.4cqw 2.7cqw 7cqw;margin:0 calc(3.3 * var(--hbcq-w)) calc(6.4 * var(--hbcq-w));margin:0 3.3cqw 6.4cqw;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 1.6%,#000 96.4%,transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 1.6%,#000 96.4%,transparent 100%);display:flex;flex-direction:column;gap:calc(1.188 * var(--hbcq-w));gap:1.188cqw;
    scrollbar-width:none}
  .m-drag-body::-webkit-scrollbar{display:none}
  .m-drag-wait{margin:auto;color:#e8dcff;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw}
  /* THE SKY (Roman, 2026-10-29: "a nice picture up there, much taller — no room — and the dragon flying in circles"):
     Gemini's dragon-sanctuary painting (dragons/sky_day.webp — Roman picked the daytime valley of three) at twice the old
     height. */
  .m-drag-sky{position:relative;flex:none;height:calc(54 * var(--hbcq-w));height:54cqw;border-radius:calc(1.8 * var(--hbcq-w));border-radius:1.8cqw;overflow:hidden;
    background:#8fd0ff url('dragons/sky_day.webp') center/cover no-repeat;box-shadow:inset 0 0 calc(1.2 * var(--hbcq-w)) #0006;box-shadow:inset 0 0 1.2cqw #0006}
  /* THE DRAGON HOVERS IN PLACE (Roman, 2026-10-29: first "fly in circles", then "not from side to side — it looks bad"):
     in the middle of the sky, a slow rise and fall. (.m-drag-flyx / .m-drag-face are kept as plain holders.) */
  .m-drag-flyx{position:absolute;left:50%;top:46%;width:0;height:0}
  .m-drag-flyy{width:0;height:0;animation:mDragFloat 3.2s ease-in-out infinite alternate}
  .m-drag-face{width:0;height:0}
  .m-drag-fly{display:block;width:calc(34 * var(--hbcq-w));width:34cqw;height:auto;transform:translate(-50%,-50%);filter:drop-shadow(0 calc(1.663 * var(--hbcq-w)) calc(.8 * var(--hbcq-w)) #0005);filter:drop-shadow(0 1.663cqw .8cqw #0005)}
  @keyframes mDragFloat{0%{transform:translateY(calc(1.2 * var(--hbcq-w)));transform:translateY(1.2cqw)}100%{transform:translateY(calc(-2.4 * var(--hbcq-w)));transform:translateY(-2.4cqw)}}
  /* the 3D dragon (dragons.js _dragViewerMount) over the picture; the picture dragon steps aside once it has drawn */
  .m-drag-3d{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none}
  .m-drag-sky3d .m-drag-flyx{display:none}
  .m-drag-skyname{z-index:2;position:absolute;left:0;right:0;bottom:calc(1.426 * var(--hbcq-w));bottom:1.426cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;
    color:#fff;text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000,0 0 calc(1 * var(--hbcq-w)) #000a;text-shadow:0 .2cqw .5cqw #000,0 0 1cqw #000a}
  /* THE EGGS (Roman, 2026-10-29: "it doesn't show how many eggs we have — the player's bag, that style"): the bag's stone
     strip (portrait.css .m-pt-bar / .m-pt-gems) edge to edge — the six eggs, each with how many were found. */
  .m-drag-eggs{flex:none;display:flex;align-items:center;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;margin:calc(0.713 * var(--hbcq-w)) calc(-2.7 * var(--hbcq-w)) 0;margin:0.713cqw -2.7cqw 0;padding:calc(1.663 * var(--hbcq-w)) calc(3.4 * var(--hbcq-w));padding:1.663cqw 3.4cqw;
    background:linear-gradient(180deg,#243b6e 0%,#1a2d56 100%);border-top:calc(.3 * var(--hbcq-w)) solid #c9a24a;border-top:.3cqw solid #c9a24a;border-bottom:calc(.3 * var(--hbcq-w)) solid #c9a24a;border-bottom:.3cqw solid #c9a24a;
    box-shadow:0 calc(0.713 * var(--hbcq-w)) calc(1 * var(--hbcq-w)) #0009;box-shadow:0 0.713cqw 1cqw #0009}
  .m-drag-egg{position:relative;flex:none;display:flex;align-items:center;justify-content:center;width:calc(11.5 * var(--hbcq-w));width:11.5cqw;height:calc(11.5 * var(--hbcq-w));height:11.5cqw;
    padding:0;margin:0;border:none;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;cursor:pointer;
    background:linear-gradient(180deg,#132650,#0b1834);box-shadow:inset 0 0 0 calc(.3 * var(--hbcq-w)) #c9a24a99,0 calc(0.238 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #0008;box-shadow:inset 0 0 0 .3cqw #c9a24a99,0 0.238cqw .4cqw #0008}
  .m-drag-egg img{width:calc(8 * var(--hbcq-w));width:8cqw;height:calc(8 * var(--hbcq-w));height:8cqw;object-fit:contain}
  .m-drag-egg.none img{filter:grayscale(1) brightness(.55)}
  .m-drag-egg span{position:absolute;right:calc(.9 * var(--hbcq-w));right:.9cqw;bottom:calc(.5 * var(--hbcq-w));bottom:.5cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#fff;
    text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #000,0 0 calc(.3 * var(--hbcq-w)) #000;text-shadow:0 .15cqw .3cqw #000,0 0 .3cqw #000;line-height:1}
  .m-drag-rtitle{flex:none;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#ffd75a;letter-spacing:.06em;
    text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #000c;text-shadow:0 .2cqw .4cqw #000c;margin-top:calc(0.95 * var(--hbcq-w));margin-top:0.95cqw}
  /* THE DRAGON BONUS, twice the size (Roman, 2026-10-29: "the bonus part should be 2x bigger — everything there is small") */
  .m-drag-bonus{flex:none;display:flex;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw}
  .m-drag-bonus.none{color:#cbbfe6;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;padding:calc(1.188 * var(--hbcq-w)) 0;padding:1.188cqw 0}
  .m-drag-btile{flex:1;display:flex;align-items:center;justify-content:center;gap:calc(1.8 * var(--hbcq-w));gap:1.8cqw;background:#160f2ae6;
    border:calc(.35 * var(--hbcq-w)) solid #3a2c5c;border:.35cqw solid #3a2c5c;border-radius:calc(2.2 * var(--hbcq-w));border-radius:2.2cqw;padding:calc(1.426 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:1.426cqw 1.6cqw}
  .m-drag-btile img{width:calc(8.8 * var(--hbcq-w));width:8.8cqw;height:calc(8.8 * var(--hbcq-w));height:8.8cqw;object-fit:contain}
  /* each tile NAMES its bonus (Roman, 2026-10-30); the element one dims, and says why, while the weapon has another stone */
  .m-drag-btile{flex-wrap:wrap;row-gap:calc(.3 * var(--hbcq-w));row-gap:.3cqw}
  .m-drag-btile em{flex-basis:100%;text-align:center;font-style:normal;font-family:'Cinzel',serif;font-weight:700;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;
    color:#cbbfe6;line-height:1.1}
  .m-drag-btile small{flex-basis:100%;text-align:center;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#ffcf8a;line-height:1.1}
  .m-drag-btile.off img,.m-drag-btile.off span{opacity:.45;filter:grayscale(.6)}
  .m-drag-btile span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(5.2 * var(--hbcq-w));font-size:5.2cqw;color:#fff}
  .m-drag-grid{flex:none;display:grid;grid-template-columns:repeat(3,1fr);gap:calc(2.6 * var(--hbcq-w)) calc(2.6 * var(--hbcq-w));gap:2.6cqw 2.6cqw;margin-top:calc(1.8 * var(--hbcq-w));margin-top:1.8cqw}
  .m-drag-card{position:relative;aspect-ratio:1/1;border:calc(.45 * var(--hbcq-w)) solid #5a4a86;border:.45cqw solid #5a4a86;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;padding:0;cursor:pointer;
    background:radial-gradient(circle at 50% 38%,#3a2f63 0%,#1b1434 72%);box-shadow:0 calc(0.713 * var(--hbcq-w)) calc(1 * var(--hbcq-w)) #0008;box-shadow:0 0.713cqw 1cqw #0008;overflow:hidden}
  .m-drag-card img{position:absolute;left:8%;top:5%;width:84%;height:58%;object-fit:contain;filter:drop-shadow(0 calc(0.713 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000a);filter:drop-shadow(0 0.713cqw .5cqw #000a)}
  /* NO EGG YET: the egg dimmed but in its colour — never a black shape (Roman, 2026-10-29: "it's not clear which egg advances
     which dragon"). A card with eggs shows its egg in full colour. */
  .m-drag-card.unknown img{filter:saturate(.75) brightness(.5) drop-shadow(0 calc(0.713 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000a);filter:saturate(.75) brightness(.5) drop-shadow(0 0.713cqw .5cqw #000a)}
  .m-drag-card.el-fire{border-color:#ff7a45}.m-drag-card.el-ice{border-color:#6fd3ff}.m-drag-card.el-lightning{border-color:#ffe34d}
  .m-drag-card.el-wind{border-color:#7ee08a}.m-drag-card.el-light{border-color:#fff1b0}.m-drag-card.el-dark{border-color:#b07cff}
  .m-drag-card.active{box-shadow:0 0 0 calc(.5 * var(--hbcq-w)) #ffd75a,0 calc(0.713 * var(--hbcq-w)) calc(1 * var(--hbcq-w)) #0008;box-shadow:0 0 0 .5cqw #ffd75a,0 0.713cqw 1cqw #0008}
  .m-drag-lv{position:absolute;left:0;right:0;bottom:calc(6.8 * var(--hbcq-w));bottom:6.8cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;color:#fff;
    text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #000;text-shadow:0 .2cqw .4cqw #000}
  .m-drag-lv.hatch{color:#ffd75a}
  .m-drag-bar{position:absolute;left:7%;right:7%;bottom:calc(1.6 * var(--hbcq-w));bottom:1.6cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;border-radius:calc(2.2 * var(--hbcq-w));border-radius:2.2cqw;background:#0c0818;border:calc(.2 * var(--hbcq-w)) solid #000;border:.2cqw solid #000;overflow:hidden}
  .m-drag-bar i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(#58e05a,#2aa52c)}
  .m-drag-bar b{position:relative;display:block;text-align:center;line-height:calc(4.1 * var(--hbcq-w));line-height:4.1cqw;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;font-weight:800;color:#fff;
    text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #000;text-shadow:0 .15cqw .3cqw #000}
  .m-drag-bar.big{position:relative;left:auto;right:auto;bottom:auto;flex:1;height:calc(4.039 * var(--hbcq-w));height:4.039cqw;border-radius:calc(2.02 * var(--hbcq-w));border-radius:2.02cqw}
  .m-drag-bar.big b{line-height:calc(3.802 * var(--hbcq-w));line-height:3.802cqw;font-size:calc(2 * var(--hbcq-w));font-size:2cqw}
  .m-drag-up{position:absolute;top:calc(0.713 * var(--hbcq-w));top:0.713cqw;left:calc(1 * var(--hbcq-w));left:1cqw;width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;border-radius:50%;
    background:#2fbf3a;box-shadow:0 0 0 calc(.3 * var(--hbcq-w)) #0008;box-shadow:0 0 0 .3cqw #0008}
  .m-drag-up::after{content:'';position:absolute;left:31%;top:38%;width:30%;height:30%;border:solid #fff;
    border-width:calc(.6 * var(--hbcq-w)) 0 0 calc(.6 * var(--hbcq-w));border-width:.6cqw 0 0 .6cqw;transform:rotate(45deg)}
  .m-drag-on{position:absolute;top:calc(0.713 * var(--hbcq-w));top:0.713cqw;right:calc(1 * var(--hbcq-w));right:1cqw;width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;border-radius:50%;background:#2fbf3a;box-shadow:0 0 0 calc(.3 * var(--hbcq-w)) #0008;box-shadow:0 0 0 .3cqw #0008}
  .m-drag-on::after{content:'';position:absolute;left:32%;top:18%;width:24%;height:44%;border:solid #fff;border-width:0 calc(.6 * var(--hbcq-w)) calc(.6 * var(--hbcq-w)) 0;border-width:0 .6cqw .6cqw 0;transform:rotate(45deg)}
  .m-drag-hint{flex:none;margin-top:calc(1.8 * var(--hbcq-w));margin-top:1.8cqw;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;color:#cbbfe6}
  /* one dragon's page */
  .m-drag-page{display:flex;flex-direction:column;gap:calc(0.95 * var(--hbcq-w));gap:0.95cqw}
  .m-drag-head{position:relative;display:flex;flex-direction:column;align-items:center}
  .m-drag-back{position:absolute;left:0;top:0;width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;border:none;border-radius:50%;cursor:pointer;
    background:#2a2148 url('heropopup/ab_sep.webp') center/0 no-repeat;box-shadow:0 0 0 calc(.3 * var(--hbcq-w)) #5a4a86;box-shadow:0 0 0 .3cqw #5a4a86}
  .m-drag-back::after{content:'';position:absolute;left:40%;top:30%;width:28%;height:28%;border:solid #fff;border-width:0 0 calc(.6 * var(--hbcq-w)) calc(.6 * var(--hbcq-w));border-width:0 0 .6cqw .6cqw;transform:rotate(45deg)}
  .m-drag-ribbon{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#fff;padding:calc(0.356 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:0.356cqw 3cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;
    background:#5a4a86;letter-spacing:.08em}
  .m-drag-head.el-fire .m-drag-ribbon{background:#c7461f}.m-drag-head.el-ice .m-drag-ribbon{background:#2d8fc4}
  .m-drag-head.el-lightning .m-drag-ribbon{background:#b49a12}.m-drag-head.el-wind .m-drag-ribbon{background:#3c9a4a}
  .m-drag-head.el-light .m-drag-ribbon{background:#b8a35a}.m-drag-head.el-dark .m-drag-ribbon{background:#6b40b0}
  .m-drag-name{margin-top:calc(0.475 * var(--hbcq-w));margin-top:0.475cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#fff;text-shadow:0 calc(.25 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) #000c;text-shadow:0 .25cqw .5cqw #000c}
  .m-drag-portrait{position:relative;width:calc(30 * var(--hbcq-w));width:30cqw;height:calc(16.632 * var(--hbcq-w));height:16.632cqw;margin-top:calc(0.475 * var(--hbcq-w));margin-top:0.475cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;
    background:radial-gradient(circle at 50% 45%,#4a3d7a 0%,#1b1434 75%)}
  .m-drag-portrait img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 calc(0.95 * var(--hbcq-w)) calc(.6 * var(--hbcq-w)) #000a);filter:drop-shadow(0 0.95cqw .6cqw #000a)}
  .m-drag-portrait.unknown img{filter:brightness(0) opacity(.55)}
  /* THE HATCH: the egg shakes, cracks open, the baby pops out with sparkles (dragons.js _dragHatch, 2.2 s). */
  .m-drag-portrait.reveal img,.m-drag-tile.reveal img,.m-drag-iconbox.reveal img{animation:mDragPop 1.2s cubic-bezier(.2,1.6,.4,1) both}
  /* ONE DRAGON'S CARD (dragons.js _dragCardRender, 2026-10-29) — the bag's item card over the dragons screen. Landscape it
     scrolls inside the card's fixed frame (a dragon says more than an item); upright the card itself scrolls (portrait.css). */
  .m-drag-cardpop .m-itemd-body{flex:1;min-height:0;overflow-y:auto;scrollbar-width:none}
  .m-drag-cardpop .m-itemd-body::-webkit-scrollbar{display:none}
  .m-drag-fraglbl{margin-top:calc(1 * var(--hbcq-w));margin-top:1cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;letter-spacing:.08em;text-transform:uppercase;color:#c9a24a}
  .m-drag-tile.unknown img,.m-drag-iconbox.unknown img{filter:saturate(.75) brightness(.5)}
  /* THE LEVEL BONUS LIST (dragons.js _dragLevelList, 2026-10-29) — every milestone to the cap, scrolling in its own box: the
     first growth and the breath at Lv 20, the second growth at Lv 40 (gold); reached rows green */
  .m-drag-lblist{max-height:calc(48 * var(--hbcq-w));max-height:48cqw;overflow-y:auto;display:flex;flex-direction:column;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;padding-right:calc(.8 * var(--hbcq-w));padding-right:.8cqw;scrollbar-width:thin}
  .m-drag-lb{flex:none;display:flex;align-items:center;gap:calc(2 * var(--hbcq-w));gap:2cqw;padding:calc(1 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:1cqw 1.6cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;background:#160f2ae6;
    border:calc(.25 * var(--hbcq-w)) solid #3a2c5c;border:.25cqw solid #3a2c5c}
  .m-drag-lb b{flex:none;min-width:calc(10 * var(--hbcq-w));min-width:10cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;color:#cbbfe6}
  .m-drag-lb span{display:flex;flex-direction:column;gap:calc(.3 * var(--hbcq-w));gap:.3cqw;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#e8dcff}
  .m-drag-lb span i{font-style:normal;font-weight:800;color:#ffd75a}
  .m-drag-lb.grow{border-color:#c9a24a;background:#2a1f10e6}
  .m-drag-lb.ms span{color:#ffe08a}   /* the 5th levels: the extra +1 */
  .m-drag-lb.on{border-color:#3fae55}
  .m-drag-lb.on b{color:#8ff0a8}
  .m-drag-lb.on b::after{content:' \2713'}
  @keyframes mDragPop{0%{transform:scale(.2) rotate(-12deg);opacity:0}60%{transform:scale(1.15) rotate(4deg);opacity:1}100%{transform:scale(1)}}
  .m-drag-spark{position:absolute;inset:-10%;pointer-events:none;border-radius:50%;
    background:radial-gradient(circle,#fff8 0 6%,transparent 7%) 20% 30%/18% 18%,radial-gradient(circle,#ffd75a 0 5%,transparent 6%) 70% 20%/16% 16%,
               radial-gradient(circle,#fff 0 4%,transparent 5%) 40% 75%/14% 14%,radial-gradient(circle,#ffd75a 0 5%,transparent 6%) 80% 70%/18% 18%;
    animation:mDragSpark 1.6s ease-out both}
  @keyframes mDragSpark{0%{transform:scale(.4);opacity:0}30%{opacity:1}100%{transform:scale(1.3);opacity:0}}
  .m-drag-skills{display:flex;flex-direction:column;gap:calc(0.832 * var(--hbcq-w));gap:0.832cqw}
  .m-drag-skill{display:flex;align-items:center;gap:calc(2 * var(--hbcq-w));gap:2cqw;text-align:left;background:#160f2ae6;border:calc(.25 * var(--hbcq-w)) solid #3a2c5c;border:.25cqw solid #3a2c5c;
    border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;padding:calc(0.713 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:0.713cqw 1.6cqw}
  .m-drag-skill img{width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;object-fit:contain;flex:none}
  .m-drag-skill b{display:block;font-family:'Cinzel',serif;font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw;color:#ffd75a}
  .m-drag-skill span{display:block;font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#e8dcff}
  .m-drag-skill.locked{opacity:.62}
  .m-drag-skill.locked b{color:#bdb3d6}
  /* HOW HARD IT HITS — option A + C (Roman, 2026-11-05; dragons.js _dragBreathRow / _dragStages): the hit, big and gold, at the
     skill row's right; NOW → NEXT side by side above Upgrade. Upright: portrait.css. */
  .m-drag-big{flex:none;margin-left:auto;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;line-height:1;color:#ffd75a;
    text-align:right;white-space:nowrap;text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.3 * var(--hbcq-w)) #000a;text-shadow:0 .2cqw .3cqw #000a}
  .m-drag-big small{display:block;margin-top:calc(.3 * var(--hbcq-w));margin-top:.3cqw;font-size:calc(1.4 * var(--hbcq-w));font-size:1.4cqw;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#e8dcff}
  .m-drag-stages{flex:none;display:flex;align-items:stretch;gap:calc(1 * var(--hbcq-w));gap:1cqw}
  .m-drag-st{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(.4 * var(--hbcq-w));gap:.4cqw;text-align:left;padding:calc(.9 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w));padding:.9cqw 1.4cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;
    background:#160f2ae6;border:calc(.25 * var(--hbcq-w)) solid #3a2c5c;border:.25cqw solid #3a2c5c}
  .m-drag-st.next{border-color:#7ee29a99;box-shadow:0 0 calc(1.2 * var(--hbcq-w)) #7ee29a22;box-shadow:0 0 1.2cqw #7ee29a22}
  .m-drag-st .lb{font-family:'Cinzel',serif;font-weight:900;font-size:calc(1.5 * var(--hbcq-w));font-size:1.5cqw;letter-spacing:.1em;text-transform:uppercase;color:#c9a24a}
  .m-drag-st b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;color:#f0e4c0}
  .m-drag-st.next b{color:#9df0b4}
  .m-drag-st em{font-style:normal;font-size:calc(1.6 * var(--hbcq-w));font-size:1.6cqw;line-height:1.3;color:#b9c6df}
  .m-drag-starrow{flex:none;align-self:center;width:calc(3 * var(--hbcq-w));width:3cqw;height:calc(2.4 * var(--hbcq-w));height:2.4cqw;background:url('heropopup/craft_arrow.webp') center/contain no-repeat}
  .m-drag-mslist{display:grid;grid-template-columns:repeat(2,1fr);gap:calc(0.594 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));gap:0.594cqw 1.6cqw}
  .m-drag-ms{display:flex;align-items:center;gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw;text-align:left;opacity:.55}
  .m-drag-ms.on{opacity:1}
  .m-drag-ms b{flex:none;width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(4.4 * var(--hbcq-w));height:4.4cqw;line-height:calc(4.4 * var(--hbcq-w));line-height:4.4cqw;border-radius:50%;background:#3a2c5c;text-align:center;
    font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#fff}
  .m-drag-ms.on b{background:#d69a1c}
  .m-drag-ms span{font-size:calc(1.65 * var(--hbcq-w));font-size:1.65cqw;color:#fff}
  .m-drag-grow{font-size:calc(1.7 * var(--hbcq-w));font-size:1.7cqw;color:#ffcf8a;margin-top:calc(0.475 * var(--hbcq-w));margin-top:0.475cqw}
  .m-drag-grow.stone{color:#9be38f}
  .m-drag-lvrow{display:flex;align-items:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;margin-top:calc(0.713 * var(--hbcq-w));margin-top:0.713cqw}
  .m-drag-lvbadge{flex:none;width:calc(6.4 * var(--hbcq-w));width:6.4cqw;height:calc(6.4 * var(--hbcq-w));height:6.4cqw;line-height:calc(6.4 * var(--hbcq-w));line-height:6.4cqw;border-radius:50%;text-align:center;
    background:url('level_badge.webp') center/100% no-repeat;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;color:#fff;
    text-shadow:0 calc(.2 * var(--hbcq-w)) calc(.4 * var(--hbcq-w)) #000;text-shadow:0 .2cqw .4cqw #000}
  /* OUR LEAF PILLS (Roman, 2026-10-30: "the buttons there are not our design"): UPGRADE / HATCH the green one (Settings'
     tab_on + its leaf crown tab_leaves, as game-popup.js), EQUIP the WOODEN one (tab_wood — Gemini, the green pill's shape
     and gold frame with a plank inside; Roman: "really fits our theme"); UNEQUIP the wooden one dimmed. Room above them
     for the leaves. */
  .m-drag-btns{display:flex;justify-content:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;margin-top:calc(3.4 * var(--hbcq-w));margin-top:3.4cqw}
  .m-drag-btn{position:relative;flex:1;max-width:calc(36 * var(--hbcq-w));max-width:36cqw;aspect-ratio:440/150;border:none;border-radius:0;padding:0;cursor:pointer;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(0.238 * var(--hbcq-w));gap:0.238cqw;
    background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat}
  .m-drag-btn::before{content:'';position:absolute;left:44.8%;bottom:98%;width:65.9%;aspect-ratio:290/69;transform:translateX(-50%);
    pointer-events:none;background:url('heropopup/settings/tab_leaves.webp') center/100% 100% no-repeat}
  .m-drag-btn:active{transform:scale(0.96)}
  .m-drag-btn span{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#fff8dc;text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d;text-shadow:0 .15cqw .25cqw #000d}
  .m-drag-btn em{font-style:normal;display:flex;align-items:center;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;font-weight:800;font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#fff;
    text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d;text-shadow:0 .15cqw .25cqw #000d}
  .m-drag-btn em img{width:calc(2.8 * var(--hbcq-w));width:2.8cqw;height:calc(2.8 * var(--hbcq-w));height:2.8cqw}
  .m-drag-btn.eq{background-image:url('heropopup/settings/tab_wood.webp')}
  .m-drag-btn.eq.on{filter:saturate(.45) brightness(.85)}
  .m-drag-btn.eq::before{display:none}   /* EQUIP and UNEQUIP without the leaves (Roman, 2026-10-30) — the plank has none */
  .m-drag-btn.off{filter:grayscale(.8) brightness(.75);pointer-events:none}
  .m-drag-note{font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;color:#ffcf8a;padding:calc(1.188 * var(--hbcq-w)) 0;padding:1.188cqw 0}
  .m-colo-actions{flex:none;display:flex;align-items:center;gap:calc(2 * var(--hbcq-w));gap:2cqw}
  .m-colo-start{flex:1;max-width:calc(52 * var(--hbcq-w));max-width:52cqw;margin:0 auto;aspect-ratio:723/202;cursor:pointer;border:none;padding:0;border-radius:0;
    font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;letter-spacing:.08em;color:#3a2408;text-shadow:0 1px 1px #ffd98a88;
    background:url('heropopup/golden_button.webp') center/100% 100% no-repeat;filter:drop-shadow(0 calc(.8 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w)) #0008);filter:drop-shadow(0 .8cqw 1.2cqw #0008)}
  .m-colo-start:hover{filter:brightness(1.1) drop-shadow(0 calc(.8 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w)) #0008);filter:brightness(1.1) drop-shadow(0 .8cqw 1.2cqw #0008)}
  .m-colo-start:active{transform:translateY(calc(.4 * var(--hbcq-w)));transform:translateY(.4cqw)}
  /* Save Progress: the SAVE | LOAD tabs sit under the title (the leaderboard's tab style), and Delete Account keeps its
     distance from Logout (2026-10-01). */
  .m-acct-tabs{margin-top:calc(4.2 * var(--hbcq-h));margin-top:4.2cqh}   /* room for the chosen tab's leaf crown (2026-10-02) */
  .m-settings-land #m-set-delete{margin-top:calc(4 * var(--hbcq-h));margin-top:4cqh}

  /* ═══ THE CLAIM CARD (popups-glue.js hbClaimBand — Roman, 2026-11-22: the weapon pick's ribbon and plates, then "everything must be
     identical — just make sure the text never leaves its borders"): every claim and free gift. A red ribbon with "YOU GOT", a navy
     plate under it (over the ribbon's tails) with what paid it and the rewards; its ribbon's top at 55.5% of the screen, just
     under the hero; 2.8 s. The big reveal below is for shop purchases and the mail only. Sized in px (a phone's page is ~412 px
     upright, ~915 sideways); the game's own card (Battle/RewardBand.cs + ClaimCard.cs) is the same at 2.6 of its units a px:
     ribbon 720 → 277, plate 900 → 346, the plate 182 → 70 under the ribbon's top. The plate is the stash frame sliced (its
     corners and top ornament whole: border-image widths = the slices × 346/1125). Words are fitted by hbCardFit, never cut.
     No cq units, no modern-only CSS (Chrome 88). */
  .hb-cband{position:fixed;left:50%;top:55.5%;width:346px;z-index:9700;pointer-events:none;
    transform:translateX(-50%);transform-origin:50% 0;animation:hb-cband-life 2.8s ease both}
  .hb-cband-card{position:relative;width:346px;animation:hb-cband-drop .35s cubic-bezier(.2,.8,.2,1) both}
  .hb-cband-rib{position:relative;width:277px;height:78.4px;margin:0 auto;
    background:url(claim/ribbon.webp) center/100% 100% no-repeat}
  .hb-cband-cap{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);white-space:nowrap;
    font-family:'Lilita One',sans-serif;font-weight:400;font-size:18.5px;line-height:1;letter-spacing:.02em;text-transform:uppercase;
    color:#fff;text-shadow:0 1.5px 0 #400514,0 0 2px #400514,0 2px 3px rgba(0,0,0,.6)}
  .hb-cband-plate{position:relative;box-sizing:border-box;width:346px;min-height:65px;margin-top:-8.4px;
    padding:24.6px 25.4px 17px;display:flex;flex-direction:column;align-items:center;
    border:0;border-image:url(claim/plate.webp) 110 70 90 70 fill / 33.8px 21.5px 27.7px 21.5px stretch}
  .hb-cband-src{max-width:100%;font-family:'Lilita One',sans-serif;font-weight:400;font-size:15.4px;line-height:1.25;
    color:#dfe3f5;text-align:center;white-space:nowrap;text-shadow:0 1.5px 2px #000}
  .hb-cband-items{margin-top:4px;height:40px;display:flex;align-items:center;justify-content:center;white-space:nowrap;
    transform-origin:50% 50%}
  .hb-cband-it{display:flex;align-items:center;flex:none;margin:0 10px;animation:hb-cband-pop .4s .12s cubic-bezier(.2,1.4,.4,1) both}
  .hb-cband-it b{font-family:'Lilita One',sans-serif;font-weight:400;font-size:23px;color:#f0d78f;text-shadow:0 2px 3px #000}
  .hb-cband-it.long b{font-size:17px}
  .hb-cband-it:nth-child(2){animation-delay:.24s}
  .hb-cband-it:nth-child(3){animation-delay:.36s}
  .hb-cband-it:nth-child(n+4){animation-delay:.48s}
  .hb-cband-it img{width:37px;height:37px;margin-right:6px;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
  /* sideways the screen is 412 px tall: the card at 0.8, its ribbon under the hero (the game's RewardBand: 0.575, 0.8) */
  @media (orientation:landscape){.hb-cband{top:57.5%;transform:translateX(-50%) scale(.8)}}
  @keyframes hb-cband-life{0%{opacity:0}10%{opacity:1}82%{opacity:1}100%{opacity:0}}
  @keyframes hb-cband-drop{from{transform:translateY(-10px)}to{transform:translateY(0)}}
  @keyframes hb-cband-pop{0%{transform:scale(.4);opacity:0}100%{transform:scale(1);opacity:1}}
  @media (prefers-reduced-motion:reduce){.hb-cband-card,.hb-cband-it{animation:none}}

  /* ═══ THE REWARD REVEAL (reward-reveal.js, 2026-10-10) — one reward at a time, big, then into its counter
     or the backpack; the chest's spinning strip; the "You got" summary. Above everything, over a run too. */
  .hb-reveal{position:fixed;inset:0;z-index:2147480000;display:flex;align-items:center;justify-content:center;
    background:radial-gradient(ellipse at center,rgba(20,12,40,.82) 0%,rgba(6,4,14,.94) 70%);
    font-family:'Cinzel',serif;color:#fff;opacity:0;transition:opacity .25s;overflow:hidden;touch-action:manipulation}
  .hb-reveal.show{opacity:1}
  .hb-rv-rays{position:absolute;left:50%;top:50%;width:170vmax;height:170vmax;margin:-85vmax 0 0 -85vmax;pointer-events:none;
    background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--rv,#ffd36b) 34%,transparent) 0deg 7deg,transparent 7deg 20deg);
    -webkit-mask:radial-gradient(circle,#000 0%,rgba(0,0,0,.6) 22%,transparent 48%);mask:radial-gradient(circle,#000 0%,rgba(0,0,0,.6) 22%,transparent 48%);
    animation:hbRvSpin 16s linear infinite}
  .hb-reveal.low .hb-rv-rays{animation:none;background:radial-gradient(circle,color-mix(in srgb,var(--rv,#ffd36b) 45%,transparent) 0%,transparent 45%)}
  .hb-reveal.summary .hb-rv-rays{opacity:.45}
  @keyframes hbRvSpin{to{transform:rotate(360deg)}}
  .hb-rv-stage{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:100%}
  .hb-rv-card{width:38vmin;padding:3vmin 2.4vmin 3.2vmin;border-radius:3vmin;text-align:center;
    background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 55%,#1a1030) 0%,#160c2a 100%);
    box-shadow:0 0 0 .5vmin var(--rc),0 0 7vmin color-mix(in srgb,var(--rc) 70%,transparent),0 2vmin 5vmin #000a}
  .hb-rv-icon{width:26vmin;height:26vmin;margin:0 auto 2vmin;display:flex;align-items:center;justify-content:center;
    border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--rc) 40%,transparent) 0%,transparent 70%)}
  .hb-rv-icon img{max-width:88%;max-height:88%;filter:drop-shadow(0 1vmin 1.6vmin #000c)}
  .hb-rv-name{font-size:4.2vmin;font-weight:900;line-height:1.15;text-shadow:0 .4vmin .8vmin #000}
  .hb-rv-rar{margin-top:1vmin;font-size:3vmin;font-weight:800;letter-spacing:.08em;text-transform:uppercase;text-shadow:0 .3vmin .6vmin #000}
  .hb-rv-bag{position:absolute;right:4vmin;bottom:4vmin;width:15vmin;z-index:3;pointer-events:none}
  .hb-rv-bag img{width:100%;display:block;filter:drop-shadow(0 1vmin 1.4vmin #000a)}
  .hb-rv-bagn{position:absolute;top:-1vmin;right:-1vmin;min-width:5vmin;padding:.4vmin 1vmin;border-radius:3vmin;background:#2fbf4a;
    color:#fff;font-weight:900;font-size:3vmin;text-align:center;box-shadow:0 .4vmin .8vmin #0008;opacity:0;transform:scale(.6);transition:all .2s}
  .hb-rv-bagn.on{opacity:1;transform:scale(1)}
  .hb-rv-skip{position:absolute;top:3.5vmin;right:4vmin;z-index:4;border:none;background:rgba(255,255,255,.12);color:#fff;
    font-family:inherit;font-weight:800;font-size:3vmin;padding:1.2vmin 3vmin;border-radius:3vmin;cursor:pointer}
  .hb-rv-tap{position:absolute;bottom:5vmin;left:0;right:0;text-align:center;font-size:2.8vmin;opacity:.7;z-index:2;pointer-events:none}
  .hb-reveal.summary .hb-rv-tap,.hb-reveal.summary .hb-rv-skip,.hb-reveal.spin .hb-rv-tap{display:none}
  /* the chest's strip */
  .hb-rv-reel{position:relative;width:min(92vw,140vmin);height:24vmin;overflow:hidden;border-radius:2vmin;
    background:rgba(0,0,0,.35);box-shadow:inset 0 0 3vmin #000c;-webkit-mask:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
    mask:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
  .hb-rv-strip{position:absolute;left:0;top:2vmin;display:flex;gap:8px;will-change:transform}
  .hb-rv-cell{flex:none;width:20vmin;height:20vmin;border-radius:1.6vmin;display:flex;align-items:center;justify-content:center;
    background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 45%,#1a1030),#140a26);box-shadow:inset 0 0 0 .4vmin var(--rc)}
  .hb-rv-cell img{max-width:78%;max-height:78%}
  .hb-rv-cell.win{box-shadow:inset 0 0 0 .7vmin #fff,0 0 5vmin var(--rc);transform:scale(1.08);transition:all .25s}
  .hb-rv-marker{position:absolute;left:50%;top:0;bottom:0;width:.6vmin;margin-left:-.3vmin;z-index:2;background:#ffd36b;box-shadow:0 0 2vmin #ffd36b}
  /* the summary */
  .hb-rv-sum{text-align:center;max-width:92vw}
  .hb-rv-sumt{font-size:6vmin;font-weight:900;color:#ffe08a;text-shadow:0 .5vmin 1vmin #000;margin-bottom:3vmin}
  .hb-rv-tiles{display:flex;flex-wrap:wrap;gap:2vmin;justify-content:center;margin-bottom:4vmin}
  .hb-rv-tile{width:22vmin;padding:1.6vmin 1vmin;border-radius:2vmin;background:linear-gradient(180deg,color-mix(in srgb,var(--rc) 45%,#1a1030),#140a26);
    box-shadow:inset 0 0 0 .4vmin var(--rc);display:flex;flex-direction:column;align-items:center;gap:1vmin}
  .hb-rv-tile img{width:12vmin;height:12vmin;object-fit:contain}
  .hb-rv-tile span{font-size:2.6vmin;font-weight:800;line-height:1.15}
  /* ENGINES WITHOUT color-mix() (Chrome < 111, Safari < 16.2 — 2026-10-18): every color-mix above holds a var(), so
     such an engine accepts the line and voids it when computing (no background, no glow at all). The same colours,
     premixed by reward-reveal.js (rcStyle / setRays). A modern engine skips this block and keeps its color-mix. */
  @supports not (color:color-mix(in srgb,red 50%,blue)){
    .hb-rv-rays{background:repeating-conic-gradient(from 0deg,var(--rv-a34,rgba(255,211,107,.34)) 0deg 7deg,transparent 7deg 20deg)}
    .hb-reveal.low .hb-rv-rays{background:radial-gradient(circle,var(--rv-a45,rgba(255,211,107,.45)) 0%,transparent 45%)}
    .hb-rv-card{background:linear-gradient(180deg,var(--rc-m55) 0%,#160c2a 100%);
      box-shadow:0 0 0 .5vmin var(--rc),0 0 7vmin var(--rc-a70),0 2vmin 5vmin #000a}
    .hb-rv-icon{background:radial-gradient(circle,var(--rc-a40) 0%,transparent 70%)}
    .hb-rv-cell{background:linear-gradient(180deg,var(--rc-m45),#140a26)}
    .hb-rv-tile{background:linear-gradient(180deg,var(--rc-m45),#140a26)}
  }
  .hb-rv-ok{border:none;cursor:pointer;font-family:inherit;font-weight:900;font-size:4vmin;color:#3a2400;padding:1.6vmin 9vmin;border-radius:3vmin;
    background:linear-gradient(180deg,#ffe07a,#f3a41b);box-shadow:0 .6vmin 0 #a8650c,0 1vmin 2vmin #0008}

/* THE ACCOUNT WINDOW, READABLE (Roman, 2026-10-13: "enlarge the font of the text there, you can't see it — and the
   Save / Load buttons and their text a little too"). Scoped to #google-modal so no other popup moves. */
#google-modal #m-google-status{font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;line-height:1.4;padding:calc(2.5 * var(--hbcq-h)) calc(2 * var(--hbcq-w));padding:2.5cqh 2cqw;color:#e8dcc0}
#google-modal .m-google-linked{font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;font-weight:700;color:#9be38a;text-align:center;line-height:1.4}
#google-modal #m-google-err,#google-modal #m-save-err{font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw}
#google-modal .m-save-or{font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw}
#google-modal .m-acct-tabs .m-lb-tab{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;max-width:calc(32 * var(--hbcq-w));max-width:32cqw}

/* THE PHONE BLOCKS ADS (2026-11-05, ads.js setBlocked — AdsBridge.PhoneBlocksAds): every ad button dims, matched by the
   handler it calls so none is missed. Opacity only — it moves and resizes nothing, in either layout. A tap still reaches
   ads.js, which says why (an ad blocker, Private DNS or VPN, probably) and lets the game try an ad again. */
html.hb-ads-blocked [onclick*="handleWatchAd"],
html.hb-ads-blocked [onclick*="onStatAd"],
html.hb-ads-blocked [onclick*="claimWatchAdDaily"],
html.hb-ads-blocked [onclick*="onCraftAdBoost"],
html.hb-ads-blocked [onclick*="_galtarAdBoost"]{opacity:.45}

.m-apple-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px 0 8px;
  border: 1px solid white;
  border-radius: 8px;
  background: black;
  color: white;
  font: 500 16px -apple-system, sans-serif;
}
.m-apple-signin img { width: 32px; height: 32px; }
.m-apple-signin:disabled { opacity: .6; }
