:root{--hbcq-w:1vw;--hbcq-h:1vh;--hbcq-min:1vmin;--hbcq-max:1vmax}
/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   THE LOBBY UPRIGHT (2026-10-22 — Roman's window list, the easy ones first).

   Every rule here is under html.hb-portrait-peek (set when Settings → Orientation → PORTRAIT is chosen, lobby.html sets
   it before paint), so the landscape lobby is untouched. Upright the height is the LONG side: a frame sized by height
   with a vw cap (the landscape formula) came out a small card a third of the screen tall. Here the frames keep their
   art's shape and are sized by WIDTH; everything inside them is in cq units, so it grows with them, unchanged.
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* 1. THE SETTINGS FRAME, BIGGER — the chest pool, currency info, Google account and promo code popups share it and
   grow with it (Settings itself is made taller in 2). The Leaderboard shares the class but is being redesigned. */
html.hb-portrait-peek .m-settings-land:not(.m-lb-land){height:auto;width:min(92vw,calc(86vh*1180/1402))}

/* 2. SETTINGS AND THE SHOP, TALLER — "make them longer" (Roman, 2026-10-22, after step one made them only bigger).
   ── The frame: shop_frame.webp drawn as a NINE-SLICE on ::before (slices 170 / 50 / 145 / 50 art px), so the leaf
      header and the bottom corners keep their size and only the plain sides stretch. The widths are the art's own
      scale (header 170/1180 of the width, as the old 1180x1402 drawing showed it; sides 50/1122), so at the art's
      height the panel looks exactly as before.
   ── The inside: every height-based size in these two windows is restated by WIDTH below (1cqh of the frame's own
      1180x1402 shape = 1.188cqw), so the title stays in its plank and every gap is today's; the extra height is room
      for more rows. DERIVED FROM popups.css — a value changed there must be changed here too.
   The four small popups on the same frame (chest pool, currency info, Google, promo) keep step one's size. */
html.hb-portrait-peek #settings-modal .m-settings-land,
html.hb-portrait-peek #guide-modal .m-settings-land,
html.hb-portrait-peek #arena-settings-modal .m-settings-land,
html.hb-portrait-peek #store-modal .m-store-land{aspect-ratio:auto;width:min(96vw,calc(82vh*1180/1402*1.6));height:82vh;
  background:none;isolation:isolate}
html.hb-portrait-peek #settings-modal .m-settings-land::before,
html.hb-portrait-peek #guide-modal .m-settings-land::before,
html.hb-portrait-peek #arena-settings-modal .m-settings-land::before,
html.hb-portrait-peek #store-modal .m-store-land::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}
html.hb-portrait-peek #settings-modal .m-settings-land .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
/* THE GUIDE (2026-11-20, Roman: "a long window like Settings"): the same tall frame, its plank and its gaps. */
html.hb-portrait-peek #guide-modal .m-settings-land .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
/* BIGARENA'S SETTINGS (2026-11-26): the same tall frame, its plank and its gaps. */
html.hb-portrait-peek #arena-settings-modal .m-settings-land .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #arena-settings-modal .m-settings-land .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #arena-settings-modal .m-settings-land .m-settings-content{gap:calc(1.901 * var(--hbcq-w));gap:1.901cqw;margin:calc(4.158 * var(--hbcq-w)) 0 calc(2.97 * var(--hbcq-w));margin:4.158cqw 0 2.97cqw;padding:calc(3.564 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) calc(7.129 * var(--hbcq-w));padding:3.564cqw 3cqw 7.129cqw}
html.hb-portrait-peek #guide-modal .m-settings-land .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #guide-modal .m-settings-land .m-settings-content{margin:calc(4.158 * var(--hbcq-w)) 0 calc(2.97 * var(--hbcq-w));margin:4.158cqw 0 2.97cqw;padding:calc(3.564 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) calc(7.129 * var(--hbcq-w));padding:3.564cqw 3cqw 7.129cqw}
/* THE BOATMAN'S WINDOW (2026-11-14, redesign/boat.js): the tall nine-slice frame, shaped for its list (100:136, at most 82% of the
   screen) — the small Settings frame cut the third trip off. */
html.hb-portrait-peek #boat-modal .m-boat{aspect-ratio:100/136;width:min(96vw,calc(82vh*100/136));height:auto;max-height:82vh;
  background:none;isolation:isolate}
html.hb-portrait-peek #boat-modal .m-boat::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}
html.hb-portrait-peek #boat-modal .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #boat-modal .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
/* FAST TRAVEL (2026-11-22): the Boatman's frame, shorter — one row, not a list */
html.hb-portrait-peek #travel-modal .m-boat{aspect-ratio:100/90;width:min(96vw,calc(82vh*100/90));height:auto;max-height:82vh;
  background:none;isolation:isolate}
html.hb-portrait-peek #travel-modal .m-boat::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}
html.hb-portrait-peek #travel-modal .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #travel-modal .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
/* THE EVENTS (2026-11-02): the same tall frame as Settings — a list wants the height */
html.hb-portrait-peek #events-modal .m-ev-land{aspect-ratio:auto;width:min(96vw,calc(82vh*1180/1402*1.6));height:82vh;background:none;isolation:isolate}
html.hb-portrait-peek #events-modal .m-ev-land::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}
html.hb-portrait-peek #events-modal .m-ev-land .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #events-modal .m-ev-land .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #settings-modal .m-settings-land .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #settings-modal .m-settings-build{padding:calc(1.663 * var(--hbcq-w)) 0 calc(0.713 * var(--hbcq-w));padding:1.663cqw 0 0.713cqw}
html.hb-portrait-peek #settings-modal .m-settings-land .m-settings-content{gap:calc(1.901 * var(--hbcq-w));gap:1.901cqw;margin:calc(4.158 * var(--hbcq-w)) 0 calc(2.97 * var(--hbcq-w));margin:4.158cqw 0 2.97cqw;padding:calc(3.564 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) calc(7.129 * var(--hbcq-w));padding:3.564cqw 3cqw 7.129cqw}
html.hb-portrait-peek #settings-modal .m-settings-sec-title{margin:calc(1.663 * var(--hbcq-w)) 0 calc(1.188 * var(--hbcq-w));margin:1.663cqw 0 1.188cqw}
html.hb-portrait-peek #settings-modal .m-sound-col{gap:calc(1.426 * var(--hbcq-w));gap:1.426cqw}
html.hb-portrait-peek #settings-modal .m-sound-vol{height:calc(4.753 * var(--hbcq-w));height:4.753cqw}
html.hb-portrait-peek #settings-modal .m-perf-btn{height:calc(10.218 * var(--hbcq-w));height:10.218cqw}
html.hb-portrait-peek #settings-modal .m-perf-btn.on{height:calc(12.357 * var(--hbcq-w));height:12.357cqw}
html.hb-portrait-peek #settings-modal .m-settings-land #m-set-delete{margin-top:calc(4.753 * var(--hbcq-w));margin-top:4.753cqw}
/* LANGUAGE IN TWO COLUMNS, AND AIR UNDER IT (Roman, 2026-11-01: "space between Report a Problem and the languages, and the
   languages in 2 columns, 3 and 3 — a row full of buttons doesn't look good"). Six pills in one row were a sixth of the
   width each, with 2.4cqw names. Now each is a Shadows / Orientation pill (half the row) with their label size, three rows
   of two; every row is the selected pill's height so the diamond never shifts the rhythm. Report a Problem stands off
   them by the gap Delete Account has. Landscape keeps its row (popups.css). */
html.hb-portrait-peek #settings-modal .m-lang-row{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:calc(12.357 * var(--hbcq-w));grid-auto-rows:12.357cqw;
  align-items:end;column-gap:calc(2.4 * var(--hbcq-w));column-gap:2.4cqw;row-gap:calc(.6 * var(--hbcq-w));row-gap:.6cqw}
html.hb-portrait-peek #settings-modal .m-lang-row .m-perf-btn{width:100%}
html.hb-portrait-peek #settings-modal .m-lang-row .m-perf-label{font-size:calc(4.1 * var(--hbcq-w));font-size:4.1cqw;letter-spacing:.03em;padding:0 calc(1 * var(--hbcq-w));padding:0 1cqw}
html.hb-portrait-peek #settings-modal .m-lang-row .m-lang-btn.long .m-perf-label{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;letter-spacing:0}
html.hb-portrait-peek #settings-modal .m-settings-land #m-set-report{margin-top:calc(4.753 * var(--hbcq-w));margin-top:4.753cqw}
html.hb-portrait-peek #store-modal .m-store-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #store-modal .m-store-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #store-modal .m-store-body{padding:calc(0 * var(--hbcq-w)) calc(0.7 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) calc(0.7 * var(--hbcq-w));padding:0cqw 0.7cqw 8cqw 0.7cqw}   /* inside the opening, §3e */
html.hb-portrait-peek #store-modal .m-shop-balance{margin:calc(4.6 * var(--hbcq-w)) auto 0;margin:4.6cqw auto 0;padding:calc(1.188 * var(--hbcq-w)) 0 calc(2.139 * var(--hbcq-w));padding:1.188cqw 0 2.139cqw}
/* THE PACKS UPRIGHT (2026-10-29): a slide stands — name, island, contents, price, one under the other (landscape lies it
   on its side, popups.css). */
html.hb-portrait-peek #store-modal .m-packs-slide{display:flex;flex-direction:column;align-items:center;padding:0}
html.hb-portrait-peek #store-modal .m-packs-art{width:48%}   /* 64% until 2026-10-30 — Roman: "a bit big, 25% smaller" */
html.hb-portrait-peek #store-modal .m-packs-items{flex-wrap:nowrap;align-self:center}   /* landscape's end = the right side here */
html.hb-portrait-peek #store-modal .m-packs-items .m-packpop-tile{height:calc(15 * var(--hbcq-w));height:15cqw;width:calc(15 * var(--hbcq-w));width:15cqw}
html.hb-portrait-peek #store-modal .m-packs .m-pack-buy{width:46%;align-self:center}
html.hb-portrait-peek #store-modal .m-packs-next,
html.hb-portrait-peek #store-modal .m-packs-prev{top:30%;width:calc(14.4 * var(--hbcq-w));width:14.4cqw}   /* beside the island; 16cqw until 2026-10-30 ("arrows 10% smaller") */
html.hb-portrait-peek #store-modal .m-shoptitle{padding-top:calc(5.941 * var(--hbcq-w));padding-top:5.941cqw}
html.hb-portrait-peek #store-modal .m-store-grid{row-gap:calc(1.901 * var(--hbcq-w));row-gap:1.901cqw}
html.hb-portrait-peek #store-modal .m-store-img{margin:calc(1.069 * var(--hbcq-w)) auto;margin:1.069cqw auto}
html.hb-portrait-peek #store-modal .m-store-chestdesc{margin:calc(0.238 * var(--hbcq-w)) 0;margin:0.238cqw 0}
html.hb-portrait-peek #store-modal .m-shopgear-section{margin-bottom:calc(1.901 * var(--hbcq-w));margin-bottom:1.901cqw}
html.hb-portrait-peek #store-modal .m-shopgear-section .m-shoptitle{margin-top:calc(4.753 * var(--hbcq-w));margin-top:4.753cqw;margin-bottom:calc(1.426 * var(--hbcq-w));margin-bottom:1.426cqw}
html.hb-portrait-peek #store-modal .m-shopgear-row{row-gap:calc(1.901 * var(--hbcq-w));row-gap:1.901cqw;padding:calc(0.238 * var(--hbcq-w)) 0 calc(0.356 * var(--hbcq-w));padding:0.238cqw 0 0.356cqw}

/* 3. THE COLOSSEUM — "it's pretty, just bigger" (the settings frame, its own class). */
html.hb-portrait-peek .m-settings-land.m-colo{width:min(96vw,calc(92vh*1180/1402))}

/* 3b. THE DRAGONS — TALL (Roman, 2026-10-29: "make it longer — this popup is too small for all this content"): the Shop's
   upright frame (§2 above: shop_frame as a nine-slice, 88% of the screen tall). Every size inside is in cqw (popups.css),
   so the extra height is room, not bigger parts; the title and the close sit where the Shop's do. */
html.hb-portrait-peek .m-settings-land.m-drag{aspect-ratio:auto;width:min(96vw,calc(88vh*1180/1402*1.6));height:88vh;
  background:none;isolation:isolate}
html.hb-portrait-peek .m-settings-land.m-drag::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}
html.hb-portrait-peek .m-settings-land.m-drag .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek .m-settings-land.m-drag .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek .m-settings-land.m-drag .m-drag-body{padding:calc(2.4 * var(--hbcq-w)) calc(2.7 * var(--hbcq-w)) calc(7 * var(--hbcq-w));padding:2.4cqw 2.7cqw 7cqw}   /* inside the opening, §3e */
html.hb-portrait-peek .m-settings-land.m-drag .m-drag-eggs{margin-left:calc(-2.7 * var(--hbcq-w));margin-left:-2.7cqw;margin-right:calc(-2.7 * var(--hbcq-w));margin-right:-2.7cqw}   /* edge to edge of the opening */
/* 3d. THE BATTLE PASS — TALL (2026-11-09, redesign/battle-pass.js): the dragons' tall frame (§3b), its own body and foot. */
html.hb-portrait-peek .m-settings-land.m-bpass{aspect-ratio:auto;width:min(96vw,calc(88vh*1180/1402*1.6));height:88vh;
  background:none;isolation:isolate}
html.hb-portrait-peek .m-settings-land.m-bpass::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}
html.hb-portrait-peek .m-settings-land.m-bpass .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek .m-settings-land.m-bpass .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek .m-settings-land.m-bpass .m-bp-body{padding:calc(2.4 * var(--hbcq-w)) calc(1.7 * var(--hbcq-w)) calc(5 * var(--hbcq-w));padding:2.4cqw 1.7cqw 5cqw}
html.hb-portrait-peek .m-settings-land.m-bpass .m-bp-rankrow{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}   /* edge to edge of the OPENING */
html.hb-portrait-peek .m-settings-land.m-bpass .m-bp-foot{display:none}

/* 3e. THE LIST STAYS INSIDE THE FRAME — now one rule for both layouts: popups.css "THEME RULES, BOTH LAYOUTS" (2026-11-14). */
/* 3c. A DRAGON'S CARD UPRIGHT (dragons.js _dragCardUp) — the weapon card (§8) as it is, the dragon's element colouring its
   pill and its tile (inside the card, so they outrank §8's grey default). The card scrolls as a whole, like a weapon's. */
