@import url("screens.css");   /* wave 5b: the inner screens (sc-/fs-/sp-/qs-/bd-/pf-) */
/* Main menu (client/menu): the #lobby box, its palette and the few shared bits; the shell and home (wave 5a) below,
   the inner screens (wave 5b) in screens.css. The old menu (wave 5 of task 02) was removed in UI wave 6. */
/* the menu's own palette stays on menu elements; :root belongs to client/ui/kit.css */
:where(.mn,[class^="mn-"],[class*=" mn-"]){--ink:#1d1b26;--cream:#fff7e6;--paper:#fffdf4;--lime:#ddff65;--gold:#ffc93c;--coral:#ff5a4f;--cyan:#7fd8ff;--teal:#14606b;--grass:#7ee05a}
.mn{position:fixed;inset:0;z-index:20;color:var(--ink);overflow:hidden;
  background:radial-gradient(130% 70% at 50% -10%,#4d6390 0%,#2a3554 42%,#161b29 100%)}
.mn::before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:radial-gradient(circle at 12% 18%,#ffc93c33 0 3px,transparent 4px),radial-gradient(circle at 78% 12%,#7fd8ff33 0 4px,transparent 5px),
  radial-gradient(circle at 88% 64%,#ff5a4f2a 0 3px,transparent 4px),radial-gradient(circle at 22% 78%,#ddff6526 0 5px,transparent 6px);background-size:260px 260px}
#mn-root{position:absolute;inset:0;display:flex;flex-direction:column}
.mn input,.mn select{user-select:text;-webkit-user-select:text;font:700 16px var(--f-text)}

/* ---------- shared bits ---------- */
.mn-note{margin:6px 2px;font:600 12px/1.35 var(--f-text);color:#ffffffb8}

.mn-empty{padding:18px 12px;text-align:center;font:700 13px/1.4 var(--f-text);color:#ffffffc0}

/* =====================================================================================================================
   Wave 5a of the UI rework: the new menu shell and the home screen (direction B «Стикер»; client/menu/index.js,
   home.js, dock.js; mockup /lab/ui-concept/home.html?dir=b). #lobby gets .mn-b.
   Classes: mb-* (shell), hm-* (home); mn-* carry the menu palette (the :where rule at the top).
   ===================================================================================================================== */
@property --rx{syntax:'<length>';inherits:true;initial-value:195px}
@property --ry{syntax:'<length>';inherits:true;initial-value:350px}
.mn.mn-b{--cream:#fff4dc;--paper:#fffbf0;--grass:#6bd66b;background:var(--ink);color:var(--ink)}
.mn.mn-b::before{display:none}
.mn-b button{font-family:inherit}

/* brand background: sunburst rays centred behind the fighter (--rx/--ry from index.js aimRays), halftone dots, glow */
.mb-bg{position:absolute;inset:0;overflow:hidden;pointer-events:none;background:#ff7550;transition:--rx var(--t-slow) var(--ease-out),--ry var(--t-slow) var(--ease-out)}
.mb-rays{position:absolute;left:var(--rx);top:var(--ry);width:300vmax;height:300vmax;translate:-50% -50%;
  background:repeating-conic-gradient(from 0deg,#ff6a4f 0 7.5deg,#ff8250 7.5deg 15deg)}
.mb-dots{position:absolute;inset:0;opacity:.22;background-image:radial-gradient(#7a1d18 1.6px,transparent 1.8px);background-size:11px 11px;
  -webkit-mask:radial-gradient(70% 60% at var(--rx) var(--ry),transparent 30%,#000 90%);mask:radial-gradient(70% 60% at var(--rx) var(--ry),transparent 30%,#000 90%)}
.mb-glow{position:absolute;inset:0;background:radial-gradient(min(62vw,560px) min(46vh,420px) at var(--rx) var(--ry),#ffd25a 0%,#ffb03a55 40%,transparent 70%),linear-gradient(transparent 72%,#00000040)}

/* ---------- top bar: me (avatar + level + XP / «Войти»), section tabs (landscape, desktop), bumbaxes ---------- */
.mb-topbar{position:relative;z-index:4;display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l))}
.mb-me{display:flex;align-items:center;gap:13px;min-width:0;flex:1 1 auto;padding:4px 0 4px 3px;background:none;border:0;color:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.mb-ava{background-color:var(--sun)}
/* the profile is on screen: the avatar is «where you are» (sun, like the lit dock item; no dock item is lit then) */
.mb-me.on .mb-ava{box-shadow:0 0 0 var(--rim) var(--sun),4px 5px 0 var(--rim) var(--ink)}
.mb-ava.face{background-size:170%;background-position:50% 12%}
.mb-me .who{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.mb-me .nick{max-width:100%;padding:0 4px 2px 1px;font:900 17px/1.1 var(--f-text);color:#fff;-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;text-shadow:2px 3px 0 var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-xpbar{width:120px;height:12px;border-width:2.5px}
.mb-xpbar[hidden],.mb-login[hidden],.mb-money[hidden]{display:none}
.mb-login{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 11px 0 8px;border-radius:999px;background:var(--sky);color:var(--ink);border:2.5px solid var(--ink);
  box-shadow:2px 2px 0 var(--ink),0 0 0 2px #fff;font:900 12px/1 var(--f-text)}
.mb-me:active .mb-login{translate:1px 1px}
.mb-money{flex:none;cursor:pointer;transition:transform var(--t-mid) var(--ease-pop)}
/* the menu's music: ♪ in the top bar, the track's name under it (client/menumusic.js) */
.mb-np{flex:none}
.mb-np[hidden],.mb-npt[hidden]{display:none}
.mb-np .k-g{font-size:19px}
.mb-npt{position:fixed;z-index:6;display:flex;align-items:center;gap:8px;max-width:min(340px,calc(100vw - 16px));padding:4px 4px 4px 12px;border-radius:var(--r-m);
  background:var(--ink);color:var(--paper);box-shadow:0 0 0 2.5px var(--rim-c),3px 3px 0 2.5px #0006;font:700 12.5px/1.2 var(--f-text)}
.mb-npt .nm{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-npt .mb-npx{width:30px;height:30px;font-size:15px;flex:none}
.mb-money:active{transform:translate(2px,2px) scale(.95)}
.mb-money b{font:inherit;min-width:2.2em;text-align:right}

/* ---------- sections: dock (phone upright) / tabs (landscape, desktop) ---------- */
.mb-dock{position:relative;z-index:4;display:flex;gap:2px;margin:0 calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l));padding:6px 5px 6px;
  border-radius:20px;background:var(--ink);border:var(--ow) solid var(--ink);box-shadow:0 0 0 4px #fff,6px 7px 0 4px var(--ink)}
.mb-nav-i{position:relative;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;font-synthesis:none}
.mb-dock .mb-nav-i{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;padding:3px 0 5px;border-radius:var(--r-l);color:#fff;
  font:900 11px/1 var(--f-text);letter-spacing:.2px;text-transform:uppercase;transition:background var(--t-fast),color var(--t-fast)}
.mb-dock .mb-nav-i img{width:44px;height:44px;object-fit:contain;margin-top:-20px;filter:drop-shadow(0 3px 0 #0006);transition:scale var(--t-mid) var(--ease-pop)}
.mb-dock .mb-nav-i span{max-width:calc(100% - 8px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mb-dock .mb-nav-i.on{background:var(--sun);color:var(--ink);transform:skewX(var(--skew));animation:k-tab-on var(--t-slow) var(--ease-pop)}
.mb-dock .mb-nav-i.on img{scale:1.14}
.mb-dock .mb-nav-i:active img{scale:.9}
/* the badge sits on the icon's top-right corner (not over the picture), small: the dock's items are ~70 px wide */
.mb-dock .k-badge{top:-21px;right:auto;left:calc(50% + 7px);min-width:20px;height:20px;padding:0 5px;font-size:10px;line-height:15px}
.mb-dock .k-badge.dot{top:-15px;left:calc(50% + 13px);min-width:14px;width:14px;height:14px;padding:0}
.mb-tabs{display:none;gap:4px;padding:5px;margin:0 auto;border-radius:var(--r-l);background:var(--ink);box-shadow:0 0 0 3px #fff,4px 5px 0 3px var(--ink)}
.mb-tabs .mb-nav-i{display:flex;align-items:center;gap:6px;height:42px;padding:0 14px 0 8px;border-radius:var(--r-m);color:#ffffffd0;font:900 13px/1 var(--f-display);text-transform:uppercase;white-space:nowrap;
  transition:background var(--t-fast),color var(--t-fast)}
.mb-tabs .mb-nav-i img{width:32px;height:32px;margin:-6px 0;object-fit:contain;transition:scale var(--t-mid) var(--ease-pop)}
.mb-tabs .mb-nav-i.on{background:var(--sun);color:var(--ink);transform:skewX(var(--skew));animation:k-tab-on var(--t-slow) var(--ease-pop)}
.mb-tabs .mb-nav-i:not(.on):hover{color:#fff;background:#ffffff14}
.mb-tabs .k-badge{top:-10px;right:-6px}
.mb-hop{animation:mb-hop var(--t-mid) var(--ease-pop)}
.mb-badge-jump{animation:mb-badge-jump var(--t-slow) var(--ease-pop)}
@keyframes mb-hop{50%{translate:0 -7px}}
@keyframes mb-badge-jump{0%{scale:1}30%{scale:1.45;translate:0 -6px}65%{scale:.9}100%{scale:1}}

/* ---------- screens and the slide between them ---------- */
.mb-screens{position:relative;z-index:2;flex:1;min-height:0}
.mb-view{position:absolute;inset:0;display:flex;flex-direction:column;z-index:1}
.mb-view.mb-leave{z-index:0;pointer-events:none}
.mb-enter[data-dir=r]{animation:mb-in-r var(--t-slow) var(--ease-pop) both}
.mb-enter[data-dir=l]{animation:mb-in-l var(--t-slow) var(--ease-pop) both}
.mb-leave[data-dir=r]{animation:mb-out-l var(--t-mid) var(--ease-in) both}
.mb-leave[data-dir=l]{animation:mb-out-r var(--t-mid) var(--ease-in) both}
@keyframes mb-in-r{from{opacity:0;translate:56px 0}}
@keyframes mb-in-l{from{opacity:0;translate:-56px 0}}
@keyframes mb-out-l{to{opacity:0;translate:-40px 0}}
@keyframes mb-out-r{to{opacity:0;translate:40px 0}}
.mn-b .mb-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:none;
  padding:2px calc(14px + var(--safe-r)) 16px calc(14px + var(--safe-l))}
.mn-b .mb-scroll::-webkit-scrollbar{display:none}
/* scrolled: the content fades out under the top bar instead of being cut flat under the avatar / balance (index.js) */
.mn-b .mb-scrolled>.mb-scroll{-webkit-mask:linear-gradient(transparent,#000 22px);mask:linear-gradient(transparent,#000 22px)}
.mb-view.home .mb-scroll{display:flex;flex-direction:column;overflow:hidden;container:hmscreen / size}
.mb-shead{display:flex;align-items:center;gap:12px;margin:2px 0 12px}
.mb-shead h1{flex:1;min-width:0;margin:0;padding:2px 6px 6px 2px;font:900 clamp(17px,5.3vw,26px)/1.05 var(--f-display);text-transform:uppercase;color:#fff;-webkit-text-stroke:2px var(--ink);paint-order:stroke fill;
  text-shadow:4px 4px 0 var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- home: logo, podium, today's plates, play ---------- */
.hm-home{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"logo" "hero" "side";gap:10px}
.hm-logo{grid-area:logo;position:relative;z-index:4;justify-self:center;width:clamp(200px,min(78vw,17vh * 2.32),340px);aspect-ratio:1064/458;margin:14px 0 -26px;padding:0;
  background:none;border:0;cursor:pointer;isolation:isolate;rotate:-4deg;-webkit-tap-highlight-color:transparent}
.hm-logo img{display:block;pointer-events:none;user-select:none;-webkit-user-select:none}
.hm-logo .word{width:100%;height:100%;filter:drop-shadow(4px 6px 0 #1d1b2655)}
.hm-logo .burst{position:absolute;left:50%;top:50%;z-index:-1;width:118%;aspect-ratio:1064/731;translate:-50% -50%;opacity:0}
.hm-logo .bomb{position:absolute;right:-4%;top:-16%;width:17%;transform:rotate(18deg);transform-origin:50% 75%;filter:drop-shadow(2px 3px 0 #1d1b2666)}
.hm-logo.intro .bomb,.hm-logo.intro .word{will-change:transform}
.hm-logo.idle{animation:hm-float 2.4s ease-in-out infinite}
.hm-logo.idle .bomb{animation:hm-fuse .5s ease-in-out infinite alternate}
.hm-logo .bomb.hm-bomb-hop{animation:hm-bomb-hop .32s var(--ease-pop)}
@keyframes hm-float{50%{translate:0 -4px}}
@keyframes hm-fuse{from{rotate:-8deg}to{rotate:8deg}}
@keyframes hm-bomb-hop{40%{translate:0 -10px}}

.hm-hero{grid-area:hero;position:relative;min-height:150px}
.hm-stage{position:absolute;inset:0}
.hm-stage canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;touch-action:pan-y;cursor:grab}
.hm-podium{position:absolute;left:50%;top:var(--foot,90%);width:min(64%,250px);aspect-ratio:240/60;translate:-50% -42%;border-radius:50%;
  background:radial-gradient(60% 60% at 50% 40%,var(--ink-3),var(--ink));box-shadow:0 0 0 5px #fff,0 10px 0 5px var(--ink),0 22px 30px #0006}
.hm-podium::before{content:'';position:absolute;inset:16% 14%;border-radius:50%;border:3px dashed #ffffff30}
.hm-arrow{position:absolute;top:48%;z-index:3;translate:0 -50%}
.hm-arrow.l{left:0} .hm-arrow.r{right:0}
.hm-fname{position:absolute;left:50%;bottom:0;z-index:3;translate:-50% 0;display:flex;align-items:center;gap:10px;max-width:100%}
.hm-fname .nm{display:block;min-width:0;max-width:min(66vw,300px);padding:7px 14px 8px;border-radius:12px;background:#fff;color:var(--ink);border:3px solid var(--ink);rotate:-3deg;
  box-shadow:4px 4px 0 var(--ink);font:900 15px/1.05 var(--f-display);text-transform:uppercase;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;
  transition:transform var(--t-mid) var(--ease-pop)}
.hm-fname .nm:active{transform:translate(2px,2px)}
.hm-fname .nm small{display:block;margin-top:3px;font:800 11px/1.1 var(--f-text);text-transform:none;color:var(--coral-ink);overflow:hidden;text-overflow:ellipsis}

.hm-today{grid-area:hero;align-self:start;z-index:4;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding-top:24px;pointer-events:none}
/* two tilted plates in a column: the gap covers the upper one's shadow (4) + the lower one's rim (3) + the tilt (~4) */
.hm-today .l,.hm-today .r{display:flex;flex-direction:column;gap:15px;min-width:0}
.hm-today .r{align-items:flex-end}
.hm-chip{--hit-x:0px;--hit-y:6px;--hit-bw:2.5px;position:relative;pointer-events:auto;box-sizing:border-box;display:flex;align-items:center;gap:8px;max-width:min(45vw,180px);padding:6px 10px 6px 6px;border-radius:var(--r-m);background:var(--cream);
  color:var(--ink);border:2.5px solid var(--ink);box-shadow:4px 4px 0 var(--ink),0 0 0 3px #fff;font:900 12px/1.1 var(--f-text);text-align:left;rotate:-3deg;
  transition:transform var(--t-mid) var(--ease-pop),box-shadow var(--t-mid) var(--ease-pop)}
button.hm-chip{cursor:pointer}
button.hm-chip:active{transform:translate(3px,3px);box-shadow:1px 1px 0 var(--ink),0 0 0 3px #fff;transition-duration:var(--t-press)}
.hm-today .r .hm-chip{rotate:3deg}
.hm-chip>img,.hm-flame,.hm-gift{position:relative;width:34px;height:34px;flex:none;margin:-4px 0;object-fit:contain}
.hm-chip .tx{min-width:0}
.hm-chip b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-chip small{display:block;margin-top:1px;font:800 10.5px/1.15 var(--f-text);color:#1d1b26a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-chip small .k-coin{width:1.1em;height:1.1em}
.hm-chip .k-bar{width:84px;height:10px;margin-top:4px;border-width:2px}
.hm-chip.sale{background:var(--coral-d);color:#fff}   /* white text under 18 px: the dark coral (4.6:1), not the bright one (3.1:1) */
.hm-chip.sale small{color:#fff}
.hm-chip.quests.all{background:var(--lime)}
/* shop-today: the flame flickers 1→2→1→3 (140 ms) and swells; ui-gift: sways (art/ui/icons/animation.md) */
.hm-flame{animation:hm-swell 1.2s ease-in-out infinite}
.hm-flame img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0}
.hm-flame img:nth-child(1){opacity:1;animation:hm-fl1 .56s step-end infinite}
.hm-flame img:nth-child(2){animation:hm-fl2 .56s step-end infinite}
.hm-flame img:nth-child(3){animation:hm-fl3 .56s step-end infinite}
@keyframes hm-fl1{0%{opacity:1}25%{opacity:0}50%{opacity:1}75%{opacity:0}}
@keyframes hm-fl2{0%{opacity:0}25%{opacity:1}50%{opacity:0}}
@keyframes hm-fl3{0%{opacity:0}75%{opacity:1}}
@keyframes hm-swell{50%{scale:1.04}}
.hm-gift img{width:100%;height:100%;object-fit:contain;animation:hm-gift 1.8s ease-in-out infinite}
@keyframes hm-gift{0%,100%{translate:0 0;rotate:-3deg}50%{translate:0 -3px;rotate:3deg}}

.hm-side{grid-area:side;position:relative;z-index:3;display:flex;flex-direction:column;gap:12px;padding-top:4px}
.hm-play{width:100%;min-height:84px;font-size:40px;letter-spacing:-.5px}
.hm-play small{font-size:13px;letter-spacing:0}
.hm-play small b{font-family:var(--f-display)}
.hm-online{display:inline-flex;align-items:center;gap:5px}
.hm-online i{width:9px;height:9px;border-radius:50%;background:var(--grass-d);box-shadow:0 0 0 2px #1d1b2630;animation:k-blink 1.6s infinite}
.hm-modes{display:flex;gap:10px}
.hm-modes .k-btn{flex:1 1 0;min-width:0;flex-direction:column;gap:3px;min-height:64px;padding:6px 4px 8px;font-size:13px}
.hm-modes .k-btn img{width:32px;height:32px;object-fit:contain;pointer-events:none}
.hm-punch{animation:hm-punch .12s ease-in-out 2 alternate}
@keyframes hm-punch{to{translate:3px 0;rotate:4deg}}
.hm-note{font:700 12px var(--f-text);color:#fff;text-align:center;text-shadow:0 1px 0 #0008}
/* the menu's sheet titles shrink a little on a narrow phone: «Комната по коду» stays on one line at 360 px */
.mn-b .k-sheet-h h2{font-size:clamp(18px,5.6vw,22px)}
/* «По коду»: the sheet with the code field */
.mn-b .hm-codein{display:block;box-sizing:border-box;width:100%;margin:12px 0 16px;padding:12px 14px;border-radius:var(--r-m);border:var(--ow) solid var(--ink);background:var(--paper);color:var(--ink);
  font:900 30px/1 var(--f-display);letter-spacing:6px;text-transform:uppercase;text-align:center;box-shadow:inset 0 3px 0 #0000001a;outline:none}
.mn-b .hm-codein:focus{box-shadow:inset 0 3px 0 #0000001a,0 0 0 3px var(--lime)}
.mn-b .hm-codein::placeholder{color:#1d1b2640}

/* landscape and desktop: the tabs go up, the dock goes away */
@media (orientation:landscape){
  .mb-dock{display:none}
  .mb-tabs{display:flex}
  .mb-me{flex:0 1 auto}
}
/* desktop: today | podium | play (three columns) */
@media (orientation:landscape) and (min-width:1000px){
  .hm-home{grid-template-columns:minmax(250px,300px) minmax(0,1fr) minmax(320px,420px);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"logo hero side" "today hero side";column-gap:24px;row-gap:22px}
  .hm-logo{justify-self:start;width:min(300px,100%);margin:10px 0 0 6px}
  .hm-today{grid-area:today;flex-direction:column;justify-content:flex-start;align-items:stretch;padding:0 8px 0 4px;gap:12px}
  .hm-today .l,.hm-today .r{display:contents}
  .hm-chip,.hm-today .r .hm-chip{max-width:none;padding:9px 12px 9px 8px;font-size:14px;rotate:-1.5deg}
  .hm-today .r .hm-chip:nth-child(odd){rotate:1.5deg}
  .hm-chip>img,.hm-flame,.hm-gift{width:44px;height:44px}
  .hm-chip small{font-size:12px}
  .hm-chip .k-bar{width:150px}
  /* the stickers' shadow (5 px) and the skew of a 112 px button (~6 px) fall to the right: the column leaves them room,
     so «Играть» lines up with the balance above it and keeps the same margin as the left column */
  .hm-side{justify-content:flex-end;gap:16px;padding:0 6px 16px 0}
  .hm-play{min-height:112px;font-size:52px}
  .hm-modes .k-btn{flex-direction:row;min-height:56px;font-size:14px;gap:6px}
  .hm-modes .k-btn img{width:34px;height:34px;margin:-8px -2px}
  .hm-podium{width:min(52%,300px)}
  .hm-fname .nm{font-size:17px}
}
/* phone lying down: podium | play column; the logo small over the podium's corner */
@media (orientation:landscape) and (max-width:999px){
  .mb-tabs .mb-nav-i span{display:none}
  .mb-tabs .mb-nav-i{padding:0 8px}
  .hm-home{grid-template-columns:minmax(0,1fr) min(340px,44vw);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"hero today" "hero side";column-gap:16px;row-gap:8px}
  .hm-logo{grid-area:hero;justify-self:start;align-self:start;width:min(150px,22vw);margin:14px 0 0 8px}
  .hm-today{grid-area:today;flex-direction:column;align-items:stretch;padding:2px 8px 0 4px;gap:7px}
  .hm-today .l,.hm-today .r{display:contents}
  .hm-chip,.hm-today .r .hm-chip{max-width:none;padding:4px 10px 4px 6px;rotate:-1deg}
  .hm-today .r .hm-chip:nth-child(odd){rotate:1deg}
  .hm-chip .k-bar{display:none}
  .hm-side{justify-content:flex-end;gap:9px;padding-bottom:6px}
  .hm-play{min-height:66px;font-size:30px;padding:8px 14px}
  .hm-play small{font-size:11.5px;margin-top:2px}
  .hm-modes{gap:9px}
  .hm-modes .k-btn{min-height:52px;font-size:11px;padding:4px 4px 6px;gap:2px}
  .hm-modes .k-btn img{width:26px;height:26px}
  .hm-arrow.l{left:4px}
  .hm-stage{bottom:26px}
  .hm-podium{width:min(46%,200px)}
}
@media (orientation:landscape) and (max-height:500px){
  .mb-topbar{padding-top:calc(6px + var(--safe-t));padding-bottom:4px}
  .mb-me .k-avatar{width:40px;height:40px}
  .mb-tabs .mb-nav-i{height:36px}
  .mb-shead h1{font-size:21px}
}
/* landscape with little height (Telegram fullscreen takes the top): fewer plates, then none — play always fits */
@container hmscreen (max-height:290px) and (orientation:landscape){
  .hm-chip.first,.hm-chip small{display:none}
  .hm-chip>img,.hm-flame,.hm-gift{width:26px;height:26px}
  .hm-play{min-height:56px;font-size:26px}
  .hm-modes .k-btn{min-height:46px;flex-direction:row;gap:5px}
  .hm-logo{width:min(120px,18vw)}
}
@container hmscreen (max-height:230px) and (orientation:landscape){
  .hm-today{display:none}
  .hm-play small{display:none}
}
/* toasts while the menu is open — one rule (UI polish): never over the main action (the play block, «Выбрать бойца»,
   the dock: the bottom upright, the right column lying down), the top bar (the balance a purchase has just changed) or a
   sheet. They sit in a lane right under the top bar (--mn-top-b: its bottom edge, index.js). Lying down / on desktop,
   when the right side is taken (the home screen's play column, a sheet's panel), the lane keeps to the free left part;
   upright an open sheet stops under the lane (it never covers the top bar, so the new balance stays in sight). */
html.mn-open .k-toasts{top:calc(var(--mn-top-b,72px) + 8px);bottom:auto}
@media (orientation:landscape){
  html.mn-open:has(.mb-view.home.mb-cur,.k-sheet:not([hidden])) .k-toasts{right:min(400px,44vw)}
}
@media (orientation:portrait){
  html.mn-open .k-sheet{max-height:calc(100% - var(--mn-top-b,72px) - 60px)}
}
/* the dock labels are in the text face everywhere (Unbounded does not fit «ТАБЛИЦЫ» into a 70 px item); plate subtitles on two lines */
@media (max-width:360px){ .mb-dock .mb-nav-i{font-size:10.5px;letter-spacing:0} }
@media (orientation:portrait){
  .hm-chip small{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}
/* little room for the home screen upright (short phones, Telegram fullscreen eats ~90 px on top): the podium keeps
   its space — a smaller logo, plates without subtitles, a lower play block (container: the home screen's own height) */
@container hmscreen (max-height:640px) and (orientation:portrait){
  .hm-logo{width:clamp(170px,32cqh * 1.25,260px);margin:14px 0 -20px}
  .hm-play{min-height:68px;font-size:34px}
  .hm-modes .k-btn{flex-direction:row;min-height:50px;font-size:12px;gap:5px}
  .hm-modes .k-btn img{width:28px;height:28px;margin:-6px -2px -6px -4px}
  .hm-today{padding-top:16px}
  .hm-chip{padding:4px 9px 4px 5px}
  .hm-chip>img,.hm-flame,.hm-gift{width:28px;height:28px}
  .hm-chip .k-bar{width:64px;height:8px;margin-top:3px}
}
@container hmscreen (max-height:560px) and (orientation:portrait){
  .hm-logo{width:170px}
  .hm-chip small,.hm-chip.first{display:none}
  .hm-side{gap:10px}
  .hm-play{min-height:60px;font-size:30px;padding:6px 14px}
  .hm-arrow{top:62%}
}

/* reduced motion: no slides, loops stand still (anim.js still() covers the JS side) */
@media (prefers-reduced-motion:reduce){
  .mb-view,.mb-nav-i.on,.hm-logo.idle,.hm-logo.idle .bomb,.hm-flame,.hm-flame img,.hm-gift img,.hm-online i{animation:none!important}
  .mb-bg{transition:none}
}
html.k-still :is(.mb-view,.mb-nav-i.on,.hm-logo.idle,.hm-logo.idle .bomb,.hm-flame,.hm-flame img,.hm-gift img,.hm-online i){animation:none!important}
html.k-still .mb-bg{transition:none}