html.hb-portrait-peek .m-drag-cardpop [data-rar=fire]{--tile-a:#ff9a5a;--tile-b:#d9521f;--tile-rim:#7a2a0c}
html.hb-portrait-peek .m-drag-cardpop [data-rar=ice]{--tile-a:#86d8ff;--tile-b:#3b9be0;--tile-rim:#1c5a86}
html.hb-portrait-peek .m-drag-cardpop [data-rar=lightning]{--tile-a:#ffe46a;--tile-b:#e0b21c;--tile-rim:#86650a}
html.hb-portrait-peek .m-drag-cardpop [data-rar=wind]{--tile-a:#93e8a0;--tile-b:#3fae55;--tile-rim:#1d672b}
html.hb-portrait-peek .m-drag-cardpop [data-rar=light]{--tile-a:#fff2b8;--tile-b:#e3c45a;--tile-rim:#8a7228}
html.hb-portrait-peek .m-drag-cardpop [data-rar=dark]{--tile-a:#b98eff;--tile-b:#6f45c8;--tile-rim:#3a1f72}
html.hb-portrait-peek .m-drag-cardpop .m-itemd-body{flex:none;overflow:visible}
html.hb-portrait-peek .m-drag-cardpop .m-drag-fraglbl{font-size:3vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-bar.big{height:5.2vw;border-radius:2.6vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-bar.big b{line-height:5vw;font-size:3vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btns{padding:1vw 0;gap:3vw;margin-top:5vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn{max-width:38vw}
/* the element's pill beside the dragon, over its eggs (Roman, 2026-10-30), not centred over the card */
html.hb-portrait-peek .m-drag-cardpop .m-pti-side .m-pti-rar{align-self:flex-start;margin:0 0 1.2vw}
/* it names the dragon now ("LIGHTNING DRAGON", 2026-10-30): one line in every language — "DRAGÓN DE OSCURIDAD" wrapped */
html.hb-portrait-peek .m-drag-cardpop .m-pti-side .m-pti-rar{white-space:nowrap;max-width:100%;font-size:2.7vw;
  letter-spacing:.05em;padding:.9vw 3vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn span{font-size:4vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn em{font-size:3.2vw;gap:1vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn em img{width:4vw;height:4vw}
/* THE EGGS BESIDE THE BAR AND IN UPGRADE'S COST (Roman, 2026-10-31: "the egg's picture, how many I have of how many") */
html.hb-portrait-peek .m-drag-cardpop .m-drag-eggrow{display:flex;align-items:center;gap:1.4vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-eggrow>img{width:7vw;height:7vw;object-fit:contain;flex:none}
/* the egg IN the bar, right before have/need (2026-11-01) — the six cards and the dragon's card alike. Static: the card's own
   picture rule (.m-drag-card img: absolute, 84% wide) would otherwise catch it. */
html.hb-portrait-peek .m-drag-bar b img.m-drag-barimg{position:static;left:auto;top:auto;height:1.3em;width:auto;vertical-align:middle;margin:-.15em .25em 0 0;filter:none}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn em b.m-drag-eggcost{display:flex;align-items:center;gap:.6vw;margin-left:1.6vw;font-weight:800}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn em b.m-drag-eggcost img{width:4.6vw;height:4.6vw;object-fit:contain}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btn em b.m-drag-eggcost.short{color:#ff8a7a}
html.hb-portrait-peek .m-drag-cardpop .m-drag-bonus{gap:2vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btile{padding:1.4vw 1.2vw;gap:1.2vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btile img{width:7vw;height:7vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btile span{font-size:4.4vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btile em{font-size:3.2vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-btile small{font-size:2.7vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-rtitle{font-size:3.4vw}
html.hb-portrait-peek .m-drag-cardpop .m-pti-sec .m-drag-mslist{margin-top:.6vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-lblist{max-height:62vw;gap:1.2vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-lb{padding:1.6vw 2.4vw;border-radius:2vw;gap:2.6vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-lb b{min-width:13vw;font-size:3.6vw}
html.hb-portrait-peek .m-drag-cardpop .m-drag-lb span{font-size:3.3vw}

/* 4. QUESTS — "like Settings" (Roman, 2026-10-22): full width, 82% of the screen tall. Its own frame (quest2/frame.webp,
   607x909) as a NINE-SLICE: slices 130 / 28 / 164 / 28 art px — the leaf header, and the bottom panel the Main / Daily /
   Arena tabs sit in, keep their size; the plain sides stretch. Drawn at the vertical scale the old 607x750 box showed
   them (909 squashed to 750), so the header and the tab panel look exactly as before. Inside, the 21 height-based sizes
   are restated by width (1cqh of the 607x750 shape = 1.236cqw): the title stays pinned from the top, the tab bar from
   the bottom (its top + bottom pair became bottom + height), and the list stretches between them — about six quests
   in view instead of four. DERIVED FROM popups.css — a value changed there must be changed here too. */
html.hb-portrait-peek #quest2-modal .m-quest2-land{aspect-ratio:auto;width:min(96vw,calc(82vh*607/909*1.4));height:82vh;
  background:none;isolation:isolate}
html.hb-portrait-peek #quest2-modal .m-quest2-land::before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;
  pointer-events:none;border-style:solid;border-width:calc(17.672 * var(--hbcq-w)) calc(4.613 * var(--hbcq-w)) calc(22.294 * var(--hbcq-w)) calc(4.613 * var(--hbcq-w));border-width:17.672cqw 4.613cqw 22.294cqw 4.613cqw;
  border-image:url('heropopup/quest2/frame.webp') 130 28 164 28 fill stretch}
html.hb-portrait-peek #quest2-modal .m-quest2-close{top:calc(-0.247 * var(--hbcq-w));top:-0.247cqw;right:calc(-0.6 * var(--hbcq-w));right:-0.6cqw;width:calc(10.379 * var(--hbcq-w));width:10.379cqw}   /* right: pulled in — full width, its old -3.2cqw ran past the screen's edge */
html.hb-portrait-peek #quest2-modal .m-quest2-title{top:calc(3.089 * var(--hbcq-w));top:3.089cqw;height:calc(12.603 * var(--hbcq-w));height:12.603cqw;font-size:calc(5.313 * var(--hbcq-w));font-size:5.313cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-body{top:calc(17.298 * var(--hbcq-w));top:17.298cqw;bottom:calc(19.769 * var(--hbcq-w));bottom:19.769cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-empty{font-size:calc(4.942 * var(--hbcq-w));font-size:4.942cqw;padding:calc(4.942 * var(--hbcq-w)) calc(1 * var(--hbcq-w));padding:4.942cqw 1cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-lineglow{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-linedim{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-node{font-size:calc(4.448 * var(--hbcq-w));font-size:4.448cqw;box-shadow:0 0 calc(.9 * var(--hbcq-w)) rgba(140,255,90,.75),inset 0 0 0 calc(0.185 * var(--hbcq-w)) rgba(0,0,0,.3);box-shadow:0 0 .9cqw rgba(140,255,90,.75),inset 0 0 0 0.185cqw rgba(0,0,0,.3)}
html.hb-portrait-peek #quest2-modal .m-quest2-node.current{box-shadow:0 0 calc(1.2 * var(--hbcq-w)) rgba(255,210,90,.95),inset 0 0 0 calc(0.185 * var(--hbcq-w)) rgba(0,0,0,.3);box-shadow:0 0 1.2cqw rgba(255,210,90,.95),inset 0 0 0 0.185cqw rgba(0,0,0,.3)}
html.hb-portrait-peek #quest2-modal .m-quest2-node.locked{box-shadow:inset 0 0 0 calc(0.185 * var(--hbcq-w)) rgba(0,0,0,.3);box-shadow:inset 0 0 0 0.185cqw rgba(0,0,0,.3)}
html.hb-portrait-peek #quest2-modal .m-quest2-icon{font-size:calc(4.201 * var(--hbcq-w));font-size:4.201cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-mid{gap:calc(0.618 * var(--hbcq-w));gap:0.618cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-bar{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-barfill{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-navbar{top:auto;bottom:calc(2.718 * var(--hbcq-w));bottom:2.718cqw;height:calc(12.974 * var(--hbcq-w));height:12.974cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-navbtn{font-size:calc(4.695 * var(--hbcq-w));font-size:4.695cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-progresstrack{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-progressfill{border-radius:calc(1.236 * var(--hbcq-w));border-radius:1.236cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-devskip{margin-top:calc(1.483 * var(--hbcq-w));margin-top:1.483cqw;padding:calc(1.236 * var(--hbcq-w)) 0;padding:1.236cqw 0;border-radius:calc(0.741 * var(--hbcq-w));border-radius:0.741cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-sechead{margin:calc(1.73 * var(--hbcq-w)) 0 calc(0.741 * var(--hbcq-w)) calc(1 * var(--hbcq-w));margin:1.73cqw 0 0.741cqw 1cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-locked{padding:calc(7.414 * var(--hbcq-w)) calc(4 * var(--hbcq-w));padding:7.414cqw 4cqw}
html.hb-portrait-peek #quest2-modal .m-quest2-sub{margin-top:calc(-0.371 * var(--hbcq-w));margin-top:-0.371cqw}
html.hb-portrait-peek #quest2-modal .m-sq-head{font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;padding:0 calc(3 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:0 3cqw 1.6cqw}
/* the side-quest map upright (2026-11-21): four islands across the narrow window */
html.hb-portrait-peek #quest2-modal .m-sq-map{padding:calc(.6 * var(--hbcq-h)) calc(2.5 * var(--hbcq-w)) calc(.4 * var(--hbcq-h));padding:.6cqh 2.5cqw .4cqh}
html.hb-portrait-peek #quest2-modal .m-sq-stop{flex-basis:calc(20 * var(--hbcq-w));flex-basis:20cqw}
html.hb-portrait-peek #quest2-modal .m-sq-name{font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw}
html.hb-portrait-peek #quest2-modal .m-sq-line{font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw}
html.hb-portrait-peek #quest2-modal .m-sq-tick,html.hb-portrait-peek #quest2-modal .m-sq-maplock{width:calc(5.4 * var(--hbcq-w));width:5.4cqw;height:calc(5.4 * var(--hbcq-w));height:5.4cqw;top:calc(-1.4 * var(--hbcq-w));top:-1.4cqw;right:calc(-1.4 * var(--hbcq-w));right:-1.4cqw}
html.hb-portrait-peek #quest2-modal .m-sq-path{flex-basis:calc(2 * var(--hbcq-w));flex-basis:2cqw;margin-top:calc(6.4 * var(--hbcq-w));margin-top:6.4cqw}
html.hb-portrait-peek #quest2-modal .m-sq-lock{width:calc(5 * var(--hbcq-w));width:5cqw;height:calc(5 * var(--hbcq-w));height:5cqw;top:calc(-1 * var(--hbcq-w));top:-1cqw;right:calc(-1 * var(--hbcq-w));right:-1cqw}

/* 5. THE MAILBOX — "smaller" (it ran the full screen height). Its letter art's shape kept. */
html.hb-portrait-peek .m-mail-land{height:auto;width:min(86vw,calc(78vh*720/1098))}

/* 6. THE PACK OFFER — "smaller" (squeezed to the width at 94% of the height, its row of prizes ran off both sides).
   Its own shape kept, so the four prize tiles fit again. */
html.hb-portrait-peek .m-packpop{height:auto;width:min(84vw,calc(72vh*640/1000))}

/* 7. THE BAG UPRIGHT — Skull Hero's layout (Roman, 2026-10-22: "learn their window"; all four slots one size, no
   currencies here — they live in the shop). FULL SCREEN, NOT A WINDOW ("it must be full screen, not a popup, like
   Skull Hero's"): the top half is our world (the lobby's castle-and-river picture) with the hero on his platform and the
   slots two by two, two pills under him (damage, HP) and STATS (a popup); a wooden bar with the six element stones and
   FORGE; the bottom half a navy panel with the filters and the item grid. The name and level on a small plate in the
   corner, the close button in the other. No tabs upright: the bag opens on its inventory (hero-main.js); the Abilities
   move into the weapon's card. Everything inside is in this card's own units (it is the full screen). */
.m-pt-pills,.m-pt-bar{display:none}   /* hero-main.js puts them in on every screen; only the upright bag draws them */
html.hb-portrait-peek .m-chcard{padding:0;background:#050a16}
/* THE UPRIGHT COLUMN (2026-11-25, a player on a Galaxy Tab A9 in a window, 800x868: "the bottom of the Stone's and the Sorceress'
   menu is missing" — the Forge's weapon list sat 142 px below the screen). A full-screen upright window is laid out in cq units
   of its own width, so on a screen squarer than a phone it grew taller than the screen. On anything squarer than 9:16 it keeps a
   phone-shaped column in the middle (the sides show the dimmed game); on a phone (narrower than 9:16) it is the full width, as
   before. A new full-screen upright window takes var(--pt-col), never 100vw. */
html.hb-portrait-peek{--pt-col:min(100vw,calc(100vh*9/16))}
html.hb-portrait-peek .m-chcard-inner.skinned{width:var(--pt-col);margin-left:auto;margin-right:auto;height:100vh;max-height:none;aspect-ratio:auto;border-radius:0;
  background:#0f1d3a;box-shadow:none}
/* NO name-and-level plate upright (Roman, 2026-10-22: "why do I need the player's name and level here? delete it") —
   the lobby's frame shows both. ⚠ The rename pencil lived on it: upright, a hero is renamed in landscape only for now.
   No tabs, no ACTIVE plate either. */
html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-topbar,
html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-tabs,
html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-active.show{display:none}
/* the leaf X (Roman: "the X in the corner — take the one with the leaves"; tmp/six elements/stash/new_close.png) */
html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-close{top:calc(2.2 * var(--hbcq-w));top:2.2cqw;right:calc(2.6 * var(--hbcq-w));right:2.6cqw;width:calc(12 * var(--hbcq-w));width:12cqw;aspect-ratio:120/136;z-index:7;
  background-image:url('heropopup/close_leaf.webp')}
html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-panels{height:calc(100 * var(--hbcq-h));height:100cqh;padding:0}
/* top: our world behind the hero and the four slots; the pills under him */
html.hb-portrait-peek .m-chcard-inner.skinned .m-hc-invrow{flex-direction:column;gap:0}
html.hb-portrait-peek .m-chcard-inner.skinned .m-hc-invleft{flex:none;overflow:visible;padding:calc(14 * var(--hbcq-w)) 0 calc(3.4 * var(--hbcq-w));padding:14cqw 0 3.4cqw;
  background:url('background_wide.webp') 50% 72%/cover no-repeat}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock{width:calc(78 * var(--hbcq-w));width:78cqw;margin:0 auto;background:none}   /* no frame inside the frame (Roman) */
/* THE DRAGONS' SQUARE + THE PENTAGON (2026-11-06, Roman: the Dragons button leaves the HUD for the bag; from the picture he
   picked: "raise the dragon card a bit and lower the helmet and sword a bit, like a pentagon"). The square sits top centre,
   the size of a slot and in its frame; the helmet and the weapon step down 13cqw, the armour and the shield stay where they
   were. Upright only — landscape has no square (hero-main.js _pdDragSlotHtml; its dragon: Hb3DViewer.setPet). */
.m-pd-drag{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-drag{display:block;position:absolute;left:50%;top:calc(-7.5 * var(--hbcq-w));top:-7.5cqw;z-index:4;
  width:calc(19.4 * var(--hbcq-w));width:19.4cqw;aspect-ratio:277/406;transform:translateX(-50%);margin:0;padding:0;border:none;cursor:pointer;
  background:url('heropopup/slot_empty.webp') center/100% 100% no-repeat}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-drag:active{transform:translateX(-50%) scale(.95)}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-col{padding-top:calc(13 * var(--hbcq-w));padding-top:13cqw}
html.hb-portrait-peek .m-pd-drag-pic{position:absolute;left:10%;top:13%;width:80%;height:56%;pointer-events:none;
  background:url('dragons/silhouette.webp') center/contain no-repeat}
html.hb-portrait-peek .m-pd-drag-lbl{position:absolute;left:4%;right:4%;bottom:13%;text-align:center;pointer-events:none;
  font-family:'Cinzel',serif;font-weight:900;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;
  color:#f0d890;text-shadow:0 1px 2px #000c}
html.hb-portrait-peek .m-pd-drag.none .m-pd-drag-lbl{color:#9aa3b5}
/* …but the stone platform he stands on is painted into that frame: only the platform shows, through a soft oval mask
   over the same picture (no new art) — exactly where it always was under his feet. */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock::before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;
  z-index:0;pointer-events:none;background:url('heropopup/hero_frame.webp') center/100% 100% no-repeat;
  -webkit-mask-image:radial-gradient(ellipse 49% 14.6% at 50% 83%,#000 80%,transparent 100%);
  mask-image:radial-gradient(ellipse 49% 14.6% at 50% 83%,#000 80%,transparent 100%)}
/* the worn piece's LEVEL INSIDE its slot, top left — it sat under the slot, where Roman could not find it (2026-11-01);
   the element stone keeps the top right. right/bottom auto: the base .m-pd-lv hangs it -6%..-16% outside the slot */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-slot .m-pd-lv{position:absolute;top:4%;left:4%;right:auto;bottom:auto;
  text-align:left;z-index:4;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;
  line-height:1.25;padding:calc(.3 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w));padding:.3cqw 1.2cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;background:rgba(10,16,32,.82);box-shadow:inset 0 0 0 1px #c9a24a88;
  font-family:'Cinzel',serif;font-weight:900;color:#f0e4c0;white-space:nowrap;pointer-events:none}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-hint{display:none}
html.hb-portrait-peek .m-pt-pills{display:flex;align-items:center;justify-content:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;margin-top:calc(1.6 * var(--hbcq-w));margin-top:1.6cqw}
html.hb-portrait-peek .m-pt-pill{display:flex;align-items:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;height:calc(8.6 * var(--hbcq-w));height:8.6cqw;padding:0 calc(3.4 * var(--hbcq-w)) 0 calc(2.4 * var(--hbcq-w));padding:0 3.4cqw 0 2.4cqw;
  background:url('heropopup/chip.webp') center/100% 100% no-repeat;
  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 #000b;white-space:nowrap}
html.hb-portrait-peek .m-pt-pill::before{content:'';flex:none;width:calc(5.4 * var(--hbcq-w));width:5.4cqw;height:calc(5.4 * var(--hbcq-w));height:5.4cqw;background:center/contain no-repeat}
html.hb-portrait-peek .m-pt-pill.dmg::before{background-image:url('heropopup/shop/stat_damage_small.webp')}   /* the iron fist: damage's one picture (2026-11-22) */
html.hb-portrait-peek .m-pt-pill.hp::before{background-image:url('heropopup/shop/stat_hp_small.webp')}
/* the word a little lower on its button and a little bigger (Roman, 2026-10-24: "so it is clearer") */
html.hb-portrait-peek .m-pt-statsbtn{flex:none;height:calc(9.6 * var(--hbcq-w));height:9.6cqw;aspect-ratio:3.1;border:none;padding:calc(1.5 * var(--hbcq-w)) 0 0;padding:1.5cqw 0 0;cursor:pointer;
  background:url('heropopup/settings/performance_selected.webp') center/100% 100% no-repeat;
  font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;letter-spacing:.05em;text-transform:uppercase;color:#fff;
  text-shadow:0 1px 2px #000b}
/* the middle STRIP — not a button (Roman: "the middle should not be a button, look at Skull Hero's"): a flat band edge
   to edge across the screen, gold lines on both edges, the six element stones as small square tiles (where they show
   weapon types), centred since FORGE left the bag (2026-10-24) */
html.hb-portrait-peek .m-pt-bar{display:flex;flex:none;align-items:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;height:calc(15 * var(--hbcq-w));height:15cqw;padding:0 calc(3.4 * var(--hbcq-w));padding:0 3.4cqw;margin:0;
  position:relative;z-index:2;background:linear-gradient(180deg,#243b6e 0%,#1a2d56 100%);
  border-top:2px solid #c9a24a;border-bottom:2px solid #c9a24a;box-shadow:0 3px 8px #0009}
html.hb-portrait-peek .m-pt-gems{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:calc(3.2 * var(--hbcq-w));gap:3.2cqw}
/* ⚠ "chip" is also the lobby's currency-chip class (lobby.html .chip: a dark framed tile, vh-sized) — reset here. */
html.hb-portrait-peek .m-pt-gems .chip{position:relative;flex:none;display:flex;align-items:center;justify-content:center;
  width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw;min-width:0;padding:0;margin:0;border:none;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;transform:none;
  background:linear-gradient(180deg,#132650,#0b1834);box-shadow:inset 0 0 0 2px #c9a24a99,0 1px 3px #0008}
html.hb-portrait-peek .m-pt-gems .chip img{width:calc(6.6 * var(--hbcq-w));width:6.6cqw;height:calc(6.6 * var(--hbcq-w));height:6.6cqw;object-fit:contain}
html.hb-portrait-peek .m-pt-gems .chip span{position:absolute;right:calc(.9 * var(--hbcq-w));right:.9cqw;bottom:calc(.4 * var(--hbcq-w));bottom:.4cqw;font-family:'Cinzel',serif;
  font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#fff;text-shadow:0 1px 2px #000,0 0 2px #000;line-height:1}
/* the items: five to a row, filters above, scrolling */
html.hb-portrait-peek .m-chcard-inner.skinned .m-hc-invright{flex:1;min-height:0;overflow-y:auto;padding:calc(3.6 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) 0;padding:3.6cqw 4cqw 0}
html.hb-portrait-peek .m-chcard-inner.skinned .m-hc-invright .m-econ-sub{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-tabs{gap:calc(1.1 * var(--hbcq-w))!important;gap:1.1cqw!important;margin:0 0 calc(1.8 * var(--hbcq-w))!important;margin:0 0 1.8cqw!important}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-tab,
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-sortbtn{flex:1;width:auto;min-width:0;font-size:calc(2.3 * var(--hbcq-w))!important;font-size:2.3cqw!important}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-sortbtn{gap:calc(.8 * var(--hbcq-w));gap:.8cqw}
html.hb-portrait-peek .m-chcard-inner.skinned .m-sort-ico{width:calc(2.8 * var(--hbcq-w));width:2.8cqw;height:calc(2.8 * var(--hbcq-w));height:2.8cqw}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-sep{height:calc(6 * var(--hbcq-w));height:6cqw;margin:0 calc(.4 * var(--hbcq-w));margin:0 .4cqw}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-headbar{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;margin:0 0 calc(1.6 * var(--hbcq-w));margin:0 0 1.6cqw}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform{grid-template-columns:repeat(5,1fr);gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw}
/* THE ITEM TILES, SKULL HERO'S WAY (Roman: "our item frames and the light behind them don't fit — compare to Skull
   Hero"): a solid rounded square in the rarity's colour, a darker rim and a 3D lip under it, a lighter inner panel,
   the item large in the middle, NO glow behind it, the level in a small badge in the corner. hero-main.js tags each
   cell with data-rar. */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell{aspect-ratio:1;border-radius:calc(2.4 * var(--hbcq-w))!important;border-radius:2.4cqw!important;
  --tile-a:#9aa3b2;--tile-b:#6d7687;--tile-rim:#3f4757;
  background:linear-gradient(180deg,var(--tile-a),var(--tile-b))!important;
  box-shadow:inset 0 0 0 .6cqw var(--tile-rim),inset 0 -1.2cqw 0 rgba(0,0,0,.16),0 .7cqw 0 rgba(0,0,0,.45)}@supports not (width:1cqw){html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell{box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) var(--tile-rim),inset 0 calc(-1.2 * var(--hbcq-w)) 0 rgba(0,0,0,.16),0 calc(.7 * var(--hbcq-w)) 0 rgba(0,0,0,.45)}}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell[data-rar=rare]{--tile-a:#5aa2f4;--tile-b:#2f6ccd;--tile-rim:#1c427f}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell[data-rar=epic]{--tile-a:#b47af5;--tile-b:#7c40d3;--tile-rim:#47207f}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell[data-rar=legendary]{--tile-a:#f8c04a;--tile-b:#e2891c;--tile-rim:#8f540f}
/* the lighter inner panel, in place of the glow disc (the cell's ::before carried the --rar-halo) */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell::before{content:'';position:absolute;
  top:10%;right:10%;bottom:12%;left:10%;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;background:rgba(255,255,255,.16);box-shadow:none;filter:none}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell img{left:12%;top:10%;width:76%;height:74%;z-index:1}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell .m-ivc-lv{left:auto;right:auto;top:calc(-.6 * var(--hbcq-w));top:-.6cqw;left:calc(-.6 * var(--hbcq-w));left:-.6cqw;
  bottom:auto;z-index:2;padding:calc(.3 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w));padding:.3cqw 1.2cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;background:rgba(10,16,32,.82);box-shadow:inset 0 0 0 1px #c9a24a88}
html.hb-portrait-peek .m-chcard-inner.skinned .m-ivc-lv{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw}
/* ONE LEVEL BADGE (Roman, 2026-10-24: "the first item is grey with LV 30 on it, and LV 30 again — delete the top one, there
   is already a nice one behind it"). Gear asks only for its own level, so the unmet-requirement badge repeated the level
   badge's number over it; upright the grey tile alone says "not yet". */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-req{display:none}
/* …and a tile above the hero's level is DIMMED, not greyed whole: the cell-wide grayscale + opacity (hero-port.css) greyed
   its stone too — ice and fire looked alike. A dark layer over the tile and the picture greyed under it; the stone and the
   level badge stay in colour on top. */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell.req-unmet{opacity:1;filter:none}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell.req-unmet::after{content:'';position:absolute;top:0;right:0;
  bottom:0;left:0;z-index:2;pointer-events:none;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;background:rgba(8,12,26,.52)}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell.req-unmet .m-ivc-lv{z-index:3}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell.req-unmet img.m-pd-elem{filter:drop-shadow(0 1px 2px rgba(0,0,0,.8))}
html.hb-portrait-peek .m-chcard-inner.skinned .m-inv-scrollpad{height:calc(4 * var(--hbcq-w));height:4cqw}
/* THE "!" ON A NEW ITEM (2026-10-26; the look is lobby.html's): the tile's free top-right corner — the level badge is
   top-left, the element stone bottom-right — sized like the stone. */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell .m-ivc-new{top:calc(-.6 * var(--hbcq-w));top:-.6cqw;right:calc(-.8 * var(--hbcq-w));right:-.8cqw;width:calc(7 * var(--hbcq-w));width:7cqw;z-index:4}
/* THE ELEMENT STONE ON A WEAPON, AND A SWIPE THAT SCROLLS (Roman, 2026-10-24, recording: "I wanted the ice bow and could
   not tell which of them has an ice stone — the old bag showed it"). The stone badge is sized in the card's units
   (hero-port.css: 1.8cqw) — about 18 px on the landscape card, 7 px on a full-screen phone, and the level badge sat on
   it. Upright it is a round badge in the tile's lower-right corner (on the hero's slots: upper-right), big enough to
   read. And the tiles let a vertical swipe scroll the grid (hero-main.js no longer drags them upright). */
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell{touch-action:pan-y}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform .m-pd-cell .m-pd-elem{top:auto!important;left:auto!important;
  right:calc(-1 * var(--hbcq-w))!important;right:-1cqw!important;bottom:calc(-.6 * var(--hbcq-w))!important;bottom:-.6cqw!important;width:calc(6.6 * var(--hbcq-w))!important;width:6.6cqw!important;height:calc(6.6 * var(--hbcq-w))!important;height:6.6cqw!important;padding:calc(.7 * var(--hbcq-w));padding:.7cqw;z-index:3;
  border-radius:50%;background:rgba(10,16,32,.86);box-shadow:inset 0 0 0 1px #c9a24aaa,0 1px 3px #000a}
html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-slot .m-pd-elem{top:4%!important;left:auto!important;right:4%!important;
  width:calc(7.4 * var(--hbcq-w))!important;width:7.4cqw!important;height:calc(7.4 * var(--hbcq-w))!important;height:7.4cqw!important;padding:calc(.8 * var(--hbcq-w));padding:.8cqw;z-index:4;border-radius:50%;background:rgba(10,16,32,.86);
  box-shadow:inset 0 0 0 1px #c9a24aaa,0 1px 3px #000a}
/* 7a. A SQUARE UPRIGHT SCREEN (the folded iPhone Duo, 1398x2034 = 0.69; Roman, 2026-11-08: "the top part took all the
   place — I can't scroll the bag"). Everything above is in the screen's WIDTH, so the top half is ~140cqw tall: on a
   phone (0.46, 217cqw of height) the list keeps a third of the screen, on the Duo (145cqw) it kept ~2cqw and could not
   scroll. ANY UPRIGHT SCREEN WIDER THAN 3:5 — the folded Duo, an Android TABLET or an unfolded foldable; never a phone (0.42-0.5).
   It was the iPhone app's only (html.hb-iphone) until 2026-11-23, when a Galaxy Tab A8 player upright (800x868 css px, 0.92)
   reported "the bottom of the Stone's and the Sorceress's menu is missing" — the same overflow, the same fix (§8a, §10a too). Here the hero's dock follows the HEIGHT
   (33cqh = 48cqw on the Duo; the pentagon and the dragons' square keep their 13 / 19.4 / -7.5 of 78 of it), its slot
   columns spread to the pills' edges, the texts a step smaller inside the smaller slots, six items a row. The pills and the stones keep their size (the Duo's
   folded screen is as wide as a big iPhone's, so cqw is the same finger there). The ✕ leaves the Duo's camera strip
   (its safe area: 84 pt down the right side, the lens at the top). */
@media (min-aspect-ratio:3/5){
  html.hb-portrait-peek .m-chcard-inner.skinned .m-hc-invleft{padding:calc(9 * var(--hbcq-w)) 0 calc(2 * var(--hbcq-w));padding:9cqw 0 2cqw}
  /* the dock is the PILLS' row wide (75cqw, Roman: "helmet and armour to the left, sword and shield to the right, on the
     line of the buttons under them") at the height of a 33cqh dock; the hero, his platform, the pentagon and the dragons'
     square keep that dock's size in the middle; the pills spread over the same 75cqw, so the edges meet whatever they read */
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock{width:calc(75 * var(--hbcq-w));width:75cqw;aspect-ratio:auto;height:calc(min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * 1.2468);height:calc(min(78cqw,33cqh) * 1.2468)}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock::before{left:calc(50% - min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .5);left:calc(50% - min(78cqw,33cqh) * .5);right:calc(50% - min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .5);right:calc(50% - min(78cqw,33cqh) * .5)}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-col{width:calc(min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .25);width:calc(min(78cqw,33cqh) * .25);padding-top:calc(min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .1667);padding-top:calc(min(78cqw,33cqh) * .1667)}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock>.m-pd-col:first-child{left:0}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-dock>.m-pd-col:last-child{right:0}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-mid{left:calc(50% - min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .24);left:calc(50% - min(78cqw,33cqh) * .24);right:calc(50% - min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .24);right:calc(50% - min(78cqw,33cqh) * .24)}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-drag{width:calc(min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .2487);width:calc(min(78cqw,33cqh) * .2487);top:-7.71%}
  html.hb-portrait-peek .m-pt-pills{width:calc(75 * var(--hbcq-w));width:75cqw;margin-left:auto;margin-right:auto;justify-content:space-between;gap:0}
  html.hb-portrait-peek .m-pd-drag-lbl{font-size:calc(min(calc(78 * var(--hbcq-w)),calc(33 * var(--hbcq-h))) * .042);font-size:calc(min(78cqw,33cqh) * .042)}   /* 2cqw on the Duo; smaller on a squarer tablet, where 2cqw ran past the square */
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-slot .m-pd-lv{font-size:calc(1.9 * var(--hbcq-w));font-size:1.9cqw;padding:calc(.25 * var(--hbcq-w)) calc(.9 * var(--hbcq-w));padding:.25cqw .9cqw;border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-slot .m-pd-elem{width:calc(4.8 * var(--hbcq-w))!important;width:4.8cqw!important;height:calc(4.8 * var(--hbcq-w))!important;height:4.8cqw!important;padding:calc(.55 * var(--hbcq-w));padding:.55cqw}
  html.hb-portrait-peek .m-pt-bar{height:calc(13 * var(--hbcq-w));height:13cqw}
  html.hb-portrait-peek .m-pt-gems .chip{width:calc(9.4 * var(--hbcq-w));width:9.4cqw;height:calc(9.4 * var(--hbcq-w));height:9.4cqw}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-pd-grid.uniform{grid-template-columns:repeat(6,1fr);gap:calc(2.2 * var(--hbcq-w));gap:2.2cqw}
  html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-close{width:calc(10 * var(--hbcq-w));width:10cqw;right:calc(env(safe-area-inset-right,0px) + 2.6cqw)}@supports not (width:1cqw){html.hb-portrait-peek .m-chcard-inner.skinned .m-chcard-close{right:calc(env(safe-area-inset-right,0px) + calc(2.6 * var(--hbcq-w)))}}
}

/* 7b. THE STATS POPUP (the bag's STATS button, upright) — Skull Hero opens its stats over the bag. Our stats sheet
   (right_side.webp, every label placed in % of it) is lifted over the bag in the shop's leaf frame, its title in the
   plank. The frame's slices are the bag's scaled to the popup's 92cqw. The sheet's text was sized for a sheet 55cqw of
   the landscape card; here it is 86cqw, so each size below is the landscape one x 86/55 — DERIVED FROM lobby.html's
   .m-rside / .m-rs-* / .m-cs2-* / .m-cstat-* rules: change one there, change it here. */
.m-pt-statstitle,.m-pt-statsclose{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;
  z-index:19;background:rgba(0,0,0,.62)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats{display:flex!important;flex-direction:column;
  align-items:center;position:absolute;left:calc(1.5 * var(--hbcq-w));left:1.5cqw;right:calc(1.5 * var(--hbcq-w));right:1.5cqw;top:50%;transform:translateY(-50%);height:auto;z-index:20;
  padding:calc(15 * var(--hbcq-w)) calc(2 * var(--hbcq-w)) calc(11.5 * var(--hbcq-w));padding:15cqw 2cqw 11.5cqw;gap:0;isolation:isolate}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats::before{content:'';position:absolute;
  top:0;right:0;bottom:0;left:0;z-index:-1;pointer-events:none;border-style:solid;border-width:calc(13.254 * var(--hbcq-w)) calc(4.1 * var(--hbcq-w)) calc(11.305 * var(--hbcq-w)) calc(4.1 * var(--hbcq-w));border-width:13.254cqw 4.1cqw 11.305cqw 4.1cqw;
  border-image:url('heropopup/shop/shop_frame.webp') 170 50 145 50 fill stretch}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats .m-hc-hero{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats .m-hc-main{flex:none;width:calc(92 * var(--hbcq-w));width:92cqw;overflow:visible}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statstitle{display:block;position:absolute;left:calc(15 * var(--hbcq-w));left:15cqw;right:calc(15 * var(--hbcq-w));right:15cqw;
  top:calc(3.4 * var(--hbcq-w));top:3.4cqw;text-align:center;font-family:'Cinzel',serif;font-weight:900;font-size:calc(5.2 * var(--hbcq-w));font-size:5.2cqw;letter-spacing:.06em;
  text-transform:uppercase;color:#f0d78f;text-shadow:0 2px 4px #000b}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statsclose{display:block;position:absolute;top:calc(-.44 * var(--hbcq-w));top:-.44cqw;right:calc(.4 * var(--hbcq-w));right:.4cqw;
  width:calc(9.8 * var(--hbcq-w));width:9.8cqw;aspect-ratio:1;border:none;padding:0;cursor:pointer;background:url('heropopup/close.webp') center/contain no-repeat}
/* BIGGER (Roman, 2026-10-24: a player "did not see that he got more HP — the stats are small"): the popup takes the full
   width (the sheet 86 -> 92cqw) and every size below is ~25-30% over the landscape-derived one. A value too long for its
   column (a high hero's damage range) steps down until its row fits — hero-main.js _ptFitStats. */
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cs2-row{gap:calc(1.11 * var(--hbcq-w));gap:1.11cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cs2-row .k{font-size:calc(2.75 * var(--hbcq-w));font-size:2.75cqw;letter-spacing:.02em}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cs2-row .v{font-size:calc(3.25 * var(--hbcq-w));font-size:3.25cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-set{gap:calc(0.281 * var(--hbcq-w));gap:0.281cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-set b{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-set span{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-setn{font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-sep{gap:calc(1.876 * var(--hbcq-w));gap:1.876cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-sep b{font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-sep i{min-width:calc(3.127 * var(--hbcq-w));min-width:3.127cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cstat-row{gap:calc(1.11 * var(--hbcq-w));gap:1.11cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cstat-row .ab{font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cstat-row .nm{font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-cstat-row .vl{font-size:calc(3.25 * var(--hbcq-w));font-size:3.25cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rs-hint{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw}

/* 7c. THE UPRIGHT STATS — DESIGN C, ALL CSS (Roman, 2026-11-24, artifact MzxDMkWV36kYckBu48Soix: "the window uses old frames and
   is not sharp — redo all of it, option C, everything in CSS"). hero-main.js _ptStatsC paints: ten TILES two a row, the SET band,
   what CAMPS gave. The sheet picture (right_side.webp, every icon painted in and stretched — the blur) is HIDDEN upright; landscape
   keeps it. Inside the frame's opening (the theme rules): 86cqw wide. Numbers in Lilita One (cases kept: "2.85/s", "3.1 m"),
   names in Cinzel. */
.m-pt-statsc{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-rclip{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statsc{display:flex;flex-direction:column;gap:calc(1.8 * var(--hbcq-w));gap:1.8cqw;width:calc(86 * var(--hbcq-w));width:86cqw;margin:0 auto;
  /* never taller than the screen: past it the list scrolls INSIDE the frame (the theme rules), the plank stays on screen */
  max-height:calc(100vh - calc(38 * var(--hbcq-w)));max-height:calc(100vh - 38cqw);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statsc::-webkit-scrollbar{display:none}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statsc.m-psc-more{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - calc(7 * var(--hbcq-w))),transparent);-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 7cqw),transparent);
  mask-image:linear-gradient(180deg,#000 calc(100% - calc(7 * var(--hbcq-w))),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 7cqw),transparent)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tiles{display:grid;grid-template-columns:1fr 1fr;gap:calc(1.5 * var(--hbcq-w));gap:1.5cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile,
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-set,
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-farm{position:relative;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw;
  background:linear-gradient(180deg,#1a2d58 0%,#10203f 55%,#0b1832 100%);border:calc(.3 * var(--hbcq-w)) solid rgba(222,182,98,.62);border:.3cqw solid rgba(222,182,98,.62);
  box-shadow:inset 0 calc(.3 * var(--hbcq-w)) 0 rgba(255,255,255,.07),inset 0 calc(-.4 * var(--hbcq-w)) calc(.8 * var(--hbcq-w)) rgba(0,0,0,.35),0 calc(.7 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w)) rgba(0,0,0,.45);box-shadow:inset 0 .3cqw 0 rgba(255,255,255,.07),inset 0 -.4cqw .8cqw rgba(0,0,0,.35),0 .7cqw 1.4cqw rgba(0,0,0,.45)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile{display:grid;grid-template-columns:calc(9.4 * var(--hbcq-w)) minmax(0,1fr);grid-template-columns:9.4cqw minmax(0,1fr);
  column-gap:calc(2 * var(--hbcq-w));column-gap:2cqw;align-items:center;padding:calc(1.4 * var(--hbcq-w)) calc(2 * var(--hbcq-w));padding:1.4cqw 2cqw;min-height:0}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile img{grid-column:1;grid-row:1 / 3;width:calc(9.4 * var(--hbcq-w));width:9.4cqw;height:calc(9.4 * var(--hbcq-w));height:9.4cqw;object-fit:contain;
  filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .4cqw .5cqw rgba(0,0,0,.55))}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile b{grid-column:2;grid-row:1;font-family:'Lilita One',sans-serif;font-weight:400;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;
  line-height:1.05;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
  text-shadow:0 calc(.3 * var(--hbcq-w)) 0 rgba(0,0,0,.55);text-shadow:0 .3cqw 0 rgba(0,0,0,.55);letter-spacing:.02em}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile b i{font-style:normal;font-size:.56em;color:#8fd3a5;
  margin-left:calc(.8 * var(--hbcq-w));margin-left:.8cqw;vertical-align:.2em}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-tile span{grid-column:2;grid-row:2;font-family:'Cinzel',serif;font-weight:700;font-size:calc(2.45 * var(--hbcq-w));font-size:2.45cqw;
  color:#d7c9a1;letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-set{display:grid;grid-template-columns:calc(9.6 * var(--hbcq-w)) minmax(0,1fr) auto;grid-template-columns:9.6cqw minmax(0,1fr) auto;
  column-gap:calc(2.4 * var(--hbcq-w));column-gap:2.4cqw;align-items:center;padding:calc(1.5 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:1.5cqw 2.4cqw;border-color:rgba(176,140,232,.7);
  background:linear-gradient(180deg,#24255a 0%,#151b45 60%,#0e1534 100%)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-set img{width:calc(9.6 * var(--hbcq-w));width:9.6cqw;height:calc(9.6 * var(--hbcq-w));height:9.6cqw;object-fit:contain;
  filter:drop-shadow(0 calc(.4 * var(--hbcq-w)) calc(.5 * var(--hbcq-w)) rgba(0,0,0,.55));filter:drop-shadow(0 .4cqw .5cqw rgba(0,0,0,.55))}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-setx{display:flex;flex-direction:column;gap:calc(.5 * var(--hbcq-w));gap:.5cqw;min-width:0}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-setx b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.5 * var(--hbcq-w));font-size:3.5cqw;
  color:#f0d78f;letter-spacing:.03em;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden}   /* two lines: "Conjunto Cuerno Sangriento" (es / pt) is wider than one */
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-setx span{font-family:'Cinzel',serif;font-weight:700;font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw;
  color:#b7c2dc;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-set em{font-style:normal;font-family:'Lilita One',sans-serif;
  font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;color:#fff;padding:calc(.9 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:.9cqw 2.4cqw;border-radius:calc(5 * var(--hbcq-w));border-radius:5cqw;background:rgba(0,0,0,.32);border:calc(.3 * var(--hbcq-w)) solid rgba(255,255,255,.18);border:.3cqw solid rgba(255,255,255,.18)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-set em.done{color:#9ff0b6;border-color:rgba(127,212,154,.75);
  background:rgba(36,92,60,.45)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-farm{padding:calc(1.2 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:1.2cqw 1.4cqw 1.6cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-fh{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;
  letter-spacing:.08em;color:#e6cf94;text-align:center;padding:calc(.3 * var(--hbcq-w)) calc(2 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w));padding:.3cqw 2cqw 1.2cqw;text-transform:uppercase}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-frow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:calc(1 * var(--hbcq-w));gap:1cqw}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f{display:flex;flex-direction:column;align-items:center;gap:calc(.6 * var(--hbcq-w));gap:.6cqw;
  min-width:0;text-align:center}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f i{display:grid;place-items:center;width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw;
  border-radius:50%;background:radial-gradient(circle at 50% 35%,#24386a 0%,#101d3c 70%);border:calc(.3 * var(--hbcq-w)) solid rgba(222,182,98,.7);border:.3cqw solid rgba(222,182,98,.7);
  box-shadow:inset 0 calc(.3 * var(--hbcq-w)) calc(.6 * var(--hbcq-w)) rgba(0,0,0,.5);box-shadow:inset 0 .3cqw .6cqw rgba(0,0,0,.5)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f img{width:calc(7.2 * var(--hbcq-w));width:7.2cqw;height:calc(7.2 * var(--hbcq-w));height:7.2cqw;object-fit:contain}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f b{font-family:'Lilita One',sans-serif;font-weight:400;font-size:calc(3.7 * var(--hbcq-w));font-size:3.7cqw;
  color:#fff;white-space:nowrap;text-shadow:0 calc(.3 * var(--hbcq-w)) 0 rgba(0,0,0,.55);text-shadow:0 .3cqw 0 rgba(0,0,0,.55)}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f span{font-family:'Cinzel',serif;font-weight:700;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;
  color:#c3b791;line-height:1.15;max-width:100%;overflow-wrap:anywhere}
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f.off b,
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f.off span,
html.hb-portrait-peek .m-chcard-inner.skinned.m-pt-stats .m-psc-f.off i{opacity:.42}

/* 8. THE ITEM CARD UPRIGHT — Skull Hero's weapon card in our leaf frame (Roman, 2026-10-22: "show the 2 skills and the
   stone the weapon has, like theirs"). hero-main.js _ptItemBody builds it: the name in the plank, the rarity under it,
   the item as a rarity tile (as in the bag) beside its kind and damage, then — for a weapon — the element stone (its
   passive and level) and both abilities (picture, name, level, what it does); armor and helmets keep stats and set.
   The card grows with what it shows (a weapon is taller than a helmet), so it is NOT a size container upright: every
   size here is in column units of a 92%-of-the-column card, the reused landscape parts (damage, stats, set bar, button) restated with it.
   ⚠ IN UNITS OF THE UPRIGHT COLUMN (2026-11-25), var(--pt-col)/100: they were vw, and on a square screen the card ran 1,345 px down an
   868 px one. On every phone (narrower than 9:16) the column IS the screen's width — nothing moved there. */
html.hb-portrait-peek .m-pt-itemd{contain:none;--hbcq-c:0;container-type:normal;width:calc(var(--pt-col) * 92 / 100);height:auto;aspect-ratio:auto;max-height:94vh;
  overflow-y:auto;padding:0;background:none;isolation:isolate;box-shadow:none}
html.hb-portrait-peek .m-pt-itemd::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(--pt-col) * 13.25 / 100) calc(var(--pt-col) * 4.1 / 100) calc(var(--pt-col) * 11.3 / 100) calc(var(--pt-col) * 4.1 / 100);
  border-image:url('heropopup/shop/shop_frame.webp') 170 50 145 50 fill stretch}
html.hb-portrait-peek .m-pt-itemd .m-itemd-close{top:calc(var(--pt-col) * -0.6 / 100);right:calc(var(--pt-col) * -0.6 / 100);width:calc(var(--pt-col) * 11 / 100);aspect-ratio:120/136;
  background-image:url('heropopup/close_leaf.webp')}
html.hb-portrait-peek .m-pt-itemd .m-itemd-body{padding:calc(var(--pt-col) * 3.4 / 100) calc(var(--pt-col) * 6 / 100) calc(var(--pt-col) * 2 / 100);gap:calc(var(--pt-col) * 2.6 / 100)}
html.hb-portrait-peek .m-pti-name{text-align:center;padding:0 calc(var(--pt-col) * 18 / 100);height:calc(var(--pt-col) * 7 / 100);font-family:'Cinzel',serif;font-weight:900;
  font-size:calc(var(--pt-col) * 4.8 / 100);letter-spacing:.03em;color:#f0d78f;text-shadow:0 2px 4px #000b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.hb-portrait-peek .m-pti-rar{align-self:center;margin-top:calc(var(--pt-col) * 2.6 / 100);padding:calc(var(--pt-col) * 0.9 / 100) calc(var(--pt-col) * 4 / 100);border-radius:calc(var(--pt-col) * 4 / 100);font-family:'Cinzel',serif;
  font-weight:900;font-size:calc(var(--pt-col) * 3 / 100);letter-spacing:.12em;text-transform:uppercase;color:#fff;text-shadow:0 1px 2px #0009;
  --tile-a:#9aa3b2;--tile-b:#6d7687;--tile-rim:#3f4757;background:linear-gradient(180deg,var(--tile-a),var(--tile-b));
  box-shadow:inset 0 0 0 calc(var(--pt-col) * 0.5 / 100) var(--tile-rim)}
/* the item: a rarity tile, as in the bag (the same colours) */
html.hb-portrait-peek .m-pti-top{display:flex;align-items:center;gap:calc(var(--pt-col) * 3.6 / 100)}
html.hb-portrait-peek .m-pti-tile{position:relative;flex:none;width:calc(var(--pt-col) * 27 / 100);aspect-ratio:1;border-radius:calc(var(--pt-col) * 3 / 100);
  --tile-a:#9aa3b2;--tile-b:#6d7687;--tile-rim:#3f4757;background:linear-gradient(180deg,var(--tile-a),var(--tile-b));
  box-shadow:inset 0 0 0 calc(var(--pt-col) * 0.8 / 100) var(--tile-rim),inset 0 calc(var(--pt-col) * -1.6 / 100) 0 rgba(0,0,0,.16),0 calc(var(--pt-col) * 0.9 / 100) 0 rgba(0,0,0,.45)}
html.hb-portrait-peek .m-pti-tile::before{content:'';position:absolute;top:10%;right:10%;bottom:12%;left:10%;border-radius:calc(var(--pt-col) * 2 / 100);
  background:rgba(255,255,255,.16)}
html.hb-portrait-peek [data-rar=rare]{--tile-a:#5aa2f4;--tile-b:#2f6ccd;--tile-rim:#1c427f}
html.hb-portrait-peek [data-rar=epic]{--tile-a:#b47af5;--tile-b:#7c40d3;--tile-rim:#47207f}
html.hb-portrait-peek [data-rar=legendary]{--tile-a:#f8c04a;--tile-b:#e2891c;--tile-rim:#8f540f}
html.hb-portrait-peek .m-pti-tile>img:first-child{position:absolute;left:12%;top:10%;width:76%;height:74%;object-fit:contain;z-index:1}
html.hb-portrait-peek .m-pti-lv{position:absolute;left:calc(var(--pt-col) * -1 / 100);top:calc(var(--pt-col) * -1 / 100);z-index:2;padding:calc(var(--pt-col) * 0.4 / 100) calc(var(--pt-col) * 1.6 / 100);border-radius:calc(var(--pt-col) * 1.8 / 100);
  background:rgba(10,16,32,.85);box-shadow:inset 0 0 0 1px #c9a24a88;font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--pt-col) * 3 / 100);color:#f0e4c0}
html.hb-portrait-peek .m-pti-elem{position:absolute;right:calc(var(--pt-col) * -1.4 / 100);bottom:calc(var(--pt-col) * -1.4 / 100);width:calc(var(--pt-col) * 9 / 100);height:calc(var(--pt-col) * 9 / 100);object-fit:contain;z-index:2;
  filter:drop-shadow(0 1px 2px #000a)}
html.hb-portrait-peek .m-pti-side{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(var(--pt-col) * 1.4 / 100)}
html.hb-portrait-peek .m-pti-kind{font-family:'Cinzel',serif;font-weight:700;font-size:calc(var(--pt-col) * 3.2 / 100);letter-spacing:.06em;
  text-transform:uppercase;color:#b7c3da}
html.hb-portrait-peek .m-pt-itemd .m-itemd-dmg{font-size:calc(var(--pt-col) * 4.8 / 100);margin:0}
/* OPTION A (Roman, 2026-11-19 — "messy, organise the rare / 2-hand part"): one line under the name (the rarity in its
   colour · the kind), and a weapon's facts as ONE SHEET beside the picture — a row per fact, label left, value right, a
   line under each; DAMAGE starts on the picture's top edge ("exactly the same top line as the picture"). */
html.hb-portrait-peek .m-pti-sub{align-self:center;margin-top:calc(var(--pt-col) * 2.2 / 100);font-family:'Cinzel',serif;font-weight:700;font-size:calc(var(--pt-col) * 3.3 / 100);
  letter-spacing:.08em;text-transform:uppercase;color:#b7c3da;text-align:center;white-space:nowrap}
html.hb-portrait-peek .m-pti-subrar{font-weight:900;color:var(--tile-a)}
html.hb-portrait-peek .m-pti-top.m-pti-wtop{align-items:flex-start}
html.hb-portrait-peek .m-pti-sheet{flex:1;min-width:0;display:flex;flex-direction:column;margin-top:calc(var(--pt-col) * -1.6 / 100)}
html.hb-portrait-peek .m-pti-sr{display:flex;justify-content:space-between;align-items:baseline;gap:calc(var(--pt-col) * 2 / 100);min-width:0;
  padding:calc(var(--pt-col) * 1.1 / 100) 0;border-bottom:1px solid rgba(240,215,143,.22);line-height:1.2}
html.hb-portrait-peek .m-pti-sr:first-child{padding-top:0}
html.hb-portrait-peek .m-pti-sr .k{font-family:'Cinzel',serif;font-weight:700;font-size:calc(var(--pt-col) * 3.1 / 100);letter-spacing:.04em;
  text-transform:uppercase;color:rgba(232,230,225,.72);white-space:nowrap;flex:none}
html.hb-portrait-peek .m-pti-sr .v{font-family:'Cinzel',serif;font-weight:800;font-size:calc(var(--pt-col) * 3.6 / 100);color:#fff;white-space:nowrap;
  text-align:right;min-width:0}
html.hb-portrait-peek .m-pti-sr.gold .v{color:#f0d78f;font-size:calc(var(--pt-col) * 4.2 / 100);font-weight:900}
html.hb-portrait-peek .m-pti-sr .v i{font-style:normal;font-weight:700;font-size:.7em;color:#9db0cf;margin-left:calc(var(--pt-col) * 0.6 / 100)}
html.hb-portrait-peek .m-pti-note{font-size:calc(var(--pt-col) * 2.9 / 100);line-height:1.3;color:rgba(232,230,225,.65);margin-top:calc(var(--pt-col) * 1.2 / 100)}
html.hb-portrait-peek .m-pti-sheet .m-itemd-stats{margin-top:calc(var(--pt-col) * 1.4 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-stats{gap:calc(var(--pt-col) * 1 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-stat{font-size:calc(var(--pt-col) * 3.4 / 100);padding:calc(var(--pt-col) * 1 / 100) calc(var(--pt-col) * 2 / 100);border-radius:calc(var(--pt-col) * 1.6 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-reqrow{gap:calc(var(--pt-col) * 1.6 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-req,html.hb-portrait-peek .m-pt-itemd .m-itemd-reqwarn{font-size:calc(var(--pt-col) * 3.2 / 100);padding:calc(var(--pt-col) * 0.6 / 100) calc(var(--pt-col) * 1.6 / 100);border-radius:calc(var(--pt-col) * 1.6 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-sb-title{font-size:calc(var(--pt-col) * 3.6 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-sb-sub{font-size:calc(var(--pt-col) * 2.6 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-itemd-sb-count{font-size:calc(var(--pt-col) * 4 / 100)}
/* the stone and the two abilities — one framed section each */
html.hb-portrait-peek .m-pti-sec{padding:calc(var(--pt-col) * 2.2 / 100) calc(var(--pt-col) * 2.8 / 100);border-radius:calc(var(--pt-col) * 2.6 / 100);background:rgba(9,18,40,.72);box-shadow:inset 0 0 0 1px #c9a24a66}
html.hb-portrait-peek .m-pti-hd{margin-bottom:calc(var(--pt-col) * 1.4 / 100);font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--pt-col) * 2.8 / 100);letter-spacing:.12em;
  text-transform:uppercase;color:#c9a24a}
html.hb-portrait-peek .m-pti-row{display:flex;align-items:center;gap:calc(var(--pt-col) * 2.8 / 100)}
html.hb-portrait-peek .m-pti-ico{flex:none;width:calc(var(--pt-col) * 12.5 / 100);height:calc(var(--pt-col) * 12.5 / 100);object-fit:contain;border-radius:50%;
  background:radial-gradient(circle,#1d3566,#0b1630);box-shadow:inset 0 0 0 2px #c9a24a99}
html.hb-portrait-peek .m-pti-ico.lock{box-shadow:none}   /* its picture: THE LOCK UPRIGHT below */
html.hb-portrait-peek .m-pti-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:calc(var(--pt-col) * 0.7 / 100)}
html.hb-portrait-peek .m-pti-txt b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--pt-col) * 3.7 / 100);color:#f0d78f}
html.hb-portrait-peek .m-pti-txt b i{font-style:normal;font-size:.8em;color:#8ff0a8;margin-left:calc(var(--pt-col) * 1 / 100)}
html.hb-portrait-peek .m-pti-txt span{font-size:calc(var(--pt-col) * 3.1 / 100);line-height:1.32;color:#c8d3ea}
/* how hard the skill hits (2026-10-31): gold, the number itself white */
html.hb-portrait-peek .m-pti-txt span.m-pti-dmg{color:#ffd36b}
html.hb-portrait-peek .m-pti-txt span.m-pti-dmg b{font-family:inherit;font-size:inherit;font-weight:700;color:#fff}
html.hb-portrait-peek .m-pti-sec.locked .m-pti-txt b{color:#9aa6c0}
/* THE DRAGON'S HIT — option A + C upright (Roman, 2026-11-05; dragons.js): the number big and gold under the skill's name, and
   NOW → NEXT stacked above Upgrade in the Forge's / the Sorceress's boxes (the arrow turned down, as theirs). */
html.hb-portrait-peek .m-drag-cardpop .m-drag-big{margin:calc(var(--pt-col) * 0.2 / 100) 0 calc(var(--pt-col) * 0.4 / 100);text-align:left;font-size:calc(var(--pt-col) * 7.4 / 100);line-height:1.05}
html.hb-portrait-peek .m-drag-cardpop .m-drag-big small{display:inline;margin:0 0 0 calc(var(--pt-col) * 1.6 / 100);font-size:calc(var(--pt-col) * 3 / 100)}
html.hb-portrait-peek .m-drag-cardpop .m-drag-stages{flex-direction:column;gap:calc(var(--pt-col) * 1.2 / 100)}
html.hb-portrait-peek .m-drag-cardpop .m-drag-st{padding:calc(var(--pt-col) * 2.2 / 100) calc(var(--pt-col) * 3 / 100);border-radius:calc(var(--pt-col) * 2.6 / 100);gap:calc(var(--pt-col) * 0.8 / 100);border:none;background:rgba(9,18,40,.72);
  box-shadow:inset 0 0 0 1px #c9a24a66}
html.hb-portrait-peek .m-drag-cardpop .m-drag-st.next{box-shadow:inset 0 0 0 1px #7ee29a99,0 0 calc(var(--pt-col) * 2.4 / 100) #7ee29a22}
html.hb-portrait-peek .m-drag-cardpop .m-drag-st .lb{font-size:calc(var(--pt-col) * 2.6 / 100)}
html.hb-portrait-peek .m-drag-cardpop .m-drag-st b{font-size:calc(var(--pt-col) * 4.2 / 100)}
html.hb-portrait-peek .m-drag-cardpop .m-drag-st em{font-size:calc(var(--pt-col) * 3 / 100)}
html.hb-portrait-peek .m-drag-cardpop .m-drag-starrow{width:calc(var(--pt-col) * 4.4 / 100);height:calc(var(--pt-col) * 5 / 100);transform:rotate(90deg)}
html.hb-portrait-peek .m-pti-sec.locked .m-pti-txt span{color:#8a96ad}
html.hb-portrait-peek .m-pt-itemd .m-look-actions{padding:calc(var(--pt-col) * 1 / 100) 0 calc(var(--pt-col) * 8 / 100)}
/* A READ-ONLY CARD (the Battle Pass's SEE THE ITEM, a shop pack's piece) has no button row, so its last line ("CANNOT EQUIP YET")
   sat on the frame's bottom edge — Roman, 2026-11-17: "make the window a tiny bit longer". A little room under it. */
html.hb-portrait-peek .m-pt-itemd.m-itemd-ro .m-itemd-body{padding-bottom:calc(var(--pt-col) * 6 / 100)}
/* hero-port.css (the phone's portrait media query) gives these buttons flex:1, which stretched EQUIP across the card */
html.hb-portrait-peek .m-pt-itemd .m-look-actions button{flex:0 0 auto;width:calc(var(--pt-col) * 46 / 100);height:auto;padding:0;border-radius:0;font-size:calc(var(--pt-col) * 4 / 100)}
/* THREE BUTTONS (Equip · Left hand · Upgrade, 2026-11-25): each a third of the row, the word a step smaller. */
html.hb-portrait-peek .m-pt-itemd .m-look-actions.n3{gap:calc(var(--pt-col) * 1 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-look-actions.n3 button{width:calc(var(--pt-col) * 27 / 100);font-size:calc(var(--pt-col) * 3.2 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-look-actions.n2{gap:calc(var(--pt-col) * 1.5 / 100)}
html.hb-portrait-peek .m-pt-itemd .m-look-actions.n2 button{width:calc(var(--pt-col) * 38 / 100)}

/* 8a. THE CARD ON THE FOLDED iPHONE DUO (Roman, 2026-11-08: "the dragon's card popup does not look good"). The card is
   sized in vw and capped at 94vh: on a phone it fits, on the Duo (its height ~1.45 widths) a dragon's or a weapon's card
   does not, and it SCROLLED INSIDE ITSELF — the frame is the card's ::before, which scrolls with the content, so it rode
   up and left the levels hanging outside it. Here the card is as tall as it is (the frame around ALL of it) and its
   window scrolls instead: the card's own scrollTop stays 0, the repaint after a level-up keeps the window's. Its ✕ steps
   out of the camera (84 pt down the right side). §7a's test: any upright screen wider than 3:5 (Android tablets since 2026-11-23). */
@media (min-aspect-ratio:3/5){
  html.hb-portrait-peek #m-itemd-overlay,
  html.hb-portrait-peek #m-dragcard-overlay{align-items:flex-start;overflow-y:auto;-webkit-overflow-scrolling:touch}
  html.hb-portrait-peek .m-pt-itemd{flex:none;max-height:none;overflow:visible;margin:auto}
  html.hb-portrait-peek .m-pt-itemd .m-itemd-close{right:max(calc(var(--pt-col) * -0.6 / 100),calc(env(safe-area-inset-right,0px) - calc(var(--pt-col) * 4.6 / 100)))}
}

/* 9. THE FORGE UPRIGHT — Skull Hero's forge in our colours (Roman, 2026-10-22: "full screen, like the new bag"). hero-main.js
   _ptForgeHtml builds it: the bubble + our forge art (their smith), the weapon tile beside a before → after panel, the
   three sockets (stone, ability 1, ability 2), the stones or the ability pool, the strip with rate / cost / button, and
   the weapons below as the bag's rarity tiles. The panel is the full screen and a size container, so 1cqw = 1% of the
   screen's width. The landscape parts it reuses (.m-craft-bb-item, .m-craft-imbue, .m-craft-adboost, the pool badges)
   were sized for the 1900-wide frame and are restated here. */
html.hb-portrait-peek #m-econ-panel{padding:0}
html.hb-portrait-peek .m-econ-inner.craft-mode{width:var(--pt-col);margin-left:auto;margin-right:auto;height:100vh;max-width:none;max-height:none;aspect-ratio:auto;
  background:#0f1d3a;border:none;border-radius:0;box-shadow:none}
html.hb-portrait-peek .m-econ-inner.craft-mode::before,
html.hb-portrait-peek .m-econ-inner.craft-mode::after,
html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-bannerspace,
html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-bannertitle,
html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-tabs{display:none}
html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-close{top:calc(2.2 * var(--hbcq-w));top:2.2cqw;right:calc(2.6 * var(--hbcq-w));right:2.6cqw;width:calc(12 * var(--hbcq-w));width:12cqw;height:auto;aspect-ratio:120/136;z-index:7;
  border:none;border-radius:0;box-shadow:none;background:url('heropopup/close_leaf.webp') center/contain no-repeat}
html.hb-portrait-peek .m-econ-inner.craft-mode #m-econ-body{flex:1;min-height:0;padding:0;overflow:hidden}
html.hb-portrait-peek .m-ptf{height:100%;display:flex;flex-direction:column;position:relative}
/* THE FIRST FORGE, SHOWN (2026-11-07, hero-main.js _forgeTutStep): a gold ring on the next thing to tap (inside the
   element, so the scrolling weapon grid cannot clip it) and the tip above it, floating over the whole forge. */
html.hb-portrait-peek .m-tut{outline:calc(.9 * var(--hbcq-w)) solid #ffd34d;outline:.9cqw solid #ffd34d;outline-offset:calc(-.9 * var(--hbcq-w));outline-offset:-.9cqw;animation:m-tut-pulse 1s ease-in-out infinite}
@keyframes m-tut-pulse{0%,100%{outline-color:#ffd34d;filter:brightness(1)}50%{outline-color:#fff6c2;filter:brightness(1.22)}}
html.hb-portrait-peek .m-tut-tip{position:absolute;z-index:20;transform:translateX(-50%);pointer-events:none;white-space:nowrap;
  padding:calc(1.2 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:1.2cqw 3cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;background:linear-gradient(#ffe27a,#f2b33a);color:#3a2200;font-weight:800;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;
  box-shadow:0 calc(.6 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w)) rgba(0,0,0,.5);box-shadow:0 .6cqw 1.6cqw rgba(0,0,0,.5);animation:m-tut-bob 1s ease-in-out infinite}
html.hb-portrait-peek .m-tut-tip::after{content:'';position:absolute;top:100%;left:var(--tut-arrow,50%);transform:translateX(-50%);
  border:calc(1.6 * var(--hbcq-w)) solid transparent;border:1.6cqw solid transparent;border-top-color:#f2b33a}
html.hb-portrait-peek .m-tut-tip.below::after{top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:#ffe27a}
/* The Stone's last word after the first imbue (2026-11-13): a whole sentence, so it wraps */
html.hb-portrait-peek .m-tut-tip.long{white-space:normal;width:calc(78 * var(--hbcq-w));width:78cqw;text-align:center;line-height:1.25;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;padding:calc(2 * var(--hbcq-w)) calc(3.4 * var(--hbcq-w));padding:2cqw 3.4cqw}
@keyframes m-tut-bob{0%,100%{margin-top:0}50%{margin-top:calc(-1 * var(--hbcq-w));margin-top:-1cqw}}
@media (prefers-reduced-motion:reduce){html.hb-portrait-peek .m-tut,html.hb-portrait-peek .m-tut-tip{animation:none}}
/* the bubble (their "choose two similar items") and the forge where their smith stands */
/* min-height, not height: the bubble grows with a long message (the Altar's "the weapon you are holding has no element") */
html.hb-portrait-peek .m-ptf-head{position:relative;flex:none;min-height:calc(30 * var(--hbcq-w));min-height:30cqw;padding:calc(4 * var(--hbcq-w)) calc(37 * var(--hbcq-w)) calc(3 * var(--hbcq-w)) calc(4 * var(--hbcq-w));padding:4cqw 37cqw 3cqw 4cqw;
  background:linear-gradient(180deg,#1a2d56,#0f1d3a)}
html.hb-portrait-peek .m-ptf-say{position:relative;padding:calc(2.4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:2.4cqw 3cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;background:#f3e7c9;color:#3a2610;
  font-family:'Cinzel',serif;font-weight:800;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;line-height:1.3;text-align:center;
  box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c9a24a,0 calc(1 * var(--hbcq-w)) 0 rgba(0,0,0,.35);box-shadow:inset 0 0 0 .5cqw #c9a24a,0 1cqw 0 rgba(0,0,0,.35)}
html.hb-portrait-peek .m-ptf-say::after{content:'';position:absolute;right:calc(-2.6 * var(--hbcq-w));right:-2.6cqw;top:42%;border:calc(1.6 * var(--hbcq-w)) solid transparent;border:1.6cqw solid transparent;
  border-left:calc(2.4 * var(--hbcq-w)) solid #c9a24a;border-left:2.4cqw solid #c9a24a}
html.hb-portrait-peek .m-ptf-smith{position:absolute;right:calc(2 * var(--hbcq-w));right:2cqw;bottom:calc(-6 * var(--hbcq-w));bottom:-6cqw;width:calc(34 * var(--hbcq-w));width:34cqw;height:auto;pointer-events:none;
  filter:drop-shadow(0 calc(1 * var(--hbcq-w)) calc(1.4 * var(--hbcq-w)) #000a);filter:drop-shadow(0 1cqw 1.4cqw #000a)}
/* the weapon and the before → after panel */
html.hb-portrait-peek .m-ptf-main{position:relative;z-index:1;flex:none;display:flex;gap:calc(3.4 * var(--hbcq-w));gap:3.4cqw;padding:calc(2 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) 0;padding:2cqw 4cqw 0;align-items:flex-start}
html.hb-portrait-peek .m-ptf-tilecol{flex:none;width:calc(30 * var(--hbcq-w));width:30cqw;display:flex;flex-direction:column;align-items:center;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw}
html.hb-portrait-peek .m-ptf .m-ptf-tile{width:calc(30 * var(--hbcq-w));width:30cqw;border-radius:calc(3.2 * var(--hbcq-w));border-radius:3.2cqw}
html.hb-portrait-peek .m-ptf-tile[data-rar=none]{--tile-a:#25365e;--tile-b:#1a2847;--tile-rim:#0d1730}
html.hb-portrait-peek .m-ptf .m-pti-lv{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;padding:calc(.4 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:.4cqw 1.6cqw;left:calc(-1 * var(--hbcq-w));left:-1cqw;top:calc(-1 * var(--hbcq-w));top:-1cqw}
html.hb-portrait-peek .m-ptf .m-pti-elem{width:calc(9.5 * var(--hbcq-w));width:9.5cqw;height:calc(9.5 * var(--hbcq-w));height:9.5cqw;right:calc(-1.6 * var(--hbcq-w));right:-1.6cqw;bottom:calc(-1.6 * var(--hbcq-w));bottom:-1.6cqw}
html.hb-portrait-peek .m-ptf-wname{max-width:calc(30 * var(--hbcq-w));max-width:30cqw;text-align:center;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.3 * var(--hbcq-w));font-size:3.3cqw;
  color:#f0d78f;text-shadow:0 1px 3px #000b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.hb-portrait-peek .m-ptf-info{flex:1;min-width:0;min-height:calc(30 * var(--hbcq-w));min-height:30cqw;padding:calc(2.4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:2.4cqw 3cqw;border-radius:calc(3 * var(--hbcq-w));border-radius:3cqw;
  background:rgba(9,18,40,.82);box-shadow:inset 0 0 0 1px #c9a24a77;display:flex;flex-direction:column;gap:calc(1.8 * var(--hbcq-w));gap:1.8cqw}
html.hb-portrait-peek .m-ptf-row{display:flex;flex-direction:column;gap:calc(.6 * var(--hbcq-w));gap:.6cqw}
html.hb-portrait-peek .m-ptf-row .k{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;letter-spacing:.1em;text-transform:uppercase;color:#c9a24a}
html.hb-portrait-peek .m-ptf-row .v{display:flex;align-items:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;color:#f0e4c0}
html.hb-portrait-peek .m-ptf-row .v img{width:calc(5 * var(--hbcq-w));width:5cqw;height:calc(5 * var(--hbcq-w));height:5cqw;object-fit:contain}
html.hb-portrait-peek .m-ptf-arrow{flex:none;width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(4 * var(--hbcq-w));height:4cqw;background:url('heropopup/craft_arrow.webp') center/contain no-repeat}
html.hb-portrait-peek .m-ptf-none{color:#6d7a96}
html.hb-portrait-peek .m-ptf-q{font-family:'Cinzel',serif;font-weight:900;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;color:#ffd98a}
html.hb-portrait-peek .m-ptf-tile .m-ptf-q{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;
  font-size:calc(12 * var(--hbcq-w));font-size:12cqw;color:#5d6f99;z-index:1}
html.hb-portrait-peek .m-ptf-abname{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;color:#f0d78f}
html.hb-portrait-peek .m-ptf-note{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;line-height:1.35;color:#c8d3ea}
/* THE FORGE'S SKILL PANEL — option A (Roman, 2026-11-03: "I want option A like this, it's nice"; _skPanelHtml): the badge
   in its gold ring, the name, "Ability 1 · Fire", a 10-step bar (gold = had, green = being bought), "LV 3 → 4 / 10" and
   All levels; NOW → AFTER below the sword row in the Gem Altar's boxes (_skStagesHtml) */
html.hb-portrait-peek .m-skp{display:flex;flex-direction:column;gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek .m-skp-top{display:flex;align-items:center;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw}
html.hb-portrait-peek .m-skp-badge{flex:none;width:calc(12 * var(--hbcq-w));width:12cqw;height:calc(12 * var(--hbcq-w));height:12cqw;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle,#1d3566,#0b1630);box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c9a24a,0 calc(.6 * var(--hbcq-w)) 0 rgba(0,0,0,.35);box-shadow:inset 0 0 0 .5cqw #c9a24a,0 .6cqw 0 rgba(0,0,0,.35)}
html.hb-portrait-peek .m-skp-badge img{width:78%;height:78%;object-fit:contain;border-radius:50%}
html.hb-portrait-peek .m-skp-name{display:flex;flex-direction:column;gap:calc(.4 * var(--hbcq-w));gap:.4cqw;min-width:0}
html.hb-portrait-peek .m-skp-name b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;line-height:1.1;color:#f0d78f}
html.hb-portrait-peek .m-skp-name span{font-family:'Cinzel',serif;font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw;letter-spacing:.06em;text-transform:uppercase;color:#9aa6c2}
html.hb-portrait-peek .m-skp-bar{display:flex;gap:calc(1 * var(--hbcq-w));gap:1cqw}
html.hb-portrait-peek .m-skp-bar i{flex:1;height:calc(2.4 * var(--hbcq-w));height:2.4cqw;border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;background:#1b2a4a;box-shadow:inset 0 0 0 1px #2c3d63}
html.hb-portrait-peek .m-skp-bar i.on{background:linear-gradient(180deg,#f2d27a,#c99a3a);box-shadow:none}
html.hb-portrait-peek .m-skp-bar i.next{background:#173a2a;box-shadow:inset 0 0 0 calc(.35 * var(--hbcq-w)) #7ee29a;box-shadow:inset 0 0 0 .35cqw #7ee29a}
html.hb-portrait-peek .m-skp-foot{display:flex;align-items:center;justify-content:space-between;gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek .m-skp-lv{font-family:'Cinzel',serif;font-weight:700;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;color:#c9a24a;white-space:nowrap}
html.hb-portrait-peek .m-skp-lv b{color:#f0d78f}
html.hb-portrait-peek .m-skp-lv em{font-style:normal;color:#7ee29a}
html.hb-portrait-peek .m-skp-lv i{font-style:normal;color:#8a96ad}
html.hb-portrait-peek .m-ptf-stages{padding:calc(2.6 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) 0;padding:2.6cqw 4cqw 0}
/* THE SKILL CARD upright (the skills rework, 2026-11-03 — _skCardHtml): what it hits, what it deals in HIS hit, every 15 s,
   the next level in a green box, and ⓘ All 10 levels (also the Gem Altar's) */
html.hb-portrait-peek .m-sk-card{display:flex;flex-direction:column;gap:calc(1 * var(--hbcq-w));gap:1cqw;margin:0}
html.hb-portrait-peek .m-sk-row{gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:1.3}
html.hb-portrait-peek .m-sk-row .k{min-width:calc(12 * var(--hbcq-w));min-width:12cqw;font-size:calc(2.3 * var(--hbcq-w));font-size:2.3cqw}
html.hb-portrait-peek .m-sk-row .v{color:#f0e4c0}
html.hb-portrait-peek .m-sk-new{font-size:calc(2.2 * var(--hbcq-w));font-size:2.2cqw;padding:0 calc(1 * var(--hbcq-w));padding:0 1cqw;border-radius:calc(1 * var(--hbcq-w));border-radius:1cqw}
html.hb-portrait-peek .m-sk-next{margin-top:calc(.4 * var(--hbcq-w));margin-top:.4cqw;padding:calc(1.2 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:1.2cqw 1.6cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;gap:calc(.6 * var(--hbcq-w));gap:.6cqw}
html.hb-portrait-peek .m-sk-nexthd{font-size:calc(2.5 * var(--hbcq-w));font-size:2.5cqw}
html.hb-portrait-peek .m-sk-all{margin-top:calc(.4 * var(--hbcq-w));margin-top:.4cqw;padding:calc(1 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:1cqw 2.4cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw}
html.hb-portrait-peek .m-ptf-dim{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw;line-height:1.35;color:#8a96ad;text-align:center;margin:auto 0}
/* the three sockets: what the strip acts on */
html.hb-portrait-peek .m-ptf-socks{flex:none;display:flex;justify-content:center;gap:calc(5 * var(--hbcq-w));gap:5cqw;padding:calc(3.4 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) 0;padding:3.4cqw 4cqw 0}
html.hb-portrait-peek .m-ptf-sock{flex:none;width:calc(22 * var(--hbcq-w));width:22cqw;display:flex;flex-direction:column;align-items:center;gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:0;
  border:none;background:none;cursor:pointer}
html.hb-portrait-peek .m-ptf-sock:disabled{cursor:default}
html.hb-portrait-peek .m-ptf-sockimg{position:relative;width:calc(15 * var(--hbcq-w));width:15cqw;height:calc(15 * var(--hbcq-w));height:15cqw;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle,#1d3566,#0b1630);box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c9a24a99,0 calc(.8 * var(--hbcq-w)) 0 rgba(0,0,0,.4);box-shadow:inset 0 0 0 .5cqw #c9a24a99,0 .8cqw 0 rgba(0,0,0,.4)}
html.hb-portrait-peek .m-ptf-sock.sel .m-ptf-sockimg{box-shadow:inset 0 0 0 calc(.7 * var(--hbcq-w)) #ffd98a,0 0 0 calc(1 * var(--hbcq-w)) #ffd98a44,0 0 calc(3 * var(--hbcq-w)) #ffd98a88;box-shadow:inset 0 0 0 .7cqw #ffd98a,0 0 0 1cqw #ffd98a44,0 0 3cqw #ffd98a88}
html.hb-portrait-peek .m-ptf-sockimg img{width:72%;height:72%;object-fit:contain;filter:drop-shadow(0 1px 2px #0009)}
html.hb-portrait-peek .m-ptf-sockimg img.ghost{opacity:.45}
html.hb-portrait-peek .m-ptf-plus{width:42%;height:42%;background:url('heropopup/craft_plus.webp') center/contain no-repeat;opacity:.8}
html.hb-portrait-peek .m-ptf-lockico{display:inline-block;width:62%;height:62%}   /* its picture: THE LOCK UPRIGHT below */
html.hb-portrait-peek .m-ptf-row .m-ptf-lockico{width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw}
html.hb-portrait-peek .m-ptf-sock.locked .m-ptf-sockimg{opacity:.6}
html.hb-portrait-peek .m-ptf-socklbl{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;letter-spacing:.06em;text-transform:uppercase;
  color:#b7c3da;white-space:nowrap}
html.hb-portrait-peek .m-ptf-sock.sel .m-ptf-socklbl{color:#ffd98a}
/* under the sockets: the six stones, or the abilities this slot can roll, or the ability's text */
html.hb-portrait-peek .m-ptf-extra{flex:none;min-height:calc(16 * var(--hbcq-w));min-height:16cqw;padding:calc(3 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:3cqw 4cqw 2.4cqw;display:flex;flex-direction:column;justify-content:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw}
html.hb-portrait-peek .m-ptf-stones{display:flex;justify-content:center;gap:calc(2.2 * var(--hbcq-w));gap:2.2cqw}
html.hb-portrait-peek .m-ptf-stone{position:relative;flex:none;width:calc(12.6 * var(--hbcq-w));width:12.6cqw;height:calc(12.6 * var(--hbcq-w));height:12.6cqw;padding:0;border:none;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;cursor:pointer;
  display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#132650,#0b1834);box-shadow:inset 0 0 0 calc(.5 * var(--hbcq-w)) #c9a24a99;box-shadow:inset 0 0 0 .5cqw #c9a24a99}
html.hb-portrait-peek .m-ptf-stone img{width:calc(8.4 * var(--hbcq-w));width:8.4cqw;height:calc(8.4 * var(--hbcq-w));height:8.4cqw;object-fit:contain}
html.hb-portrait-peek .m-ptf-stone span{position:absolute;right:calc(1 * var(--hbcq-w));right:1cqw;bottom:calc(.5 * var(--hbcq-w));bottom:.5cqw;font-family:'Cinzel',serif;font-weight:900;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;
  color:#fff;line-height:1;text-shadow:0 1px 2px #000,0 0 2px #000}
html.hb-portrait-peek .m-ptf-stone.poor span{color:#ff8a75}
html.hb-portrait-peek .m-ptf-stone.sel{box-shadow:inset 0 0 0 calc(.8 * var(--hbcq-w)) #ffd98a,0 0 calc(2.4 * var(--hbcq-w)) #ffd98a99;box-shadow:inset 0 0 0 .8cqw #ffd98a,0 0 2.4cqw #ffd98a99}
html.hb-portrait-peek .m-ptf .m-craft-poolwrap{margin:0}
html.hb-portrait-peek .m-ptf .m-craft-poollabel{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;text-align:center}
html.hb-portrait-peek .m-ptf .m-craft-poolempty{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;text-align:center}
html.hb-portrait-peek .m-ptf .m-craft-pool{justify-content:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;margin-top:calc(1.6 * var(--hbcq-w));margin-top:1.6cqw}
html.hb-portrait-peek .m-ptf .m-craft-poolbadge{width:calc(13 * var(--hbcq-w));width:13cqw}
html.hb-portrait-peek .m-ptf .m-craft-poolbadge span{font-size:calc(5 * var(--hbcq-w));font-size:5cqw}
html.hb-portrait-peek .m-ptf .m-craft-poolinfo{margin-top:calc(2 * var(--hbcq-w));margin-top:2cqw;padding:calc(1.6 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:1.6cqw 2.4cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;font-size:calc(3 * var(--hbcq-w));font-size:3cqw}
html.hb-portrait-peek .m-ptf .m-craft-poolinfo b{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
/* the forge's "you get one at random" + "i", and the re-roll row (2026-11-01) — the landscape rules, at this screen's size */
html.hb-portrait-peek .m-ptf .m-craft-poolrandom{justify-content:center;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek .m-ptf .m-craft-pooli{width:calc(6.4 * var(--hbcq-w));width:6.4cqw;height:calc(6.4 * var(--hbcq-w));height:6.4cqw;font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek .m-ptf .m-craft-reroll{margin-top:calc(2 * var(--hbcq-w));margin-top:2cqw;padding:calc(1.4 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:1.4cqw 2.4cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw;gap:calc(2 * var(--hbcq-w));gap:2cqw;font-size:calc(3 * var(--hbcq-w));font-size:3cqw}
html.hb-portrait-peek .m-ptf .m-craft-reroll .val img{width:calc(4 * var(--hbcq-w));width:4cqw;height:calc(4 * var(--hbcq-w));height:4cqw}
/* RE-ROLL ON THE WOODEN PLANK (Roman, 2026-11-03: "take the wood button, like the Dragons' Equip") — tab_wood.webp, the
   Equip button's own art; a fixed height and a width that grows with a long word ("Volver a tirar") */
html.hb-portrait-peek .m-ptf .m-craft-rerollbtn{min-width:calc(26 * var(--hbcq-w));min-width:26cqw;height:calc(9 * var(--hbcq-w));height:9cqw;padding:0 calc(3.4 * var(--hbcq-w));padding:0 3.4cqw;border-radius:0;box-shadow:none;
  display:flex;align-items:center;justify-content:center;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;color:#fff8dc;text-shadow:0 calc(.15 * var(--hbcq-w)) calc(.25 * var(--hbcq-w)) #000d;text-shadow:0 .15cqw .25cqw #000d;
  background:url('heropopup/settings/tab_wood.webp') center/100% 100% no-repeat}
html.hb-portrait-peek .m-ptf .m-craft-rerollbtn:active{transform:scale(0.96)}
/* the strip — the bag's middle strip: success rate, cost, the button */
html.hb-portrait-peek .m-ptf-bar{flex:none;display:flex;align-items:center;gap:calc(3 * var(--hbcq-w));gap:3cqw;min-height:calc(16 * var(--hbcq-w));min-height:16cqw;padding:calc(1.6 * var(--hbcq-w)) calc(4 * var(--hbcq-w));padding:1.6cqw 4cqw;
  background:linear-gradient(180deg,#243b6e 0%,#1a2d56 100%);border-top:2px solid #c9a24a;border-bottom:2px solid #c9a24a;box-shadow:0 3px 8px #0009}
html.hb-portrait-peek .m-ptf-bar .m-craft-bottombar{display:contents}
html.hb-portrait-peek .m-ptf-bar .m-craft-bb-item{gap:calc(.4 * var(--hbcq-w));gap:.4cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-bb-item .lbl{font-size:calc(2.4 * var(--hbcq-w));font-size:2.4cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-bb-item .val{font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;gap:calc(1 * var(--hbcq-w));gap:1cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-bb-item .val img{width:calc(4 * var(--hbcq-w));width:4cqw;height:calc(4 * var(--hbcq-w));height:4cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-bb-note{font-size:calc(2.1 * var(--hbcq-w));font-size:2.1cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-adboost{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;gap:calc(1 * var(--hbcq-w));gap:1cqw;padding:calc(.8 * var(--hbcq-w)) calc(1.6 * var(--hbcq-w));padding:.8cqw 1.6cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-adboost img{width:calc(5 * var(--hbcq-w));width:5cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-imbue{flex:none;width:calc(30 * var(--hbcq-w));width:30cqw;margin-left:auto;font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw;gap:calc(1 * var(--hbcq-w));gap:1cqw}
html.hb-portrait-peek .m-ptf-bar .m-craft-short{max-width:calc(36 * var(--hbcq-w));max-width:36cqw;font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw}
html.hb-portrait-peek .m-ptf-max{margin:0 auto;font-family:'Cinzel',serif;font-weight:900;font-size:calc(4.4 * var(--hbcq-w));font-size:4.4cqw;letter-spacing:.12em;color:#ffd98a}
/* your weapons: the bag's rarity tiles, five to a row */
html.hb-portrait-peek .m-ptf-grid{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(5,1fr);
  align-content:start;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;padding:calc(3.6 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) calc(6 * var(--hbcq-w));padding:3.6cqw 4cqw 6cqw}
html.hb-portrait-peek .m-ptf-grid .m-ptf-dim{grid-column:1/-1}
html.hb-portrait-peek .m-ptf-cell{position:relative;aspect-ratio:1;padding:0;border:none;cursor:pointer;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;
  --tile-a:#9aa3b2;--tile-b:#6d7687;--tile-rim:#3f4757;background:linear-gradient(180deg,var(--tile-a),var(--tile-b));
  box-shadow:inset 0 0 0 .6cqw var(--tile-rim),inset 0 -1.2cqw 0 rgba(0,0,0,.16),0 .7cqw 0 rgba(0,0,0,.45)}@supports not (width:1cqw){html.hb-portrait-peek .m-ptf-cell{box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) var(--tile-rim),inset 0 calc(-1.2 * var(--hbcq-w)) 0 rgba(0,0,0,.16),0 calc(.7 * var(--hbcq-w)) 0 rgba(0,0,0,.45)}}
/* the rarity colours again: the cell rule above sets the common ones and outranks §8's shared [data-rar] rules */
html.hb-portrait-peek .m-ptf-cell[data-rar=rare]{--tile-a:#5aa2f4;--tile-b:#2f6ccd;--tile-rim:#1c427f}
html.hb-portrait-peek .m-ptf-cell[data-rar=epic]{--tile-a:#b47af5;--tile-b:#7c40d3;--tile-rim:#47207f}
html.hb-portrait-peek .m-ptf-cell[data-rar=legendary]{--tile-a:#f8c04a;--tile-b:#e2891c;--tile-rim:#8f540f}
html.hb-portrait-peek .m-ptf-cell::before{content:'';position:absolute;top:10%;right:10%;bottom:12%;left:10%;border-radius:calc(1.6 * var(--hbcq-w));border-radius:1.6cqw;
  background:rgba(255,255,255,.16)}
html.hb-portrait-peek .m-ptf-cell .m-ptf-icon{position:absolute;left:12%;top:10%;width:76%;height:74%;object-fit:contain;z-index:1}
html.hb-portrait-peek .m-ptf-lv{position:absolute;left:calc(-.6 * var(--hbcq-w));left:-.6cqw;top:calc(-.6 * var(--hbcq-w));top:-.6cqw;z-index:2;padding:calc(.3 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w));padding:.3cqw 1.2cqw;border-radius:calc(1.4 * var(--hbcq-w));border-radius:1.4cqw;
  background:rgba(10,16,32,.82);box-shadow:inset 0 0 0 1px #c9a24a88;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#f0e4c0}
html.hb-portrait-peek .m-ptf-el{position:absolute;right:calc(-.8 * var(--hbcq-w));right:-.8cqw;bottom:calc(-.8 * var(--hbcq-w));bottom:-.8cqw;width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;object-fit:contain;z-index:2;
  filter:drop-shadow(0 1px 2px #000a)}
html.hb-portrait-peek .m-ptf-eq{position:absolute;left:50%;bottom:calc(-1.4 * var(--hbcq-w));bottom:-1.4cqw;transform:translateX(-50%);z-index:2;padding:calc(.2 * var(--hbcq-w)) calc(1.2 * var(--hbcq-w));padding:.2cqw 1.2cqw;
  border-radius:calc(1.2 * var(--hbcq-w));border-radius:1.2cqw;background:#3cae5a;font-family:'Cinzel',serif;font-weight:900;font-size:calc(2 * var(--hbcq-w));font-size:2cqw;color:#fff;white-space:nowrap}
html.hb-portrait-peek .m-ptf-cell.sel{box-shadow:inset 0 0 0 .6cqw var(--tile-rim),0 0 0 .8cqw #ffd98a,0 0 3cqw #ffd98aaa}@supports not (width:1cqw){html.hb-portrait-peek .m-ptf-cell.sel{box-shadow:inset 0 0 0 calc(.6 * var(--hbcq-w)) var(--tile-rim),0 0 0 calc(.8 * var(--hbcq-w)) #ffd98a,0 0 calc(3 * var(--hbcq-w)) #ffd98aaa}}
html.hb-portrait-peek .m-ptf-check{position:absolute;right:calc(-1.2 * var(--hbcq-w));right:-1.2cqw;top:calc(-1.2 * var(--hbcq-w));top:-1.2cqw;z-index:3;width:calc(6.4 * var(--hbcq-w));width:6.4cqw;height:calc(6.4 * var(--hbcq-w));height:6.4cqw;border-radius:50%;
  background:#3cae5a;box-shadow:0 0 0 calc(.5 * var(--hbcq-w)) #fff,0 1px 3px #0009;box-shadow:0 0 0 .5cqw #fff,0 1px 3px #0009}
html.hb-portrait-peek .m-ptf-check::after{content:'';position:absolute;left:34%;top:18%;width:24%;height:44%;
  border:solid #fff;border-width:0 calc(.8 * var(--hbcq-w)) calc(.8 * var(--hbcq-w)) 0;border-width:0 .8cqw .8cqw 0;transform:rotate(45deg)}

/* 10. THE PASSIVE WINDOW UPRIGHT (the Sorceress's Gem Altar) — the Forge's upright layout (§9's .m-ptf rules) with the
   Sorceress where the forge stands. gem-altar.js _galtarRenderPt fills #m-galtar-pt; the landscape title and two
   columns step aside. The box is the full screen and a size container, so 1cqw = 1% of the screen's width. */
.m-galtar-pt{display:none}
html.hb-portrait-peek #gemaltar-modal{padding:0}
html.hb-portrait-peek .m-galtar-land{width:var(--pt-col);margin-left:auto;margin-right:auto;height:100vh;max-width:none;max-height:none;aspect-ratio:auto;
  background:#0f1d3a;border:none;border-radius:0;box-shadow:none}
html.hb-portrait-peek .m-galtar-land .m-galtar-title,
html.hb-portrait-peek .m-galtar-land .m-galtar-body{display:none}
html.hb-portrait-peek .m-galtar-pt{display:block;height:100%}
html.hb-portrait-peek .m-galtar-close{top:calc(2.2 * var(--hbcq-w));top:2.2cqw;right:calc(2.6 * var(--hbcq-w));right:2.6cqw;width:calc(12 * var(--hbcq-w));width:12cqw;height:auto;aspect-ratio:120/136;z-index:7;
  background:url('heropopup/close_leaf.webp') center/contain no-repeat}
/* the Sorceress stands where the forge does — taller than it, so a little narrower */
html.hb-portrait-peek .m-ptp-sorc{width:calc(27 * var(--hbcq-w));width:27cqw;right:calc(4 * var(--hbcq-w));right:4cqw;bottom:calc(-9 * var(--hbcq-w));bottom:-9cqw}
html.hb-portrait-peek .m-ptp .m-ptf-abname{display:flex;align-items:center;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw}
html.hb-portrait-peek .m-ptp .m-ptf-abname img{width:calc(6 * var(--hbcq-w));width:6cqw;height:calc(6 * var(--hbcq-w));height:6cqw;object-fit:contain}
/* what the passive does NOW, and AFTER the next level */
html.hb-portrait-peek .m-ptp-stages{flex:none;display:flex;flex-direction:column;align-items:stretch;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;padding:calc(3.4 * var(--hbcq-w)) calc(4 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:3.4cqw 4cqw 3cqw}
html.hb-portrait-peek .m-ptp-stage{display:flex;flex-direction:column;gap:calc(.8 * var(--hbcq-w));gap:.8cqw;padding:calc(2.2 * var(--hbcq-w)) calc(3 * var(--hbcq-w));padding:2.2cqw 3cqw;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw;
  background:rgba(9,18,40,.82);box-shadow:inset 0 0 0 1px #c9a24a66}
html.hb-portrait-peek .m-ptp-stage.next{box-shadow:inset 0 0 0 1px #7ee29a99,0 0 calc(2.4 * var(--hbcq-w)) #7ee29a22;box-shadow:inset 0 0 0 1px #7ee29a99,0 0 2.4cqw #7ee29a22}
html.hb-portrait-peek .m-ptp-lbl{font-family:'Cinzel',serif;font-weight:900;font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;letter-spacing:.12em;text-transform:uppercase;color:#c9a24a}
html.hb-portrait-peek .m-ptp-stage b{font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;line-height:1.25;color:#f0e4c0}
html.hb-portrait-peek .m-ptp-stage.next b{color:#9df0b4}
html.hb-portrait-peek .m-ptp-stage b.dim{color:#8a96ad}
html.hb-portrait-peek .m-ptp-stage span{font-size:calc(3 * var(--hbcq-w));font-size:3cqw;line-height:1.3;color:#b9c6df}
html.hb-portrait-peek .m-ptp-down{align-self:center;width:calc(4.4 * var(--hbcq-w));width:4.4cqw;height:calc(5 * var(--hbcq-w));height:5cqw;background:url('heropopup/craft_arrow.webp') center/contain no-repeat;
  transform:rotate(90deg)}
html.hb-portrait-peek .m-ptp-mastery{margin-top:calc(.6 * var(--hbcq-w));margin-top:.6cqw;text-align:center;font-style:italic;font-size:calc(2.9 * var(--hbcq-w));font-size:2.9cqw;line-height:1.3;color:#ffd98a}
/* a weapon tile carries its passive level on its stone (the stone dim and "0" while inactive) */
html.hb-portrait-peek .m-ptp-plv{position:absolute;right:calc(-1 * var(--hbcq-w));right:-1cqw;bottom:calc(-1 * var(--hbcq-w));bottom:-1cqw;z-index:2;display:flex;align-items:center}
html.hb-portrait-peek .m-ptp-plv img{width:calc(6.4 * var(--hbcq-w));width:6.4cqw;height:calc(6.4 * var(--hbcq-w));height:6.4cqw;object-fit:contain;filter:drop-shadow(0 1px 2px #000a)}
html.hb-portrait-peek .m-ptp-plv b{position:absolute;left:50%;top:56%;transform:translate(-50%,-50%);font-family:'Cinzel',serif;font-weight:900;
  font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw;color:#fff;text-shadow:0 0 2px #000,0 1px 2px #000,0 0 3px #000}
html.hb-portrait-peek .m-ptp-plv.off img{filter:grayscale(1) brightness(.7) drop-shadow(0 1px 2px #000a)}

/* 10a. THE FORGE AND THE SORCERESS ON A SQUARE UPRIGHT SCREEN (the folded iPhone Duo; Roman, 2026-11-08: "forge and
   sorceress screens look bad — adjust them as well"). Their fixed stack — the bubble and the smith, the weapon and its
   panel, NOW → AFTER, the sockets, the stones or the skill text — is ~150cqw tall, the folded Duo 145cqw: the strip with
   the button and the weapons under it were pushed off the screen. Any upright screen wider than 3:5 (§7a's test — the Android
   tablets since 2026-11-23; every phone keeps the layout above): the WHOLE window scrolls instead of the weapons alone, the head a little shorter, and the ✕ leaves the
   Duo's camera strip like the bag's. */
@media (min-aspect-ratio:3/5){
  html.hb-portrait-peek .m-econ-inner.craft-mode #m-econ-body,
  html.hb-portrait-peek .m-galtar-pt{overflow-y:auto;-webkit-overflow-scrolling:touch}
  html.hb-portrait-peek .m-ptf{height:auto;min-height:100%}
  html.hb-portrait-peek .m-ptf-grid{flex:none;overflow:visible}
  html.hb-portrait-peek .m-ptf-head{min-height:calc(24 * var(--hbcq-w));min-height:24cqw}
  /* NOW → AFTER SIDE BY SIDE (Roman: "one next to the other, not one under the other — it takes all the screen"), the
     arrow pointing right as in landscape; the Sorceress's mastery line (and anything else in the row) on its own line */
  html.hb-portrait-peek .m-ptp-stages{flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw}
  html.hb-portrait-peek .m-ptp-stage{flex:1 1 0;min-width:0;padding:calc(2 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:2cqw 2.4cqw}
  html.hb-portrait-peek .m-ptp-stages>:not(.m-ptp-stage):not(.m-ptp-down){flex:0 0 100%}
  html.hb-portrait-peek .m-ptp-down{flex:none;transform:none}
  html.hb-portrait-peek .m-ptp-stage b{font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw}
  html.hb-portrait-peek .m-ptp-stage span{font-size:calc(2.7 * var(--hbcq-w));font-size:2.7cqw}
  html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-close,
  html.hb-portrait-peek .m-galtar-close{width:calc(10 * var(--hbcq-w));width:10cqw;right:calc(env(safe-area-inset-right,0px) + 2.6cqw)}@supports not (width:1cqw){html.hb-portrait-peek .m-econ-inner.craft-mode .m-econ-close,
  html.hb-portrait-peek .m-galtar-close{right:calc(env(safe-area-inset-right,0px) + calc(2.6 * var(--hbcq-w)))}}
}

/* 11. THE LOBBY HOME UPRIGHT (Roman, 2026-10-22: "the most important part — the lobby itself"). His placement: his
   frame top-left as it is, settings in the top-right corner, the currencies under the frame, the shop and the gift
   twice their size (the mail beside them on the right, as in landscape), the hero on the podium — a NEW tall picture,
   background_tall.webp (Gemini from background_wide, the podium higher and open ground below; cropped so the podium is
   centred) — the chest under him on the left and the forge on the right, Arena and Journey along the bottom. The scene
   keeps its rule (locked to its picture, objects in % of it): only the picture's shape and the % change upright. */
html.hb-portrait-peek .scene{width:max(100vw,calc(100vh * 660 / 1344));height:max(100vh,calc(100vw * 1344 / 660));
  background-image:url('background_tall.webp')}
/* the world objects, in % of the tall picture: the podium's top at ~61% down, the meadow below it */
html.hb-portrait-peek .hero{left:10%;top:28.5%;width:80%;height:42%}   /* feet on the podium's top (~62%) */
html.hb-portrait-peek .hs-arrow{top:55%;width:9vw;height:9vw}
html.hb-portrait-peek .hs-left{left:1%}
html.hb-portrait-peek .hs-right{right:1%}
html.hb-portrait-peek .chest{left:6%;top:71.5%;width:33%;height:auto;aspect-ratio:978/759}
html.hb-portrait-peek .craft{left:55%;top:66.5%;width:41%}
html.hb-portrait-peek .chest,html.hb-portrait-peek .craft,
html.hb-portrait-peek .chest:active,html.hb-portrait-peek .craft:active{transform:none}
html.hb-portrait-peek .chest:hover,html.hb-portrait-peek .craft:hover{transform:translateY(-2px)}
/* the top row: his frame in the left corner, settings in the right one — below the phone's status bar / camera */
html.hb-portrait-peek .tr-col{left:2.5%;right:2.5%;top:max(3.2%,calc(env(safe-area-inset-top,0px) + 1%));width:auto}
html.hb-portrait-peek .tr-top{height:19vw;justify-content:space-between;gap:2vw}
/* the currencies under the frame, one row */
html.hb-portrait-peek .curr{left:2.5%;top:calc(max(3.2%,calc(env(safe-area-inset-top,0px) + 1%)) + 21vw);transform:none;gap:2vw}
html.hb-portrait-peek .curr .chip{height:10.5vw;gap:1.4vw;padding:0 1.8vw 0 1.4vw}
html.hb-portrait-peek .curr .chip .icn{width:6.6vw}
html.hb-portrait-peek .curr .chip .val{font-size:4vw;min-width:7vw}
html.hb-portrait-peek .curr .chip .plus{width:6.4vw;font-size:4vw}
html.hb-portrait-peek .curr .chip-cores .caret{width:6vw;height:6vw}
/* shop + gift (left) and the mail (right): twice their old upright size, under the currencies */
html.hb-portrait-peek .rail{left:2.5%;top:calc(max(3.2%,calc(env(safe-area-inset-top,0px) + 1%)) + 36vw);width:17vw;transform:none;gap:5vw}
html.hb-portrait-peek .r-rail{right:2.5%;top:calc(max(3.2%,calc(env(safe-area-inset-top,0px) + 1%)) + 36vw);width:17vw;transform:none;gap:5vw}
/* Arena and Journey along the bottom, side by side */
html.hb-portrait-peek .battle,html.hb-portrait-peek .journey{bottom:calc(3% + env(safe-area-inset-bottom,0px));width:44vw;transform:none}
html.hb-portrait-peek .battle{left:4%}
html.hb-portrait-peek .journey{left:auto;right:4%}
html.hb-portrait-peek .battle:hover,html.hb-portrait-peek .journey:hover{transform:translateY(-2px)}
html.hb-portrait-peek .battle:active,html.hb-portrait-peek .journey:active{transform:translateY(1px)}
html.hb-portrait-peek .battle .ctxt,html.hb-portrait-peek .journey .ctxt{font-size:4.4vw}
/* the dev-only buttons out of the chest's way: the right edge, under the mail */
html.hb-portrait-peek .dev-test-btn{left:auto;right:2.5%;top:33%}
html.hb-portrait-peek .dev-test-btn.dev-fx-btn{top:38.5%}

/* 12. THE STASH UPRIGHT (the chest; Roman, 2026-10-22) — popups.js _ptStashHtml, drawn by §9's .m-ptf rules: the bubble
   beside the treasure, the STASH's tiles, a strip with the arrows, YOUR ITEMS; the two grids share the height. The panel
   is the econ panel's treasure tab — full screen like the Forge, so 1cqw = 1% of the screen's width. */
html.hb-portrait-peek .m-econ-inner.treasure-mode{width:var(--pt-col);margin-left:auto;margin-right:auto;height:100vh;max-width:none;max-height:none;aspect-ratio:auto;
  background:#0f1d3a;border:none;border-radius:0;box-shadow:none}
html.hb-portrait-peek .m-econ-inner.treasure-mode .m-econ-tabs,
html.hb-portrait-peek .m-econ-inner.treasure-mode .m-econ-bannertitle,
html.hb-portrait-peek .m-econ-inner.treasure-mode .m-econ-bannerspace{display:none}
html.hb-portrait-peek .m-econ-inner.treasure-mode .m-econ-close{top:calc(2.2 * var(--hbcq-w));top:2.2cqw;right:calc(2.6 * var(--hbcq-w));right:2.6cqw;width:calc(12 * var(--hbcq-w));width:12cqw;height:auto;aspect-ratio:120/136;z-index:7;
  border:none;border-radius:0;box-shadow:none;background:url('heropopup/close_leaf.webp') center/contain no-repeat}
html.hb-portrait-peek .m-econ-inner.treasure-mode #m-econ-body{flex:1;min-height:0;padding:0;overflow:hidden}
html.hb-portrait-peek .m-pts-art{width:calc(30 * var(--hbcq-w));width:30cqw;right:calc(5 * var(--hbcq-w));right:5cqw;bottom:calc(-4 * var(--hbcq-w));bottom:-4cqw}
html.hb-portrait-peek .m-pts-hd{flex:none;display:flex;align-items:baseline;justify-content:space-between;padding:calc(3.6 * var(--hbcq-w)) calc(5 * var(--hbcq-w)) 0;padding:3.6cqw 5cqw 0;
  font-family:'Cinzel',serif;font-weight:900;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;letter-spacing:.1em;text-transform:uppercase;color:#c9a24a}
html.hb-portrait-peek .m-pts-count{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;letter-spacing:.04em;color:#f0e4c0}
html.hb-portrait-peek .m-pts-grid{padding-top:calc(2.4 * var(--hbcq-w));padding-top:2.4cqw;padding-bottom:calc(3 * var(--hbcq-w));padding-bottom:3cqw}
/* the strip: which way a tap sends an item */
html.hb-portrait-peek .m-pts-bar{justify-content:center;gap:calc(4 * var(--hbcq-w));gap:4cqw;min-height:calc(13 * var(--hbcq-w));min-height:13cqw;font-family:'Cinzel',serif;font-weight:900;
  font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw;letter-spacing:.08em;text-transform:uppercase;color:#f0d78f}
html.hb-portrait-peek .m-pts-arrow{width:calc(8 * var(--hbcq-w));width:8cqw;height:calc(8 * var(--hbcq-w));height:8cqw;background:url('heropopup/stash/arrow.webp') center/contain no-repeat}
html.hb-portrait-peek .m-pts-arrow.up{transform:rotate(-90deg)}
html.hb-portrait-peek .m-pts-arrow.down{transform:rotate(90deg)}
/* each tile's own arrow, top-right: where a tap sends it */
html.hb-portrait-peek .m-pts-act{position:absolute;right:calc(-1 * var(--hbcq-w));right:-1cqw;top:calc(-1 * var(--hbcq-w));top:-1cqw;z-index:3;width:calc(6.2 * var(--hbcq-w));width:6.2cqw;height:calc(6.2 * var(--hbcq-w));height:6.2cqw;border-radius:50%;
  background:#1a2d56 url('heropopup/stash/arrow.webp') center/72% no-repeat;box-shadow:0 0 0 calc(.4 * var(--hbcq-w)) #c9a24a,0 1px 3px #0009;box-shadow:0 0 0 .4cqw #c9a24a,0 1px 3px #0009}
html.hb-portrait-peek .m-pts-act.up{transform:rotate(-90deg)}
html.hb-portrait-peek .m-pts-act.down{transform:rotate(90deg)}

/* 13. CREATE YOUR HERO UPRIGHT (2026-10-22, the production testers: "not adapted to portrait") — the first screen a
   new player touches after the intro video. The item card's leaf frame (§8, shop_frame.webp nine-sliced), 92vw wide
   and as tall as it needs; it sits HIGH on the screen (.m-createchar-ov), so the name, the hint and the one Create
   under the field stay above the keyboard. The faces four across. Sizes in units of the upright column, like §8 (2026-11-25:
   in vw, on a square screen it ran 1,328 px down an 868 px one, the Create button below the screen). */
html.hb-portrait-peek .m-createchar-ov{align-items:flex-start;padding:7vh 0 0}
html.hb-portrait-peek .m-createchar-land{position:relative;width:calc(var(--pt-col) * 92 / 100);max-height:none;overflow:visible;padding:calc(var(--pt-col) * 15 / 100) calc(var(--pt-col) * 6 / 100) calc(var(--pt-col) * 11 / 100);
  background:none;isolation:isolate;box-shadow:none}
html.hb-portrait-peek .m-createchar-land::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(--pt-col) * 13.25 / 100) calc(var(--pt-col) * 4.1 / 100) calc(var(--pt-col) * 11.3 / 100) calc(var(--pt-col) * 4.1 / 100);
  border-image:url('heropopup/shop/shop_frame.webp') 170 50 145 50 fill stretch}
html.hb-portrait-peek .m-createchar-land .m-look-title{position:absolute;top:calc(var(--pt-col) * 3.4 / 100);left:calc(var(--pt-col) * 16 / 100);right:calc(var(--pt-col) * 16 / 100);height:calc(var(--pt-col) * 7 / 100);margin:0;
  display:flex;align-items:center;justify-content:center;font-family:'Cinzel',serif;font-weight:900;font-size:calc(var(--pt-col) * 4.6 / 100);
  letter-spacing:.03em;color:#f0d78f;text-shadow:0 2px 4px #000b;white-space:nowrap;overflow:hidden}
html.hb-portrait-peek .m-createchar-land .m-look-x{top:calc(var(--pt-col) * -0.6 / 100);right:calc(var(--pt-col) * -0.6 / 100);width:calc(var(--pt-col) * 11 / 100);height:auto;aspect-ratio:120/136;
  border:none;border-radius:0;font-size:0;background:url('heropopup/close_leaf.webp') center/contain no-repeat}
html.hb-portrait-peek .m-createchar-land .m-look-name-row{margin-top:calc(var(--pt-col) * 1 / 100);gap:calc(var(--pt-col) * 2.4 / 100);justify-content:center}
html.hb-portrait-peek .m-createchar-land .m-look-name-label{flex-basis:100%;text-align:center;font-size:calc(var(--pt-col) * 3.3 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-name-wrap{flex-basis:100%}
html.hb-portrait-peek .m-createchar-land .m-look-name{padding:calc(var(--pt-col) * 3 / 100) calc(var(--pt-col) * 13 / 100) calc(var(--pt-col) * 3 / 100) calc(var(--pt-col) * 3.6 / 100);font-size:calc(var(--pt-col) * 4.6 / 100);border-radius:calc(var(--pt-col) * 2.4 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-dice{right:calc(var(--pt-col) * 1 / 100);width:calc(var(--pt-col) * 11 / 100);height:calc(var(--pt-col) * 10 / 100);font-size:calc(var(--pt-col) * 6 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-name-hint{order:3;margin:0;min-height:calc(var(--pt-col) * 4.6 / 100);font-size:calc(var(--pt-col) * 3.3 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-confirm{order:4;width:calc(var(--pt-col) * 44 / 100);min-width:0;height:auto;padding:0;font-size:calc(var(--pt-col) * 4.6 / 100);margin-top:calc(var(--pt-col) * 6 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-sep{margin:calc(var(--pt-col) * 4 / 100) 0 calc(var(--pt-col) * 3 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-grid{grid-template-columns:repeat(4,1fr);gap:calc(var(--pt-col) * 2 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-tile{padding:calc(var(--pt-col) * 1.4 / 100);border-radius:calc(var(--pt-col) * 2.4 / 100)}
html.hb-portrait-peek .m-createchar-land .m-look-tile span{margin-top:calc(var(--pt-col) * 0.4 / 100);font-size:calc(var(--pt-col) * 3 / 100)}

/* 14. THE LANGUAGE WINDOW — no upright rules here any more (2026-11-17). js/lang-gate.js draws its own upright and sideways
   layouts (Roman's 11-15 picker for 15 languages); the old rules for the 5-language window overrode it and squashed the
   panel in every upright app. */

/* 15. THE LEADERBOARD UPRIGHT (Roman, 2026-10-23: "split it in two — the podium on top, the list below"). §2's frame
   (shop_frame nine-sliced, 88vh tall); the board's landscape rules (popups.css .m-lb-land: podium left, list right) are
   restated in cqw of this taller box: the tabs under the title, the three pedestals across the top, the rows scrolling
   under them, your own row pinned at the bottom. */
html.hb-portrait-peek #lb-modal .m-lb-land{aspect-ratio:auto;width:min(96vw,calc(88vh*0.62));height:88vh;background:none;isolation:isolate}
html.hb-portrait-peek #lb-modal .m-lb-land::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}
html.hb-portrait-peek #lb-modal .m-lb-land .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw;right:calc(-0.475 * var(--hbcq-w));right:-0.475cqw;width:calc(12 * var(--hbcq-w));width:12cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-settings-title{font-size:calc(5 * var(--hbcq-w));font-size:5cqw;padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-tabs{gap:calc(2 * var(--hbcq-w));gap:2cqw;margin:calc(9 * var(--hbcq-w)) auto 0;margin:9cqw auto 0}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-tab{width:calc(27 * var(--hbcq-w));width:27cqw;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek #lb-tabs .m-lb-tab[data-board="level"]{display:none}   /* no Level board upright (popups.js loadLeaderboard) */
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-body{flex-direction:column;gap:calc(2 * var(--hbcq-w));gap:2cqw;padding:calc(3 * var(--hbcq-w)) calc(6 * var(--hbcq-w)) calc(10 * var(--hbcq-w));padding:3cqw 6cqw 10cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-podium{flex:none;height:calc(67 * var(--hbcq-w));height:67cqw;margin:0;align-items:flex-end}
/* EACH BOARD ITS OWN PICTURE behind the podium (2026-11-01, Gemini in the dragons' sky style; popups.js sets data-board) */
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-podium{border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;overflow:hidden;background:#1a1230 center/cover no-repeat;
  box-shadow:inset 0 0 0 calc(.35 * var(--hbcq-w)) #c9a24a88,inset 0 calc(-6 * var(--hbcq-w)) calc(6 * var(--hbcq-w)) calc(-2 * var(--hbcq-w)) #0008;box-shadow:inset 0 0 0 .35cqw #c9a24a88,inset 0 -6cqw 6cqw -2cqw #0008}
html.hb-portrait-peek #lb-modal[data-board="colosseum"] .m-lb-podium{background-image:url('leaderboard/bg_colosseum.webp')}
html.hb-portrait-peek #lb-modal[data-board="survival"] .m-lb-podium{background-image:url('leaderboard/bg_survival.webp')}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-stage{height:100%;gap:calc(3 * var(--hbcq-w));gap:3cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col{--pw:22cqw}@supports not (width:1cqw){html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col{--pw:calc(22 * var(--hbcq-w))}}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col.c2{--pw:19cqw}@supports not (width:1cqw){html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col.c2{--pw:calc(19 * var(--hbcq-w))}}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col.c3{--pw:17cqw}@supports not (width:1cqw){html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-col.c3{--pw:calc(17 * var(--hbcq-w))}}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-plate{margin-top:calc(-1.2 * var(--hbcq-w));margin-top:-1.2cqw;width:calc(var(--pw) + 6cqw)}@supports not (width:1cqw){html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-plate{width:calc(var(--pw) + calc(6 * var(--hbcq-w)))}}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-plate b{font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw;max-width:calc(var(--pw) + 2cqw)}@supports not (width:1cqw){html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-plate b{max-width:calc(var(--pw) + calc(2 * var(--hbcq-w)))}}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-plate span{font-size:calc(2.6 * var(--hbcq-w));font-size:2.6cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-you span{font-size:calc(2.8 * var(--hbcq-w));font-size:2.8cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-you i{border-left-width:calc(1.6 * var(--hbcq-w));border-left-width:1.6cqw;border-right-width:calc(1.6 * var(--hbcq-w));border-right-width:1.6cqw;border-top-width:calc(2 * var(--hbcq-w));border-top-width:2cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-side{flex:1;min-height:0}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-content{padding:calc(1 * var(--hbcq-w)) calc(1 * var(--hbcq-w)) calc(2 * var(--hbcq-w));padding:1cqw 1cqw 2cqw;gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-row{gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;padding:calc(2.4 * var(--hbcq-w)) calc(3.2 * var(--hbcq-w));padding:2.4cqw 3.2cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-rank{font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;width:calc(7 * var(--hbcq-w));width:7cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-name{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-points{font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-pic{width:calc(10 * var(--hbcq-w));width:10cqw;height:calc(10 * var(--hbcq-w));height:10cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-go{font-size:calc(4.4 * var(--hbcq-w));font-size:4.4cqw}
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-me{margin:calc(2 * var(--hbcq-w)) 0 0;margin:2cqw 0 0}
/* The face portrait (a phone with no 3D viewer only): small on the pedestal — §15's bigger hero box made 42% of it huge. */
html.hb-portrait-peek #lb-modal .m-lb-land .m-lb-hero img.snap.portrait{width:30%}

/* 16. THE SHOP'S "i" UPRIGHT (Roman, 2026-10-23: "move it a bit down and make it bigger, so the player sees it is
   information about the chest"). It sat as a small dot on the card's corner leaves; now below them, ~3x the size, with a
   gold ring so it reads as a button. */
html.hb-portrait-peek #store-modal .m-store-info{top:19%;right:7%;width:22%;min-width:0;font-size:calc(5.2 * var(--hbcq-w));font-size:5.2cqw;
  background:rgba(20,10,10,.72);box-shadow:inset 0 0 0 2px rgba(255,214,120,.9),0 1px 3px #000a;
  font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:700}   /* Cinzel's lowercase is a capital I, not "info" */

/* 17. THE COUPON WINDOW UPRIGHT (Roman, 2026-10-23: "the window is very long and the confirm button looks really bad —
   shorten the whole frame"). Its own short frame: the Settings art as the same NINE-SLICE (§2's slices), so the leaf
   header and the bottom corners keep their size and only the sides shrink; the height is explicit (the frame is a size
   container). REDEEM is the game's green leaf button (Create's, hero-port.css), the code field bigger. */
html.hb-portrait-peek #promo-modal .m-settings-land{--pw:min(88vw,calc(70vh*1180/1402));aspect-ratio:auto;width:var(--pw);
  height:calc(var(--pw)*.6);background:none;isolation:isolate}
html.hb-portrait-peek #promo-modal .m-settings-land::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}
html.hb-portrait-peek #promo-modal .m-settings-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw}
html.hb-portrait-peek #promo-modal .m-settings-title{padding:calc(4.04 * var(--hbcq-w)) calc(8 * var(--hbcq-w)) 0;padding:4.04cqw 8cqw 0}
html.hb-portrait-peek #promo-modal .m-promo-content{justify-content:center;gap:calc(8 * var(--hbcq-w));gap:8cqw;margin:calc(1 * var(--hbcq-w)) 0 0;margin:1cqw 0 0;padding:calc(3 * var(--hbcq-w)) calc(6 * var(--hbcq-w)) calc(11 * var(--hbcq-w));padding:3cqw 6cqw 11cqw;
  overflow:visible}
html.hb-portrait-peek #promo-modal .m-promo-input{width:86%;font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;padding:calc(2.8 * var(--hbcq-w)) 0;padding:2.8cqw 0;border:2px solid #8a6a33;
  border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw;background:rgba(6,10,28,.75)}
html.hb-portrait-peek #promo-modal .m-promo-input::placeholder{color:#9a90b8}
html.hb-portrait-peek #promo-modal .m-settings-item{position:relative;width:calc(46 * var(--hbcq-w));width:46cqw;aspect-ratio:440/150;overflow:visible;
  background:url('heropopup/settings/tab_on.webp') center/100% 100% no-repeat;font-size:calc(5 * var(--hbcq-w));font-size:5cqw;font-weight:900;
  color:#fff8dc;text-transform:uppercase;letter-spacing:.05em;text-shadow:0 1px 2px #000d,0 0 6px #c8ff9a77}
html.hb-portrait-peek #promo-modal .m-settings-item::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}

/* 18. ANOTHER PLAYER'S HERO UPRIGHT — the leaderboard's tap (Roman, 2026-10-23: "it opens an old, broken view of the
   character — build a new view without his bag: the character, and the stats at the bottom"). The card's Stats page in
   peek mode (openPlayerProfile adds .m-pt-stats): the bag's STATS sheet (§7b) as a panel along the bottom with the
   hero's name and level in its plank, and the hero himself standing in our world above it, on the bag's platform. No
   bag, no stones, nothing to tap but the X. */
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned{background:#0f1d3a url('background_wide.webp') 50% 30%/cover no-repeat}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats::after,
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statsclose,
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats #m-hc-gems{display:none}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned .m-chcard-close{z-index:30}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats{top:auto;bottom:calc(3 * var(--hbcq-w));bottom:3cqw;transform:none;overflow:visible}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats .m-hc-hero{display:block;position:absolute;
  left:calc(-4 * var(--hbcq-w));left:-4cqw;right:calc(-4 * var(--hbcq-w));right:-4cqw;bottom:100%;height:calc(120 * var(--hbcq-w));height:120cqw;pointer-events:none}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-hc-3d{position:absolute;left:calc(11 * var(--hbcq-w));left:11cqw;right:calc(11 * var(--hbcq-w));right:11cqw;bottom:calc(-9 * var(--hbcq-w));bottom:-9cqw;
  width:auto;margin:0;aspect-ratio:620/773;background:none}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-hc-3d::before{content:'';position:absolute;top:0;right:0;
  bottom:0;left:0;z-index:0;pointer-events:none;background:url('heropopup/hero_frame.webp') center/100% 100% no-repeat;
  -webkit-mask-image:radial-gradient(ellipse 49% 14.6% at 50% 83%,#000 80%,transparent 100%);
  mask-image:radial-gradient(ellipse 49% 14.6% at 50% 83%,#000 80%,transparent 100%)}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-hc-3d .m-char-preview{z-index:1}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statstitle{white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw}
/* THE LONG PLANK FOR HIS NAME (Roman, 2026-11-19, a Russian "BRAVE TIGER 71 · УР 38" ran over the leaves: "the frame with
   the long title"): the nine-slice wears shop_frame_wide.webp (the same size and slices, the board 215..907 px of 1122 =
   18.6..78.4cqw of this 97cqw panel), the name takes that board, and hero-main.js _ptFitPeekTitle shrinks a longer one. */
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats #m-chcard-panel-stats::before{
  border-image-source:url('heropopup/shop/shop_frame_wide.webp')}
html.hb-portrait-peek #m-chcard.peek .m-chcard-inner.skinned.m-pt-stats .m-pt-statstitle{left:calc(20 * var(--hbcq-w));left:20cqw;right:calc(20 * var(--hbcq-w));right:20cqw;
  display:flex;align-items:center;justify-content:center;height:calc(6.4 * var(--hbcq-w));height:6.4cqw}
/* the name gives way (…) before the level ever does: a 20-letter name at the smallest size keeps "· Lv 50" */
html.hb-portrait-peek #m-chcard.peek .m-pt-statstitle .m-pt-pkname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.hb-portrait-peek #m-chcard.peek .m-pt-statstitle .m-pt-pklv{flex:none;white-space:pre}

/* 19. THE ARENA WINDOW UPRIGHT (2026-10-25, an Arena player: "the Arena's popup is made for landscape"). §15's frame
   (shop_frame nine-sliced), taller still and nearly the full width — the backdrop's 16 px gutter is 8 px here. Roman,
   on the first picture: no 3D hero ("delete the 3D hero"; arena.js does not mount him upright), bigger. Landscape's
   columns (popups.css .m-arena-*) are restacked with no change to the markup — the middle column dissolves
   (display:contents) into one grid: the points, ENTER, the four ways to score two by two, the week's blessings and the
   clock that changes them. No Wall of Fame since 2026-11-07 (Roman: "if the points are spent, an Arena leaderboard means
   nothing") — the space it took is the score's and the ways to score's. Every size is restated in cqw of this box. */
/* THE ARENA MERCHANT UPRIGHT (2026-11-13 — the leading player, on the phone: the merchant's shop was the sideways box, four
   cards a row, its words cut off): the Arena window's tall frame (the shop's leaf border, as #arena-modal), the balance under the
   title, the shelves two cards a row, every size restated in cqw of this box. Landscape is untouched. */
html.hb-portrait-peek #arena-shop-modal{padding:8px}
html.hb-portrait-peek #arena-shop-modal .m-arena-land{aspect-ratio:auto;width:min(98vw,calc(93vh*0.62));height:93vh;background:none;
  isolation:isolate;box-shadow:none}
html.hb-portrait-peek #arena-shop-modal .m-arena-land::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}
html.hb-portrait-peek #arena-shop-modal .m-arena-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw;right:calc(-0.475 * var(--hbcq-w));right:-0.475cqw;width:calc(12 * var(--hbcq-w));width:12cqw}
html.hb-portrait-peek #arena-shop-modal .m-ashop-bal{top:calc(17 * var(--hbcq-w));top:17cqw;left:0;right:0;justify-content:center;font-size:calc(5.6 * var(--hbcq-w));font-size:5.6cqw;gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw}
html.hb-portrait-peek #arena-shop-modal .m-ashop-bal img{width:calc(7 * var(--hbcq-w));width:7cqw}
html.hb-portrait-peek #arena-shop-modal .m-ashop-body{left:calc(6.5 * var(--hbcq-w));left:6.5cqw;right:calc(6.5 * var(--hbcq-w));right:6.5cqw;top:calc(28 * var(--hbcq-w));top:28cqw;bottom:calc(11 * var(--hbcq-w));bottom:11cqw;padding-right:calc(1 * var(--hbcq-w));padding-right:1cqw}
html.hb-portrait-peek #arena-shop-modal .m-ashop-head{font-size:calc(4.6 * var(--hbcq-w));font-size:4.6cqw;margin:calc(3.2 * var(--hbcq-w)) 0 calc(2 * var(--hbcq-w));margin:3.2cqw 0 2cqw}
html.hb-portrait-peek #arena-shop-modal .m-ashop-head small{font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw;margin-left:calc(1.6 * var(--hbcq-w));margin-left:1.6cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-cards{grid-template-columns:repeat(2,1fr);gap:calc(3 * var(--hbcq-w));gap:3cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card{padding:calc(2.8 * var(--hbcq-w)) calc(2 * var(--hbcq-w));padding:2.8cqw 2cqw;gap:calc(1.4 * var(--hbcq-w));gap:1.4cqw;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card img.ic{width:calc(20 * var(--hbcq-w));width:20cqw;height:calc(20 * var(--hbcq-w));height:20cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card .nm{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card .lv{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card .set{font-size:calc(3.1 * var(--hbcq-w));font-size:3.1cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card button{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card button.ashop-buy{gap:calc(1.2 * var(--hbcq-w));gap:1.2cqw}
html.hb-portrait-peek #arena-shop-modal .m-arena-card button.ashop-buy img{width:calc(4.6 * var(--hbcq-w));width:4.6cqw}
/* THE ARENA CHAT UPRIGHT (2026-11-13): the Arena window's tall frame (the shop's leaf border), everything restated in cqw of it. */
html.hb-portrait-peek #chat-modal{padding:8px}
html.hb-portrait-peek #chat-modal .m-chat-land{aspect-ratio:auto;width:min(98vw,calc(93vh*0.62));height:93vh;background:none;
  isolation:isolate;box-shadow:none}
html.hb-portrait-peek #chat-modal .m-chat-land::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}
html.hb-portrait-peek #chat-modal .m-arena-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw;right:calc(-0.475 * var(--hbcq-w));right:-0.475cqw;width:calc(12 * var(--hbcq-w));width:12cqw}
html.hb-portrait-peek #chat-modal .m-chat-tabs{top:calc(15.6 * var(--hbcq-w));top:15.6cqw;gap:calc(3 * var(--hbcq-w));gap:3cqw}
html.hb-portrait-peek #chat-modal .m-chat-tabs .m-lb-tab{flex:none;width:calc(25 * var(--hbcq-w));width:25cqw;max-width:none;font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek #chat-modal .m-chat-list{left:calc(6.5 * var(--hbcq-w));left:6.5cqw;right:calc(6.5 * var(--hbcq-w));right:6.5cqw;top:calc(26 * var(--hbcq-w));top:26cqw;bottom:calc(27 * var(--hbcq-w));bottom:27cqw;gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek #chat-modal .m-chat-row{padding:calc(2 * var(--hbcq-w)) calc(2.4 * var(--hbcq-w));padding:2cqw 2.4cqw;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw;border-radius:calc(2.4 * var(--hbcq-w));border-radius:2.4cqw}
html.hb-portrait-peek #chat-modal .m-chat-badge{width:calc(9.4 * var(--hbcq-w));width:9.4cqw;height:calc(9.4 * var(--hbcq-w));height:9.4cqw;font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw}
html.hb-portrait-peek #chat-modal .m-chat-name{font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw}
html.hb-portrait-peek #chat-modal .m-chat-time{font-size:calc(3 * var(--hbcq-w));font-size:3cqw}
html.hb-portrait-peek #chat-modal .m-chat-text{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek #chat-modal .m-chat-empty{font-size:calc(4 * var(--hbcq-w));font-size:4cqw}
html.hb-portrait-peek #chat-modal .m-chat-blocked-link{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek #chat-modal .m-chat-mini{width:calc(26 * var(--hbcq-w));width:26cqw;font-size:calc(3.2 * var(--hbcq-w));font-size:3.2cqw}
html.hb-portrait-peek #chat-modal .m-chat-bar{left:calc(6.5 * var(--hbcq-w));left:6.5cqw;right:calc(6.5 * var(--hbcq-w));right:6.5cqw;bottom:calc(13.6 * var(--hbcq-w));bottom:13.6cqw;height:calc(11.4 * var(--hbcq-w));height:11.4cqw;gap:calc(2.4 * var(--hbcq-w));gap:2.4cqw}
html.hb-portrait-peek #chat-modal .m-chat-input{font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw;padding:0 calc(3 * var(--hbcq-w));padding:0 3cqw;border-radius:calc(2.6 * var(--hbcq-w));border-radius:2.6cqw}
html.hb-portrait-peek #chat-modal .m-chat-send{font-size:calc(3.8 * var(--hbcq-w));font-size:3.8cqw}
html.hb-portrait-peek #chat-modal .m-chat-foot{left:calc(6.5 * var(--hbcq-w));left:6.5cqw;right:calc(41 * var(--hbcq-w));right:41cqw;bottom:calc(25.4 * var(--hbcq-w));bottom:25.4cqw;font-size:calc(3 * var(--hbcq-w));font-size:3cqw;line-height:1.15;text-align:left;min-height:0}
/* THE CHAT AFTER ROMAN'S TEST OF DEV 868 (2026-11-13): "the Global / Nearby buttons are huge and stick out", "Send at the bottom and
   the typing line lower, the 'Players around you…' part lower", "on Nearby a third of the window — I need to see my hero".
   Smaller tabs inside the frame; the typing line + SEND on the frame's bottom border; the hint (and any refusal) right above
   the typing line, beside SEND's leaves; NEARBY docks to the bottom 40% with the game visible above it (a tap there closes);
   while TYPING the window sits at the TOP — the phone's keyboard covers the page without resizing it (hero-main.js §create). */
html.hb-portrait-peek #chat-modal.m-chat-near .m-chat-list,html.hb-portrait-peek #chat-modal.m-chat-said .m-chat-list{bottom:calc(33 * var(--hbcq-w));bottom:33cqw}
html.hb-portrait-peek #chat-modal.m-chat-near{background:transparent;align-items:flex-end}
html.hb-portrait-peek #chat-modal.m-chat-near .m-chat-land{height:40vh}
html.hb-portrait-peek #chat-modal.m-chat-typing{align-items:flex-start}
html.hb-portrait-peek #chat-modal.m-chat-typing .m-chat-land{height:52vh}
html.hb-portrait-peek #chat-modal.m-chat-near.m-chat-typing .m-chat-land{height:40vh}
html.hb-portrait-peek #arena-modal{padding:8px}
html.hb-portrait-peek #arena-modal .m-arena-land{aspect-ratio:auto;width:min(98vw,calc(93vh*0.62));height:93vh;background:none;
  isolation:isolate;box-shadow:none}
html.hb-portrait-peek #arena-modal .m-arena-land::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}
html.hb-portrait-peek #arena-modal .m-arena-close{top:calc(-0.475 * var(--hbcq-w));top:-0.475cqw;right:calc(-0.475 * var(--hbcq-w));right:-0.475cqw;width:calc(12 * var(--hbcq-w));width:12cqw}
html.hb-portrait-peek #arena-modal .m-arena-cols{left:calc(6.5 * var(--hbcq-w));left:6.5cqw;right:calc(6.5 * var(--hbcq-w));right:6.5cqw;top:calc(18 * var(--hbcq-w));top:18cqw;bottom:calc(10.5 * var(--hbcq-w));bottom:10.5cqw;
  grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto auto;gap:calc(4.2 * var(--hbcq-w));gap:4.2cqw;align-content:center;
  grid-template-areas:"score" "enter" "how" "bless" "reset"}
html.hb-portrait-peek #arena-modal .m-arena-left{display:none}
html.hb-portrait-peek #arena-modal .m-arena-mid{display:contents}
html.hb-portrait-peek #arena-modal .m-arena-score{grid-area:score;justify-content:center;gap:calc(3.4 * var(--hbcq-w));gap:3.4cqw;margin:0}
html.hb-portrait-peek #arena-modal .m-arena-helmet{width:calc(21 * var(--hbcq-w));width:21cqw}
html.hb-portrait-peek #arena-modal .m-arena-pts{font-size:calc(13 * var(--hbcq-w));font-size:13cqw}
html.hb-portrait-peek #arena-modal .m-arena-ptslbl{font-size:calc(5 * var(--hbcq-w));font-size:5cqw}
html.hb-portrait-peek #arena-modal .m-arena-hint{font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;margin-top:calc(1 * var(--hbcq-w));margin-top:1cqw}
html.hb-portrait-peek #arena-modal .m-arena-enter{grid-area:enter;justify-self:center;width:76%;font-size:calc(5.8 * var(--hbcq-w));font-size:5.8cqw}
html.hb-portrait-peek #arena-modal .m-arena-how{grid-area:how;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:calc(2 * var(--hbcq-w));gap:2cqw}
html.hb-portrait-peek #arena-modal .m-arena-howrow{gap:calc(1.6 * var(--hbcq-w));gap:1.6cqw;padding:calc(2.2 * var(--hbcq-w)) calc(1.8 * var(--hbcq-w));padding:2.2cqw 1.8cqw;border-radius:calc(2 * var(--hbcq-w));border-radius:2cqw}
html.hb-portrait-peek #arena-modal .m-arena-howrow img{width:calc(8.4 * var(--hbcq-w));width:8.4cqw;height:calc(8.4 * var(--hbcq-w));height:8.4cqw}
html.hb-portrait-peek #arena-modal .m-arena-howrow .lbl{font-size:calc(3.4 * var(--hbcq-w));font-size:3.4cqw}
html.hb-portrait-peek #arena-modal .m-arena-howrow .val{font-size:calc(4.2 * var(--hbcq-w));font-size:4.2cqw}
html.hb-portrait-peek #arena-modal .m-arena-bless{grid-area:bless;font-size:calc(3.7 * var(--hbcq-w));font-size:3.7cqw;padding:0 calc(2 * var(--hbcq-w));padding:0 2cqw}
html.hb-portrait-peek #arena-modal .m-arena-reset{grid-area:reset;font-size:calc(3.6 * var(--hbcq-w));font-size:3.6cqw;margin-top:calc(-2 * var(--hbcq-w));margin-top:-2cqw}

/* ── SET COMPLETE! (Roman, 2026-10-27: "it isn't clear what happened, a super long popup comes out — just pop SET
   COMPLETE, that's it, without all the explanations"). hero-main.js _setDoneBanner: big gold letters that pop in over
   the middle and fade by themselves; no window, no bonus text (the bag's set bar says the bonus). Upright only. */
html.hb-portrait-peek .m-setdone{position:fixed;left:0;right:0;top:36%;z-index:100002;display:flex;justify-content:center;
  pointer-events:none;padding:5vw 0;background:radial-gradient(ellipse 60% 50% at 50% 50%,rgba(10,6,24,.62),rgba(10,6,24,0) 72%);
  animation:mSetIn .38s cubic-bezier(.2,1.7,.4,1) both}
html.hb-portrait-peek .m-setdone span{display:block;max-width:92vw;text-align:center;font-family:'Cinzel',serif;font-weight:900;
  font-size:9.5vw;line-height:1.08;letter-spacing:.03em;color:#ffd24a;
  background:linear-gradient(180deg,#fff6c4 0%,#ffd24a 48%,#e88f14 100%);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;filter:drop-shadow(0 .7vw 0 #5b2a00) drop-shadow(0 0 3vw rgba(255,196,60,.6))}
html.hb-portrait-peek .m-setdone.out{animation:mSetOut .5s ease-in both}
@keyframes mSetIn{from{transform:scale(.25);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes mSetOut{from{transform:scale(1);opacity:1}to{transform:translateY(-5vw) scale(1.06);opacity:0}}

/* ══ THE LOCK UPRIGHT — the picture is popups.css "THE LOCK — ONE PICTURE, BOTH LAYOUTS" (Roman, 2026-11-14); here only the
   upright rows that drew their own (the bag's / dragons' m-pti-ico, the Forge's m-ptf-lockico) and the upright sizes. ══ */
html.hb-portrait-peek .m-pti-ico.lock,
html.hb-portrait-peek .m-ptf-lockico{background:url('lock_navy.webp') center/contain no-repeat;border-radius:0;box-shadow:none;
  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))}
html.hb-portrait-peek #quest2-modal .m-sq-lock{width:calc(6.2 * var(--hbcq-w));width:6.2cqw;height:calc(6.2 * var(--hbcq-w));height:6.2cqw;top:calc(-1.6 * var(--hbcq-w));top:-1.6cqw;right:calc(-1.6 * var(--hbcq-w));right:-1.6cqw}
html.hb-portrait-peek .m-ev-lock{width:calc(3.8 * var(--hbcq-w));width:3.8cqw;height:calc(3.8 * var(--hbcq-w));height:3.8cqw;vertical-align:calc(-.7 * var(--hbcq-w));vertical-align:-.7cqw;margin-right:calc(.6 * var(--hbcq-w));margin-right:.6cqw}

/* ══ THE WINDOW TITLE — ONE RULE (Roman, 2026-11-14: "why is the title sometimes white, sometimes gold? SLIME ISLAND exactly
   in the middle is better — like that for all, but gold like the Battle Pass; we need theme rules — every new window can't be
   something different"). Measured that day: three sizes (4 / 5 / 5.6 / 6cqw), white in the quest log, and the 4cqw ones
   1.3cqw ABOVE the plank. Now every title on the leaf plank: Cinzel 900, gold #f0d78f, 5cqw, its text centred on the plank
   (shop_frame.webp's wood band 44-149 art px, centre 96 px = 8.14cqw from the frame's top — titleFit's PLANK_MID). The flow
   height is untouched (line-height 5.5cqw = the old 4cqw line), so nothing under a title moved; `top` moves only the text.
   A title too wide for the plank's board (42cqw) 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. ══ */
html.hb-portrait-peek .m-settings-land .m-settings-title,
html.hb-portrait-peek #store-modal .m-store-title,
html.hb-portrait-peek .m-arena-land .m-arena-title,
html.hb-portrait-peek #quest2-modal .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}
html.hb-portrait-peek .m-settings-land .m-settings-title,
html.hb-portrait-peek #store-modal .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}
html.hb-portrait-peek #lb-modal .m-lb-land .m-settings-title{height:calc(10.9 * var(--hbcq-w));height:10.9cqw;box-sizing:border-box}   /* its old flow height (5cqw at line-height normal) */
html.hb-portrait-peek .m-arena-land .m-arena-title{top:calc(5.39 * var(--hbcq-w));top:5.39cqw;line-height:calc(5.5 * var(--hbcq-w));line-height:5.5cqw;white-space:nowrap}

/* THE SIDE QUESTS TAB (Roman, 2026-11-14: "SIDE QUEST goes out of its button — a bit smaller, and less space between the
   words"): its two lines a size under the other tabs, set tight, inside the button art. */
html.hb-portrait-peek #quest2-modal .m-quest2-navbtn[data-tab="side"]{font-size:calc(3.9 * var(--hbcq-w));font-size:3.9cqw;line-height:.96;letter-spacing:.01em;
  word-spacing:-.12em;padding:0 calc(1.8 * var(--hbcq-w));padding:0 1.8cqw}
