/* hud2.css (2026-11-28) — компоненты из hud.css (окна, джекпот-арт, удвоение, правила) + новая компоновка «как у наземного автомата» (в конце файла). */
/* Modern Game Technology — общий HUD провайдера в строгом стиле наземного автомата.
 * Тёмная панель, тонкие латунные рамки, цифры Oswald / Roboto Mono; табло джекпота — белые игральные карты на тёмных плашках с золотым кантом. */
:root {
  --mg-red: #a80c1e; --mg-wine: #2a050b; --mg-deep: #0b0204; --mg-gold: #d9b25a; --mg-gold2: #f1dca0; --mg-brass: #8c6b2c; --mg-line: rgba(217,178,90,.55);
  --mg-ui: "Oswald", "Inter", system-ui, sans-serif; --mg-title: "Oswald", "Inter", sans-serif; --mg-digit: "Roboto Mono", "Oswald", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--mg-deep); color: #eee; font-family: var(--mg-ui); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.mg-app { position: relative; z-index: 1; height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
button { font-family: inherit; }

/* оверлеи */
.mg-ov { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(6,1,2,.84); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.mg-ov.show { display: flex; }
.mg-card { position: relative; width: min(480px, 100%); max-height: 92vh; overflow: auto; padding: 24px 22px; border-radius: 6px; text-align: center;
  background: linear-gradient(180deg, #22080d, #0c0305); border: 1px solid var(--mg-gold); box-shadow: inset 0 0 0 4px rgba(0,0,0,.6), inset 0 0 0 5px rgba(217,178,90,.25), 0 30px 80px rgba(0,0,0,.7); animation: mgpop .25s ease; }
@keyframes mgpop { from { transform: scale(.94); opacity: 0; } }
.mg-card h2 { font: 600 24px var(--mg-title); letter-spacing: 3px; color: var(--mg-gold2); }
.mg-card h3 { font: 600 19px var(--mg-title); letter-spacing: 2px; color: var(--mg-gold2); margin-bottom: 12px; }
.mg-card .big { font: 500 60px/1.1 var(--mg-digit); color: #f6e2a4; margin: 8px 0; font-variant-numeric: tabular-nums; }
.mg-card p { font: 500 14px/1.5 var(--mg-ui); color: #cbbca4; margin: 6px 0 14px; }
.mg-cta { min-width: 180px; height: 48px; padding: 0 22px; border-radius: 4px; border: 1px solid #e0bf6a; cursor: pointer; color: #fff6dc; font: 600 17px var(--mg-title); letter-spacing: 2px;
  background: linear-gradient(180deg, #b8172a, #8a0c1c 50%, #5a0612); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 4px 10px rgba(0,0,0,.5); margin-top: 6px; }
.mg-cta.alt { background: linear-gradient(180deg, #2a2629, #141114); color: var(--mg-gold2); border-color: var(--mg-brass); }
.mg-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 4px; border: 1px solid var(--mg-line); background: rgba(0,0,0,.3); color: #ddd; cursor: pointer; }
.mg-tier { font: 600 clamp(32px, 5.5vw, 54px) var(--mg-title); letter-spacing: 6px; background: linear-gradient(180deg, #fbf0cc 0%, #d9b25a 55%, #9a7430 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.8)); }
.mg-tier.pop { animation: mgpop .3s ease; }
.mg-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.mg-pay .it { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 4px; background: rgba(0,0,0,.35); border: 1px solid rgba(217,178,90,.22); text-align: left; }
.mg-pay img { width: 52px; height: 52px; }
.mg-pay .t { font: 500 12px/1.45 var(--mg-ui); color: #cbbca4; } .mg-pay .t b { color: var(--mg-gold2); font-family: var(--mg-digit); font-weight: 500; }
.mg-rules { text-align: left; font: 500 13px/1.55 var(--mg-ui); color: #cbbca4; padding-left: 18px; } .mg-rules li { margin: 6px 0; }
.mg-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid rgba(217,178,90,.14); font: 500 15px var(--mg-ui); cursor: pointer; }
.switch { width: 44px; height: 24px; border-radius: 12px; background: #2a2226; border: 1px solid #3a3034; position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #cfc6b6; transition: left .2s; }
.switch.on { background: #6a5020; border-color: var(--mg-gold); } .switch.on::after { left: 22px; background: #f6e2a4; }
.mg-chips { display: flex; gap: 8px; justify-content: center; margin: 8px 0 12px; }
.mg-chips button { width: 56px; height: 42px; border-radius: 4px; border: 1px solid var(--mg-brass); background: #140a0c; color: #cbbca4; font: 500 16px var(--mg-digit); cursor: pointer; }
.mg-chips button.sel { background: linear-gradient(180deg, #4a3818, #241a0a); border-color: var(--mg-gold); color: #fff3cc; }
.mg-replay { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 20; display: none; padding: 6px 14px; border-radius: 4px; background: rgba(0,0,0,.8); border: 1px solid var(--mg-gold); font: 600 12px var(--mg-ui); color: var(--mg-gold2); }

/* игра карт джекпота: настоящие игральные карты, рубашка бордо с узором, 3D-переворот */
.mg-jpgame .mg-card { width: min(720px, 100%); }
.mg-jpsuits { display: flex; justify-content: center; gap: 10px; margin: 6px 0 14px; }
.mg-jpsuits div { min-width: 96px; padding: 6px 8px; border-radius: 4px; border: 1px solid rgba(217,178,90,.45); background: rgba(0,0,0,.4); transition: border-color .3s, box-shadow .3s; }
.mg-jpsuits i { display: inline-grid; place-items: center; width: 26px; height: 34px; border-radius: 3px; background: linear-gradient(160deg, #fff, #ece6da); font: 22px/1 "Times New Roman", Georgia, serif; font-style: normal; color: var(--c); }
.mg-jpsuits b { display: block; font: 500 13px var(--mg-digit); color: var(--mg-gold2); margin-top: 4px; }
.mg-jpsuits em { display: block; font: 500 12px var(--mg-ui); font-style: normal; color: #a8916a; letter-spacing: 3px; }
.mg-jpsuits div.win { border-color: #f1dca0; box-shadow: 0 0 16px rgba(217,178,90,.45); }
.mg-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; perspective: 1000px; }
.mg-cardx { aspect-ratio: 5 / 7; position: relative; cursor: pointer; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.4,.1,.3,1); }
.mg-cardx:not(.open):hover { transform: translateY(-3px); }
.mg-cardx.open { transform: rotateY(180deg); cursor: default; }
.mg-cardx > div { position: absolute; inset: 0; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mg-cardx .back { border: 4px solid #f3eee4; box-shadow: 0 5px 12px rgba(0,0,0,.6), inset 0 0 0 1px #6a0a16;
  background:
    radial-gradient(circle at 50% 50%, rgba(217,178,90,.22) 0 18%, transparent 19%),
    repeating-linear-gradient(45deg, rgba(255,220,200,.10) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-45deg, rgba(255,220,200,.10) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, #8a0f1f, #5a0712 60%, #3e040c); }
.mg-cardx .back::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(217,178,90,.6); border-radius: 3px; }
.mg-cardx .back span { position: relative; font: 600 13px var(--mg-title); color: var(--mg-gold2); letter-spacing: 2px; padding: 3px 7px; border: 1px solid rgba(217,178,90,.6); border-radius: 50%; background: #3e040c; }
.mg-cardx .face { transform: rotateY(180deg); background: linear-gradient(160deg, #ffffff, #efe9dd); border: 1px solid #c9c2b4; box-shadow: 0 5px 12px rgba(0,0,0,.6); color: var(--c); font-family: "Times New Roman", Georgia, serif; }
.mg-cardx .face i { font-style: normal; font-size: 52px; line-height: 1; }
.mg-cardx .face em { font-size: 17px; left: 6px; top: 6px; } .mg-cardx .face em.b { right: 6px; bottom: 6px; }
.mg-cardx.lit .face { box-shadow: 0 0 0 2px var(--mg-gold), 0 0 18px rgba(217,178,90,.6); }
.mg-cardx.dim { opacity: .45; }
.mg-bigcard { width: 86px; height: 120px; margin: 10px auto 4px; border-radius: 7px; background: linear-gradient(160deg, #fff, #ece6da); border: 1px solid #c9c2b4; box-shadow: 0 0 0 2px var(--mg-gold), 0 10px 24px rgba(0,0,0,.6); display: grid; place-items: center; }
.mg-bigcard div { font: 72px/1 "Times New Roman", Georgia, serif; }
@media (max-width: 600px) { .mg-cards { grid-template-columns: repeat(4, 1fr); gap: 8px; } .mg-jpsuits { gap: 6px; } .mg-jpsuits div { min-width: 0; flex: 1; padding: 5px 4px; } .mg-jpsuits b { font-size: 11px; } .mg-cardx .face i { font-size: 40px; } .mg-card .big { font-size: 44px; } }

.mg-val { font: 600 14px var(--mg-title); letter-spacing: 2px; color: var(--mg-gold2); }

/* предложение удвоения: две кнопки поверх START/АВТО */
.mg-offer { display: none; position: absolute; right: 10px; top: 9px; bottom: 9px; gap: 8px; z-index: 2; }
.mg-offer.show { display: flex; animation: mgpop .2s ease; }
.mg-gbtn { min-width: 128px; padding: 0 14px; border-radius: 5px; border: 1px solid #e0bf6a; cursor: pointer; color: #fff6dc; font: 600 15px var(--mg-ui); letter-spacing: 1.2px;
  background: radial-gradient(120% 90% at 50% 0%, #2f8a4a 0%, #186030 50%, #0b3a1a 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 12px rgba(0,0,0,.6); }
.mg-gbtn small { display: block; font: 500 12px var(--mg-digit); opacity: .85; letter-spacing: 0; }
.mg-gbtn.alt { background: linear-gradient(180deg, #3a3236, #17131a); color: var(--mg-gold2); border-color: #8a6a2c; }
.mg-gbtn:disabled { opacity: .45; cursor: default; }

/* экран удвоения */
.mg-gamble { background: radial-gradient(90% 80% at 50% 45%, rgba(40,6,12,.92), rgba(4,1,2,.96)); }
.mg-gcard { position: relative; width: min(760px, 100%); padding: 18px 20px 16px; border-radius: 8px; text-align: center; animation: mgpop .25s ease;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 25%), radial-gradient(80% 70% at 50% 50%, #123a22 0%, #0a2414 60%, #06150c 100%);
  border: 1px solid #b8923e; box-shadow: inset 0 0 0 5px rgba(0,0,0,.55), inset 0 0 0 6px rgba(217,178,90,.35), inset 0 0 60px rgba(0,0,0,.6), 0 30px 80px rgba(0,0,0,.75); }
.mg-ghead { display: flex; gap: 12px; align-items: stretch; }
.mg-ghead .mg-lcd { text-align: center; } .mg-ghead .mg-lcd b { font-size: 24px; }
.mg-gsteps { display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.mg-gsteps i { width: 14px; height: 14px; border-radius: 50%; background: #1a1210; border: 1px solid #8a6a2c; box-shadow: inset 0 2px 3px rgba(0,0,0,.8); }
.mg-gsteps i.on { background: radial-gradient(circle at 35% 30%, #fff3c0, #e0aa3a 55%, #7a5010); box-shadow: 0 0 8px rgba(240,190,80,.6); }
.mg-gmid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin: 18px 0 8px; perspective: 1200px; }
.mg-gcol { height: 132px; border-radius: 8px; cursor: pointer; border: 1px solid #e0bf6a; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 3px rgba(0,0,0,.25), 0 6px 16px rgba(0,0,0,.6); transition: transform .08s, filter .15s; }
.mg-gcol b { font: 700 22px var(--mg-ui); letter-spacing: 3px; text-shadow: 0 2px 0 rgba(0,0,0,.5); } .mg-gcol span { font: 26px/1 "Times New Roman", Georgia, serif; opacity: .9; }
.mg-gcol.red { background: radial-gradient(120% 90% at 50% 0%, #e2343f 0%, #a50f1e 50%, #5e0611 100%); }
.mg-gcol.black { background: radial-gradient(120% 90% at 50% 0%, #4a4a52 0%, #1d1d22 50%, #08080a 100%); }
.mg-gcol:active { transform: translateY(2px); } .mg-gcol:disabled { filter: grayscale(.6) brightness(.6); cursor: default; }
.mg-gbig { position: relative; width: 150px; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.4,.1,.3,1); }
.mg-gbig.open { transform: rotateY(180deg); }
.mg-gbig > div { position: absolute; inset: 0; border-radius: 9px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mg-gbig .back { border: 6px solid #f4f0e6; box-shadow: 0 10px 26px rgba(0,0,0,.7), inset 0 0 0 1px #6a0a16;
  background: radial-gradient(circle at 50% 50%, rgba(217,178,90,.25) 0 16%, transparent 17%), repeating-linear-gradient(45deg, rgba(255,220,200,.1) 0 1px, transparent 1px 8px), repeating-linear-gradient(-45deg, rgba(255,220,200,.1) 0 1px, transparent 1px 8px), linear-gradient(160deg, #8a0f1f, #5a0712 60%, #3e040c); }
.mg-gbig.alt .back { background: radial-gradient(circle at 50% 50%, rgba(217,178,90,.25) 0 16%, transparent 17%), repeating-linear-gradient(45deg, rgba(220,220,240,.1) 0 1px, transparent 1px 8px), repeating-linear-gradient(-45deg, rgba(220,220,240,.1) 0 1px, transparent 1px 8px), linear-gradient(160deg, #26262e, #121216 60%, #060608); }
.mg-gbig .back::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(217,178,90,.6); border-radius: 4px; }
.mg-gbig .face { transform: rotateY(180deg); }
.pc { position: absolute; inset: 0; border-radius: 9px; background: linear-gradient(165deg, #ffffff 0%, #f6f2ea 60%, #e6e0d2 100%); border: 1px solid #bdb4a4; box-shadow: 0 10px 26px rgba(0,0,0,.7); color: var(--c); font-family: "Times New Roman", Georgia, serif; display: grid; place-items: center; }
.pc > b { font-size: 84px; line-height: 1; font-weight: 400; }
.pc em { position: absolute; left: 8px; top: 6px; font: 700 26px/1 "Times New Roman", Georgia, serif; font-style: normal; display: flex; flex-direction: column; align-items: center; }
.pc em i { font-style: normal; font-size: 20px; } .pc em.b { left: auto; top: auto; right: 8px; bottom: 6px; transform: rotate(180deg); }
.mg-gmsg { font: 600 18px var(--mg-ui); letter-spacing: 2px; color: var(--mg-gold2); min-height: 26px; margin: 4px 0 10px; }
.mg-gmsg.ok { color: #9ef0a8; } .mg-gmsg.bad { color: #ff8a8a; }
.mg-gfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(217,178,90,.25); }
.mg-ghist { display: flex; gap: 6px; min-height: 52px; align-items: center; }
.mg-ghist::before { content: attr(data-cap); font: 600 9px var(--mg-ui); letter-spacing: 1.5px; color: #8f9a7a; writing-mode: vertical-rl; transform: rotate(180deg); margin-right: 2px; }
.mg-ghist .mini { width: 36px; height: 50px; border-radius: 4px; background: linear-gradient(165deg, #fff, #ebe5d8); border: 1px solid #bdb4a4; color: var(--c); font-family: "Times New Roman", Georgia, serif; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 3px 6px rgba(0,0,0,.6); }
.mg-ghist .mini span { font: 700 13px/1 "Times New Roman", Georgia, serif; } .mg-ghist .mini i { font-style: normal; font-size: 20px; line-height: 1; }
.mg-ghist .mini:last-child { box-shadow: 0 0 0 2px var(--mg-gold), 0 3px 6px rgba(0,0,0,.6); }
.mg-gfoot .mg-gbtn { height: 48px; }
@media (max-width: 600px) {
  .mg-gcard { padding: 12px 10px; } .mg-ghead { gap: 6px; } .mg-ghead .mg-lcd b { font-size: 17px; } .mg-gsteps { gap: 3px; } .mg-gsteps i { width: 10px; height: 10px; }
  .mg-gmid { gap: 8px; } .mg-gbig { width: 112px; } .pc > b { font-size: 60px; } .pc em { font-size: 20px; } .pc em i { font-size: 15px; }
  .mg-gcol { height: 104px; } .mg-gcol b { font-size: 15px; letter-spacing: 1px; } .mg-gcol span { font-size: 20px; }
  .mg-ghist .mini { width: 28px; height: 40px; } .mg-ghist .mini i { font-size: 15px; } .mg-ghist::before { display: none; } .mg-gfoot .mg-gbtn { min-width: 100px; }
}
#wmMusicBtn svg { width: 16px; height: 16px; }
/* окно правил: плитки «символ + x5/x4/x3 сумма» */
.mg-pay { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mg-pay .pt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 6px; background: #000; border: 1px solid rgba(217,178,90,.2); }
.mg-pay .pt .im { display: flex; justify-content: center; } .mg-pay .pt .im img { width: 70px; height: 70px; margin: 0 -10px; }
.mg-pay .pt .im img:only-child { width: 86px; height: 86px; margin: 0; }
.mg-pay .pt .v { font: 600 18px/1.45 "Oswald", sans-serif; color: #fff; text-align: center; }
.mg-pay .pt .v i { font-style: normal; color: #f0c040; margin-right: 8px; } .mg-pay .pt .v b { font-weight: 600; }
.mg-pay .pt .v .h { color: #f0c040; letter-spacing: 1px; } .mg-pay .pt .v p { font: 500 12px/1.4 var(--mg-ui); color: #cbbca4; margin: 4px 0 0; }
.mg-pay .pn { grid-column: 1 / -1; font: 500 12px/1.5 var(--mg-ui); color: #a8916a; }

#wmMusicBtn, .wm-vol:has(#wmVol_music) { display: none !important; }
/* схема линий в окне правил */
.mg-pay .lines { grid-column: 1 / -1; padding: 10px; border-radius: 6px; background: #000; border: 1px solid rgba(217,178,90,.2); }
.mg-pay .lines .h { font: 600 16px "Oswald", sans-serif; color: #f0c040; letter-spacing: 1px; margin-bottom: 8px; text-align: center; }
.mg-pay .lines .lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mg-pay .lines .ln { display: flex; align-items: center; gap: 6px; } .mg-pay .lines .ln b { min-width: 18px; font: 600 13px "Oswald", sans-serif; color: #f1dca0; text-align: right; }
.mg-pay .lines svg { display: block; max-width: 100%; height: auto; }
/* бонус: «N бесплатных вращений · ВСЕ ВЫИГРЫШИ ×2»; админская кнопка демо-джекпота */
.mg-fsl { font: 600 20px var(--mg-ui); letter-spacing: 3px; color: #f1dca0; margin-top: -4px; }
.mg-x2 { display: inline-block; margin: 14px 0 4px; padding: 8px 18px; border-radius: 6px; font: 700 20px var(--mg-ui); letter-spacing: 1.5px; color: #3a1a00;
  background: linear-gradient(180deg, #fff0b0, #e0a630 55%, #9a6410); box-shadow: 0 0 0 1px #3a1c00, 0 6px 16px rgba(0,0,0,.5), 0 0 24px rgba(255,170,40,.35); }
.mg-x2 b { font: 700 30px "Oswald", sans-serif; margin-left: 6px; vertical-align: -3px; }
.mg-jpadm { font: 700 13px "Oswald", sans-serif !important; color: #f6d27a !important; } .mg-jpadm.on { background: linear-gradient(180deg, #8a5a10, #4a2a04) !important; border-color: #ffd77a !important; }
.mg-jpch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.mg-jpch button { padding: 10px 4px; border-radius: 6px; border: 1px solid #c9962e; background: linear-gradient(180deg, #fff, #ebe5d8); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mg-jpch button i { font: 34px/1 "Times New Roman", Georgia, serif; font-style: normal; color: var(--c); } .mg-jpch button small { font: 700 9px var(--mg-ui); color: #3a2a1a; letter-spacing: .5px; }
.mg-jpch button[data-s="random"] { background: linear-gradient(180deg, #ffe9a0, #c8891e); }
@media (max-width: 600px) { .mg-jpch { grid-template-columns: repeat(3, 1fr); } .mg-x2 { font-size: 16px; } .mg-x2 b { font-size: 24px; } }
/* полоса прокрутки в окнах MGT (правила и др.): тонкий золотой ползунок на тёмной дорожке */
.mg-card, .mg-gcard, .mg-chips2 { scrollbar-width: thin; scrollbar-color: #c99a3a rgba(20,6,6,.9); }
.mg-card::-webkit-scrollbar, .mg-gcard::-webkit-scrollbar { width: 8px; height: 8px; }
.mg-card::-webkit-scrollbar-track, .mg-gcard::-webkit-scrollbar-track { background: linear-gradient(90deg, #0a0203, #1a0608, #0a0203); border-radius: 8px; margin: 10px 0; box-shadow: inset 0 0 0 1px rgba(217,178,90,.15); }
.mg-card::-webkit-scrollbar-thumb, .mg-gcard::-webkit-scrollbar-thumb { border-radius: 8px; border: 2px solid transparent; background: linear-gradient(180deg, #fff0b0, #d9a23a 45%, #8a5a10) padding-box; }
.mg-card::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #fff6d0, #f0c050 45%, #a8700c) padding-box; }
.mg-card::-webkit-scrollbar-corner { background: transparent; }
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .mg-card::-webkit-scrollbar { width: 5px; } .mg-card::-webkit-scrollbar-thumb { border-width: 1px; } }
#spinBtn, .mg-start { touch-action: none; -webkit-touch-callout: none; }
/* модалки выше экрана (ландшафт телефона) прокручиваются, верх не обрезается */
.mg-ov.show { align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; }
.mg-ov.show > * { margin: auto; flex: none; max-width: 100%; }

/* ================= ДЖЕКПОТ: арт-пак владельца (2026-11-24) — /games/mgt/jp/*.webp =================
   плашки уровней в HUD, окно выбора карт (фон, рамка, заголовок, 12 карт, счётчики совпадений), окно выигрыша. Логика в hud.js не менялась. */
@keyframes jpglow { from { opacity: .35; } to { opacity: .85; } }
@keyframes jpflip { 0% { opacity: 0; } 35% { opacity: .85; } 100% { opacity: 0; } }
@keyframes jpwinglow { from { opacity: .75; } to { opacity: 1; } }
@keyframes jpin { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes jpdot { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- плашки уровней в HUD: картинка 4:1 вписана в ячейку табло, сумма по центру пустого поля --- */
html body .mg-jc.jpa { display: flex !important; align-items: center; justify-content: center; padding: 0 !important; gap: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; animation: none !important; overflow: visible; container-type: size; }
html body .mg-jc.jpa::before, html body .mg-jc.jpa::after { display: none !important; }
.mg-jc.jpa .pl { position: relative; flex: none; width: min(100cqw, 400cqh); aspect-ratio: 4 / 1; container-type: inline-size; }
.mg-jc.jpa .pl img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
html body .mg-jc.jpa .pl b { position: absolute; left: 27.5%; right: 5%; top: 50%; transform: translateY(-50%); display: block; margin: 0; padding: 0; text-align: center;
  font: 600 11.5cqw/1 "Oswald", sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden;
  color: #f4dfa6; -webkit-text-fill-color: #f4dfa6; background: none; text-shadow: 0 0 .4em rgba(232,180,80,.28), 0 1px 1px rgba(0,0,0,.9); }
.mg-jc.jpa.hit .pl::after { content: ""; position: absolute; inset: 0; background: url(jp/jp_window_glow.webp) center / 100% 100% no-repeat; pointer-events: none; animation: jpglow 1.4s ease-in-out infinite alternate; }

/* --- общий фон для окон джекпота --- */
.mg-ov.jpov { background: linear-gradient(rgba(10,2,3,.62), rgba(10,2,3,.74)), url(jp/jp_game_bg.webp) center / cover no-repeat #140304; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px; }

/* --- окно выбора карт: --W — ширина окна; всё внутри в долях --W, поэтому ничего не вылезает из рамки --- */
.jpm { --W: min(1000px, 94vw, calc((100vh - 20px) / .84)); position: relative; isolation: isolate; width: var(--W); animation: jpin .35s ease-out both;
  padding: calc(var(--W) * .094) calc(var(--W) * .085) calc(var(--W) * .095); }
.jpm::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-style: solid;
  border-width: calc(var(--W) * .0825) calc(var(--W) * .0708) calc(var(--W) * .0833) calc(var(--W) * .07); border-image: url(jp/jp_modal_frame.webp) 99 85 100 84 stretch; }
.jpm-bg { position: absolute; z-index: 0; inset: calc(var(--W) * .045) calc(var(--W) * .03) calc(var(--W) * .03); border-radius: calc(var(--W) * .03); background: url(jp/jp_modal_bg.webp) center / cover no-repeat #3a070c; }
.jpm-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: calc(var(--W) * .013); }
.jpm-title { display: block; width: calc(var(--W) * .44); height: auto; pointer-events: none; user-select: none; }
.jpm-head { position: relative; width: calc(var(--W) * .56); aspect-ratio: 800 / 137; background: url(jp/jp_modal_header.webp) center / 100% 100% no-repeat; }
.jpm-cap { display: none; }
.jpm-head p { position: absolute; left: 13.5%; right: 13.5%; top: 53%; transform: translateY(-50%); margin: 0; text-align: center; white-space: nowrap; overflow: hidden;
  font: 500 calc(var(--W) * .018)/1.2 var(--mg-ui); letter-spacing: .02em; color: #f1ddb0; text-shadow: 0 1px 2px #000; }
.jpm .mg-jpsuits { display: flex; justify-content: center; gap: calc(var(--W) * .035); margin: 0; }
html body .jpm .mg-jpsuits > div { display: flex; flex-direction: column; align-items: center; gap: calc(var(--W) * .004); min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; flex: none; }
.jpm .mg-jpsuits .sl { display: flex; gap: calc(var(--W) * .004); }
html body .jpm .mg-jpsuits .sl i { display: block; width: calc(var(--W) * .044); height: calc(var(--W) * .044); border-radius: 50%; background: url(jp/jp_match_slot.webp) center / contain no-repeat; box-shadow: none; position: relative; }
.jpm .mg-jpsuits .sl i::after { content: ""; position: absolute; inset: 0; background: center / contain no-repeat; opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .3s ease; }
.jpm .mg-jpsuits .sl i.on::after { opacity: 1; transform: none; }
.jpm .mg-jpsuits [data-s="club"] .sl i::after { background-image: url(jp/jp_match_club.webp); }
.jpm .mg-jpsuits [data-s="diamond"] .sl i::after { background-image: url(jp/jp_match_diamond.webp); }
.jpm .mg-jpsuits [data-s="heart"] .sl i::after { background-image: url(jp/jp_match_heart.webp); }
.jpm .mg-jpsuits [data-s="spade"] .sl i::after { background-image: url(jp/jp_match_spade.webp); }
html body .jpm .mg-jpsuits b { margin: 0; font: 600 calc(var(--W) * .019)/1.1 "Oswald", sans-serif; letter-spacing: .03em; color: #e6c983; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .jpm .mg-jpsuits > div.win { border: 0; box-shadow: none; }
.jpm .mg-jpsuits > div.win .sl { filter: drop-shadow(0 0 calc(var(--W) * .008) rgba(255,205,110,.55)); }
.jpm .mg-jpsuits > div.win b { color: #ffe9b0; }
html body .jpm .mg-cards { display: grid; grid-template-columns: repeat(6, calc(var(--W) * .112)); gap: calc(var(--W) * .018) calc(var(--W) * .02); perspective: 1200px; }
.jpm .mg-cardx { width: 100%; aspect-ratio: 600 / 840; }
html body .jpm .mg-cardx > div { border: 0; border-radius: 6% / 4.3%; box-shadow: 0 calc(var(--W) * .005) calc(var(--W) * .014) rgba(0,0,0,.55); }
html body .jpm .mg-cardx .back { background: url(jp/card_back.webp) center / 100% 100% no-repeat; }
.jpm .mg-cardx .back::before, .jpm .mg-cardx .back span { display: none; }
html body .jpm .mg-cardx .face { background: center / 100% 100% no-repeat #f3ead8; }
.jpm .mg-cardx[data-s="club"] .face { background-image: url(jp/card_club.webp); }
.jpm .mg-cardx[data-s="diamond"] .face { background-image: url(jp/card_diamond.webp); }
.jpm .mg-cardx[data-s="heart"] .face { background-image: url(jp/card_heart.webp); }
.jpm .mg-cardx[data-s="spade"] .face { background-image: url(jp/card_spade.webp); }
.jpm .mg-cardx .face::after { content: ""; position: absolute; inset: -5.95% -8.33%; pointer-events: none; opacity: 0; background: url(jp/card_flip_glow.webp) center / 100% 100% no-repeat; }
.jpm .mg-cardx.open .face::after { animation: jpflip 1.1s ease-out .2s both; }
html body .jpm .mg-cardx.lit .face { box-shadow: 0 calc(var(--W) * .005) calc(var(--W) * .014) rgba(0,0,0,.55); }
.jpm .mg-cardx.lit .face::after { background-image: url(jp/card_win_glow.webp); animation: jpwinglow 1.6s ease-in-out infinite alternate; }
.jpm .mg-cardx.lit { z-index: 1; }
.jpm .mg-cardx:not(.open):hover { transform: translateY(-2px); }

/* портретный телефон: вертикальная рамка, карты 4×3 */
@media (max-aspect-ratio: 1/1), (max-width: 700px) {
  .jpm { --W: min(560px, 96vw, calc((100vh - 16px) / 1.64)); padding: calc(var(--W) * .15) calc(var(--W) * .09) calc(var(--W) * .155); }
  .jpm::after { border-width: calc(var(--W) * .1364) calc(var(--W) * .0714) calc(var(--W) * .1377) calc(var(--W) * .0701); border-image: url(jp/jp_modal_frame_mobile.webp) 105 55 106 54 stretch; }
  .jpm-bg { inset: calc(var(--W) * .09) calc(var(--W) * .03) calc(var(--W) * .03); border-radius: calc(var(--W) * .04); }
  .jpm-in { gap: calc(var(--W) * .022); }
  .jpm-title { width: calc(var(--W) * .66); }
  .mg-ov.jpov { background: linear-gradient(rgba(10,2,3,.45), rgba(10,2,3,.6)), url(jp/jp_modal_bg.webp) center / cover no-repeat #140304; }
  /* на телефоне в слоте шапки — название, подсказка строкой ниже (в слот она не помещается крупным шрифтом) */
  .jpm-head { width: calc(var(--W) * .92); aspect-ratio: auto; background-size: 100% auto; background-position: top center; padding-top: calc(var(--W) * .92 * 137 / 800); }
  .jpm-cap { display: block; position: absolute; left: 14%; right: 14%; top: calc(var(--W) * .92 * 137 / 800 * .535); transform: translateY(-50%); text-align: center; white-space: nowrap;
    font: 600 calc(var(--W) * .042)/1 var(--mg-title); letter-spacing: .12em; color: #f1d58f; text-shadow: 0 1px 2px #000; }
  .jpm-head p { position: static; transform: none; margin-top: calc(var(--W) * .012); white-space: normal; font-size: calc(var(--W) * .036); line-height: 1.25; }
  .jpm .mg-jpsuits { gap: calc(var(--W) * .03); }
  html body .jpm .mg-jpsuits .sl i { width: calc(var(--W) * .058); height: calc(var(--W) * .058); }
  html body .jpm .mg-jpsuits b { font-size: calc(var(--W) * .034); }
  html body .jpm .mg-cards { grid-template-columns: repeat(4, calc(var(--W) * .18)); gap: calc(var(--W) * .03) calc(var(--W) * .03); }
}

/* низкий альбомный экран (телефон боком): подсказка в слот не помещается — в слоте название */
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  .jpm-cap { display: block; position: absolute; left: 14%; right: 14%; top: 53%; transform: translateY(-50%); text-align: center; white-space: nowrap;
    font: 600 calc(var(--W) * .03)/1 var(--mg-title); letter-spacing: .12em; color: #f1d58f; text-shadow: 0 1px 2px #000; }
  .jpm-head p { display: none; }
}

/* --- окно выигрыша джекпота --- */
.jpw { --W: min(760px, 94vw, calc((100vh - 20px) / .98)); position: relative; width: var(--W); display: flex; flex-direction: column; align-items: center; animation: jpin .45s ease-out both; }
.jpw-banner { position: relative; z-index: 2; display: block; width: calc(var(--W) * .78); height: auto; margin-bottom: calc(var(--W) * -.11); pointer-events: none; user-select: none; }
.jpw-win { position: relative; z-index: 1; width: 100%; aspect-ratio: 1600 / 1000; background: url(jp/jp_win_window.webp) center / 100% 100% no-repeat; }
.jpw-in { position: absolute; left: 22%; right: 22%; top: 31%; bottom: 32%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--W) * .008); text-align: center; overflow: hidden; }
.jpw-tier { display: flex; align-items: center; justify-content: center; gap: calc(var(--W) * .012); max-width: 100%; }
.jpw-tier i { flex: none; width: calc(var(--W) * .06); height: calc(var(--W) * .06); background: center / contain no-repeat; }
.jpw-tier i[data-s="club"] { background-image: url(jp/jp_match_club.webp); } .jpw-tier i[data-s="diamond"] { background-image: url(jp/jp_match_diamond.webp); }
.jpw-tier i[data-s="heart"] { background-image: url(jp/jp_match_heart.webp); } .jpw-tier i[data-s="spade"] { background-image: url(jp/jp_match_spade.webp); }
.jpw-tier span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 calc(var(--W) * .03)/1.1 var(--mg-title); letter-spacing: .12em; color: #e8cb88; }
.jpw-amt { max-width: 100%; white-space: nowrap; font: 600 calc(var(--W) * .095)/1 "Oswald", sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: #ffe7a6;
  text-shadow: 0 0 .25em rgba(240,180,70,.35), 0 2px 2px rgba(0,0,0,.8); }
.jpw-in p { margin: 0; font: 500 calc(var(--W) * .02)/1.2 var(--mg-ui); color: #bda67a; letter-spacing: .06em; white-space: nowrap; }
.jpw-go { position: relative; z-index: 2; width: calc(var(--W) * .4); aspect-ratio: 450 / 120; margin-top: calc(var(--W) * -.035); padding: 0; border: 0; cursor: pointer;
  background: url(jp/jp_btn.webp) center / 100% 100% no-repeat; -webkit-tap-highlight-color: transparent; }
.jpw-go::after { content: ""; position: absolute; inset: 0; background: url(jp/jp_btn_pressed.webp) center / 100% 100% no-repeat; opacity: 0; transition: opacity .08s; }
.jpw-go span { position: relative; z-index: 1; display: block; font: 600 calc(var(--W) * .036)/1 var(--mg-title); letter-spacing: .14em; color: #f6dfa0; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.jpw-go:active::after { opacity: 1; } .jpw-go:active span { transform: translateY(1px); color: #e9cf88; }
.jpw-go:focus-visible { outline: 2px solid rgba(246,223,160,.7); outline-offset: 3px; border-radius: 40px; }
@media (max-aspect-ratio: 1/1), (max-width: 700px) {
  .jpw { --W: min(560px, 96vw, calc((100vh - 16px) / 1.02)); }
  .jpw-in { left: 21%; right: 21%; top: 29.5%; bottom: 31%; }
  .jpw-tier i { width: calc(var(--W) * .075); height: calc(var(--W) * .075); }
  .jpw-tier span { font-size: calc(var(--W) * .038); letter-spacing: .08em; }
  .jpw-amt { font-size: calc(var(--W) * .11); }
  .jpw-in p { font-size: calc(var(--W) * .03); }
  .jpw-go { width: calc(var(--W) * .5); }
  .jpw-go span { font-size: calc(var(--W) * .045); }
}
/* логотип-картинка вместо текстового заголовка (cfg.logo; без него — прежний текст) */
.mg-title.mg-logo img { display: block; height: 48px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.mg-title.mg-logo small { display: none; }
/* удвоение после выигрыша (2026-11-25): вместо нижней полосы — круглые кнопки на месте «скорости» и «авто» */
.mg-offer, .mg-offer.show { display: none !important; }
.mg-take, .mg-gx2 { display: none !important; }
.mg-round.offer #turboBtn, .mg-round.offer #autoBtn { display: none !important; }
.mg-round.offer .mg-take, .mg-round.offer .mg-gx2 { display: flex !important; animation: mgpop .2s ease; }
.mg-take { background: radial-gradient(circle at 50% 30%, #3e9a4a 0%, #1a5a24 60%, #082a10 100%); gap: 1px; }
.mg-take b { font: 700 12px var(--mg-ui); color: #ffe6a8; line-height: 1; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-gx2 { position: relative; background: radial-gradient(circle at 50% 30%, #4a1010 0%, #240606 60%, #0a0202 100%); overflow: visible; }
.mg-gx2 .cr { position: absolute; top: 50%; left: 50%; width: 34%; height: 50%; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font: 700 18px/1 serif; background: linear-gradient(#fff, #e9e4da); box-shadow: 0 2px 6px rgba(0,0,0,.6); border: 1px solid #c9b48a; }
.mg-gx2 .cr.r { color: #c8141e; transform: translate(-82%, -55%) rotate(-12deg); animation: mggx2r 0.9s ease-in-out infinite; }
.mg-gx2 .cr.b { color: #111; transform: translate(-18%, -45%) rotate(12deg); animation: mggx2b 0.9s ease-in-out infinite; }
.mg-gx2 em { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; font: 800 20px/1 var(--mg-ui); font-style: normal; color: #ffd65a;
  text-shadow: 0 0 6px rgba(255,190,60,.7), 0 2px 2px #000; -webkit-text-stroke: 1px #5a2a00; }
@keyframes mggx2r { 0%, 100% { filter: brightness(1.25); box-shadow: 0 0 12px rgba(255,60,60,.8); } 50% { filter: brightness(.7); box-shadow: 0 2px 6px rgba(0,0,0,.6); } }
@keyframes mggx2b { 0%, 100% { filter: brightness(.7); box-shadow: 0 2px 6px rgba(0,0,0,.6); } 50% { filter: brightness(1.2); box-shadow: 0 0 12px rgba(255,255,255,.6); } }
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .mg-gx2 .cr { font-size: 13px; } .mg-gx2 em { font-size: 15px; } .mg-take b { font-size: 10px; } }

/* окно удвоения в арте владельца (2026-11-25): /games/mgt/gm/ — рамка, рубашка, масти, кнопки, мини-карты, гнёзда шагов */
html body .mg-gamble { background: radial-gradient(90% 80% at 50% 45%, rgba(40,6,12,.9), rgba(4,1,2,.96)); }
html body .mg-gcard { width: min(760px, 96vw); aspect-ratio: auto; padding: 5.4% 7.2% 5%; border: 0; border-radius: 0; box-shadow: none;
  background: url(/games/mgt/gm/frame.webp) center / 100% 100% no-repeat; }
html body .mg-gcard::before, html body .mg-gcard::after { display: none; }
html body .mg-ghead .mg-lcd { background: rgba(10,2,4,.72); border: 1px solid rgba(217,178,90,.45); border-radius: 10px; }
html body .mg-gsteps { gap: 4px; }
html body .mg-gsteps i { width: 34px; height: 34px; border: 0; border-radius: 50%; background: url(/games/mgt/gm/socket.webp) center / contain no-repeat; box-shadow: none; position: relative; }
html body .mg-gsteps i.on::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fff4c4, #f0b840 50%, #8a5a10); box-shadow: 0 0 10px rgba(255,200,80,.8); }
html body .mg-gmid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
html body .mg-gcol, html body .mg-gcol.red, html body .mg-gcol.black { width: 100%; max-width: 230px; justify-self: center; height: auto; aspect-ratio: 520 / 200; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 0 14%; overflow: visible;
  background: url(/games/mgt/gm/btn_red.webp) center / contain no-repeat; transform: none; }
html body .mg-gcol.black { background-image: url(/games/mgt/gm/btn_black.webp); }
html body .mg-gcol:disabled { filter: brightness(.6); }
html body .mg-gcol span { display: none; }
html body .mg-gcol b { font: 700 20px var(--mg-ui); letter-spacing: 2px; color: #fff8e6; text-shadow: 0 2px 2px rgba(0,0,0,.7); }
html body .mg-gbig { width: 170px; aspect-ratio: 300 / 430; }
html body .mg-gbig > div { border-radius: 10px; border: 0; }
html body .mg-gbig .back, html body .mg-gbig.alt .back { background: url(/games/mgt/gm/back.webp) center / 100% 100% no-repeat; border: 0; box-shadow: 0 12px 28px rgba(0,0,0,.7); }
html body .mg-gbig.alt .back { filter: brightness(1.25) saturate(1.1); }
html body .mg-gbig .back::before { display: none; }
html body .mg-gbig .face { background: none; border: 0; box-shadow: 0 12px 28px rgba(0,0,0,.7); }
html body .mg-gbig .face .gmface { width: 100%; height: 100%; display: block; border-radius: 10px; }
html body .mg-gfoot { border-top: 1px solid rgba(217,178,90,.35); }
html body .mg-ghist .mini { width: 34px; height: 48px; border: 0; border-radius: 4px; background: url(/games/mgt/gm/mini_black.webp) center / 100% 100% no-repeat; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 6px rgba(0,0,0,.5); }
html body .mg-ghist .mini.r { background-image: url(/games/mgt/gm/mini_red.webp); }
html body .mg-ghist .mini i { font: 18px/1 "Times New Roman", Georgia, serif; font-style: normal; color: #f6e2a8; text-shadow: 0 1px 2px #000; }
html body .mg-ghist .mini:last-child { box-shadow: 0 0 0 2px #f0c860, 0 3px 6px rgba(0,0,0,.6); }
html body .mg-gfoot .mg-gbtn.alt, html body #gmTake { height: auto; aspect-ratio: 520 / 200; min-width: 170px; border: 0; border-radius: 0; background: url(/games/mgt/gm/btn_take.webp) center / 100% 100% no-repeat; color: #fff8e6; box-shadow: none; text-shadow: 0 2px 2px rgba(0,0,0,.7); }
/* круглая кнопка ×2 — иконка владельца с картами */
html body .mg-gx2 { background: url(/games/mgt/gm/btn_cards.webp) center / 100% 100% no-repeat !important; border: 0 !important; box-shadow: 0 0 0 0 rgba(255,80,80,0); animation: mggx2p 1s ease-in-out infinite; }
html body .mg-gx2 em { bottom: 9%; }
@keyframes mggx2p { 0%, 100% { filter: brightness(1); box-shadow: 0 0 6px rgba(255,80,60,.35); } 50% { filter: brightness(1.28); box-shadow: 0 0 18px rgba(255,200,90,.75); } }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  html body .mg-gcard { padding: 11% 10% 9%; width: 96vw; } html body .mg-ghead { gap: 4px; } html body .mg-ghead .mg-lcd b { font-size: 15px; } html body .mg-ghead .mg-lcd small { font-size: 8px; letter-spacing: .5px; }
  html body .mg-gbig { width: 120px; } html body .mg-gcol b { font-size: 12px; letter-spacing: .5px; } html body .mg-gcol, html body .mg-gcol.red, html body .mg-gcol.black { padding-left: 20%; }
  html body .mg-gsteps i { width: 24px; height: 24px; } html body .mg-ghist .mini { width: 26px; height: 37px; } html body .mg-ghist .mini i { font-size: 14px; }
  html body .mg-gfoot .mg-gbtn.alt, html body #gmTake { min-width: 120px; font-size: 13px; }
}
/* ставки (2026-11-27): цифры одинаковой ширины (ряд не «прыгает»), на ПК — стрелки ‹ › с повтором при удержании */
html body .mg-track .mg-chip b, html body .mg-lcd b { font-variant-numeric: tabular-nums; }

/* ============================================================================================
   hud2 — КОМПОНОВКА (2026-11-28). Одинаковая для всех игр MGT:
   строка 1 — табло джекпота ♠ ♥ [логотип] ♦ ♣ (на телефоне: логотип, под ним 2×2);
   строка 2 — сцена: слева плашки игры, по центру доска (вписывается в сцену целиком), справа АВТО · СТАРТ · скорость;
   строка 3 — полоса: дом/правила · баланс(+) · сообщение и ставки · последний выигрыш · звук/меню.
   Размеры — через переменные, у всех игр одни и те же. Спокойные тона: чёрный глянец, тонкая латунь, белые цифры.
   ============================================================================================ */
:root.mg2 {
  --jpH: clamp(32px, 5.4vh, 56px); --side: clamp(100px, 10.5vw, 168px); --rb: clamp(56px, 7.6vh, 72px); --st: clamp(92px, 13.4vh, 126px);
  --chipW: clamp(78px, 6.4vw, 100px); --chipH: clamp(38px, 6vh, 56px); --ic: clamp(38px, 5vh, 46px); --lcdW: clamp(128px, 11vw, 188px);
  --brass: #b8913e; --brass2: #e2c477; --ink: #050505;
}
.mg2 body { background: #050304; }
.mg2 .mg-app { position: relative; z-index: 1; height: 100%; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "jp" "main" "panel"; }
.mg2 .mg-app > * { min-width: 0; }
.mg2 .mg-top { display: none; }

/* --- строка 1: табло джекпота и логотип --- */
.mg2 .mg-jp { grid-area: jp; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); grid-template-areas: "j0 j1 logo j2 j3";
  align-items: center; gap: 10px; width: min(calc(100% - 24px), 1480px); max-width: none; margin: 0 auto; padding: 6px 0 2px; }
.mg2 .mg-jc { height: var(--jpH); min-width: 0; }
.mg2 .mg-jc.j0 { grid-area: j0; } .mg2 .mg-jc.j1 { grid-area: j1; } .mg2 .mg-jc.j2 { grid-area: j2; } .mg2 .mg-jc.j3 { grid-area: j3; }
.mg2 .mg-title { grid-area: logo; position: static; transform: none; width: auto; max-width: none; min-width: 0; height: var(--jpH); display: flex; align-items: center; justify-content: center; text-align: center; pointer-events: none; overflow: hidden; }
.mg2 .mg-title b { display: block; max-width: 100%; font: 600 clamp(17px, 1.9vw, 30px)/1.1 "Oswald", var(--mg-ui); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: clip;
  background: linear-gradient(180deg, #fff3c8 0%, #e2bd62 52%, #a77a2c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 1px rgba(0,0,0,.85)); }
.mg2 .mg-title small { display: none; }
.mg2 .mg-title.mg-logo img { height: calc(var(--jpH) * 1.12); width: auto; max-width: 100%; object-fit: contain; margin: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }

html.mg2 body .mg-jc.jpa .pl b { font-weight: 700; letter-spacing: .03em; color: #fff4d6; -webkit-text-fill-color: #fff4d6; text-shadow: 0 1px 0 rgba(0,0,0,.95), 0 0 2px rgba(0,0,0,.8); }
.mg2 .mg-panel, .mg2 .mg-round, .mg2 .mg-side { -webkit-font-smoothing: antialiased; }

/* --- строка 2: сцена --- */
.mg2 .mg-main { grid-area: main; position: relative; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--side); align-items: center; gap: 8px; padding: 4px 12px 2px; min-height: 0; }
.mg2 .mg-stage { position: relative; width: 100%; height: 100%; min-height: 0; max-width: none; }
.mg2 .mg-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg2 .mg-side { grid-column: 1; } .mg2 .mg-stage { grid-column: 2; } .mg2 .mg-round { grid-column: 3; }
.mg2 .mg-side { position: static; transform: none; width: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.mg2 .mg-badge { width: min(100%, calc(var(--side) * .7)); padding: 9px 6px 8px; border-radius: 8px; text-align: center;
  border: 2px solid var(--brass); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 40%), linear-gradient(180deg, #1c1718 0%, #080606 100%);
  box-shadow: 0 0 0 2px #000, 0 6px 14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,240,200,.18); }
.mg2 .mg-badge b { display: block; font: 700 calc(var(--side) * .23)/1 "Oswald", sans-serif; color: #f2d27a; text-shadow: 0 2px 0 rgba(0,0,0,.7); white-space: nowrap; }
.mg2 .mg-badge.hot b { font-size: calc(var(--side) * .17); }
.mg2 .mg-badge small { display: block; margin-top: 4px; font: 700 calc(var(--side) * .078) var(--mg-ui); letter-spacing: 1px; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; }

/* круглые кнопки: чёрный глянец, тонкое латунное кольцо, белые знаки */
.mg2 .mg-round { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0; }
.mg2 .mg-rb { position: relative; flex: none; width: var(--rb); height: var(--rb); padding: 0; border-radius: 50%; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 2px solid var(--brass); background: radial-gradient(circle at 50% 20%, #5c5c62 0%, #26262a 36%, #0b0b0c 68%, #000 100%);
  box-shadow: 0 0 0 2px #000, 0 6px 14px rgba(0,0,0,.65), inset 0 2px 3px rgba(255,255,255,.22), inset 0 -6px 10px rgba(0,0,0,.6); }
.mg2 .mg-rb i { font-size: calc(var(--rb) * .34); filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); }
.mg2 .mg-rb small { font: 700 calc(var(--rb) * .135)/1 var(--mg-ui); letter-spacing: .5px; max-width: 82%; overflow: hidden; white-space: nowrap; }
.mg2 .mg-rb:active { transform: scale(.96); }
.mg2 .mg-auto2 { background: radial-gradient(circle at 50% 20%, #4f7d4a 0%, #1e3c1e 38%, #08160a 70%, #000 100%); }
.mg2 #autoBtn.on { background: radial-gradient(circle at 50% 20%, #8ad45e 0%, #3a8a26 40%, #134a0c 72%, #031a02 100%); border-color: var(--brass2); }
.mg2 .mg-spd { width: calc(var(--rb) * 1.42); height: calc(var(--rb) * .58); border-radius: 999px; flex-direction: row; gap: 6px; }
.mg2 .mg-spd span { display: inline-flex; } .mg2 .mg-spd span i { font-size: calc(var(--rb) * .16); margin: 0 1px; opacity: .3; filter: none; }
.mg2 .mg-spd span i:first-child, .mg2 .mg-spd[data-spd="1"] span i:nth-child(2), .mg2 .mg-spd[data-spd="2"] span i { opacity: 1; }
.mg2 .mg-spd[data-spd="2"] span i { color: #ffd77a; }
.mg2 .mg-spd small { font-size: calc(var(--rb) * .15); }
.mg2 .mg-take { background: radial-gradient(circle at 50% 20%, #8ad45e 0%, #3a8a26 40%, #134a0c 72%, #031a02 100%); }
.mg2 .mg-take i { font-size: calc(var(--rb) * .28); } .mg2 .mg-take small { font-size: calc(var(--rb) * .12); }
.mg2 .mg-take b { font: 700 calc(var(--rb) * .15)/1 "Oswald", sans-serif; color: #fff2b8; max-width: 84%; overflow: hidden; white-space: nowrap; }
/* СТАРТ: большой чёрный круг, латунный обод, надпись по дуге */
.mg2 .mg-start { position: relative; flex: none; width: var(--st); height: var(--st); padding: 0; border-radius: 50%; cursor: pointer; color: #fff; display: grid; place-items: center;
  border: 3px solid #d2aa52; background: radial-gradient(circle at 50% 18%, #55555b 0%, #1d1d20 38%, #070708 70%, #000 100%);
  box-shadow: 0 0 0 3px #0a0703, 0 0 0 5px rgba(210,170,82,.42), 0 10px 22px rgba(0,0,0,.7), inset 0 3px 6px rgba(255,255,255,.24), inset 0 -10px 18px rgba(0,0,0,.7); }
.mg2 .mg-start i { grid-area: 1 / 1; font-size: calc(var(--st) * .42); margin-top: calc(var(--st) * .06); filter: drop-shadow(0 2px 2px rgba(0,0,0,.7)); }
.mg2 .mg-start small { display: none; }
.mg2 .mg-start .arc { grid-area: 1 / 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mg2 .mg-start .arc text { font: 700 7.6px var(--mg-ui); fill: #fff; letter-spacing: .3px; }
.mg2 .mg-start:active { transform: scale(.97); }
.mg2 .mg-start.busy i { animation: mg2spin 1.1s linear infinite; } @keyframes mg2spin { to { transform: rotate(360deg); } }
.mg2 .mg-start.fast { border-color: #f0cc6a; background: radial-gradient(circle at 50% 18%, #8a7a4a 0%, #3a2e12 40%, #120c02 72%, #000 100%); }
.mg2 .mg-start.auto::after { content: attr(data-n); position: absolute; top: -2px; right: -2px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #0a0806; border: 1.5px solid var(--brass2); color: #fff; font: 700 13px/23px "Oswald", sans-serif; }

/* плашка «купить бонус» (если есть у игры) — в колонке кнопок под СТАРТом, как у наземного автомата */
html.mg2 body .mg-round > .pig-buy { position: relative; left: auto; top: auto; flex: none; width: calc(var(--rb) * 2.1); height: calc(var(--rb) * 1.05); margin-top: 4px; }

/* --- строка 3: полоса управления --- */
.mg2 .mg-panel { grid-area: panel; position: relative; z-index: 4; width: auto; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 14px;
  padding: 6px 16px calc(10px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 24%, rgba(0,0,0,.84) 100%); }
.mg2 .mg-panel::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,178,90,.5), transparent); }
.mg2 .mg-left, .mg2 .mg-right { display: flex; align-items: center; gap: 14px; min-width: 0; padding-bottom: 4px; }
.mg2 .mg-left { justify-self: start; } .mg2 .mg-right { justify-self: end; }
.mg2 .mg-icons { display: flex; gap: 8px; flex: none; }
.mg2 .mg-ic { flex: none; width: var(--ic); height: var(--ic); padding: 0; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: calc(var(--ic) * .4); display: grid; place-items: center; text-decoration: none;
  background: radial-gradient(circle at 50% 28%, #3c3c40 0%, #161618 58%, #050505 100%); box-shadow: inset 0 1px 2px rgba(255,255,255,.18), 0 0 0 1px rgba(0,0,0,.8), 0 3px 8px rgba(0,0,0,.6); }
.mg2 .mg-ic:active { transform: scale(.95); }
/* «Lobby» — одна общая кнопка возврата в лобби: плашка ≥44px с иконкой и подписью (на телефоне-портрете — круглая иконка 44px) */
html.mg2 body .mg-lobby { width: auto; min-width: 44px; height: 44px; padding: 0 14px 0 12px; border-radius: 22px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font: 700 14px var(--mg-ui); letter-spacing: .5px; color: #fff; border: 1.5px solid var(--brass); }
html.mg2 body .mg-lobby i { font-size: 16px; }
html.wm-embed.mg2 body .mg-lobby { display: none !important; }
/* «домой» — того же размера, что и соседние круглые иконки (перебивает общий BACK_CSS из wm.js); внутри окна сайта (/games/play/) кнопки нет */
html.mg2 body a.mg-back.mg-ic[href="/games/"] { width: var(--ic) !important; min-width: var(--ic) !important; height: var(--ic) !important; min-height: var(--ic) !important; padding: 0 !important; border-radius: 50% !important; font-size: calc(var(--ic) * .4) !important; }
html.mg2 body a.mg-back.mg-ic[href="/games/"] i { font-size: calc(var(--ic) * .42) !important; }
html.wm-embed.mg2 body a.mg-back.mg-ic { display: none !important; }
.mg2 .mg-ic.mg-jpadm { font: 700 calc(var(--ic) * .3) "Oswald", sans-serif !important; color: #f6d27a !important; }
.mg2 .mg-panel .mg-lcd { flex: none; width: var(--lcdW); min-width: 0; padding: 0; text-align: center; background: none; border: 0; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
.mg2 .mg-panel .mg-lcd small { font: 700 clamp(11px, .9vw, 13px)/1.2 var(--mg-ui); letter-spacing: 1px; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.mg2 .mg-panel .mg-lcd b { display: block; font: 700 clamp(20px, 1.9vw, 28px)/1.15 "Oswald", sans-serif; letter-spacing: .5px; color: #fff; text-shadow: 0 2px 2px rgba(0,0,0,.8); white-space: nowrap; overflow: hidden; text-overflow: clip; font-variant-numeric: tabular-nums; }
.mg2 .mg-lcd.cr:has(#topLogin:not([style*="none"])) > b { display: none; }
.mg2 .mg-login { margin: 3px auto 0; height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid #2a6aa8; background: linear-gradient(180deg, #1f5f9a, #123c66); color: #fff; font: 600 13px var(--mg-ui); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mg2 .mg-plus { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer; border: 1.5px solid var(--brass); background: radial-gradient(circle at 50% 30%, #2a2418, #0a0806); color: #f1dca0; font: 600 20px/1 "Oswald", sans-serif; display: grid; place-items: center; }
.mg2 .mg-bets { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: min(calc(var(--chipW) * 6 + 40px + 60px), calc(100vw - 2 * var(--lcdW) - 2 * var(--ic) - 160px)); min-width: 0; max-width: none; }
.mg2 .mg-msg { height: 22px; text-align: center; overflow: hidden; }
.mg2 #hudMsg { display: block; font: 700 17px/22px var(--mg-ui); letter-spacing: .6px; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-shadow: 0 2px 3px rgba(0,0,0,.85); }
.mg2 .mg-betline { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mg2 .mg-arr { display: block !important; flex: none; width: 26px; height: var(--chipH); padding: 0; border: 0; background: none; color: #e8d7a8; font-size: 18px; cursor: pointer; }
.mg2 .mg-arr:disabled { opacity: .25; }
html.mg2 body #betRow { position: relative; overflow: hidden !important; display: block; flex: 1 1 auto; min-width: 0; width: auto; height: calc(var(--chipH) + 4px); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; contain: layout paint; -webkit-mask-image: none; mask-image: none; }
html.mg2 body #betRow.fadeL { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px); mask-image: linear-gradient(90deg, transparent 0, #000 16px); }
html.mg2 body #betRow.fadeR { -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 16px); mask-image: linear-gradient(270deg, transparent 0, #000 16px); }
html.mg2 body #betRow.fadeL.fadeR { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
html.mg2 body #betRow.locked { cursor: default; } html.mg2 body #betRow.locked .mg-chip:not(.sel) { filter: grayscale(.4) brightness(.8); }
.mg2 .mg-track { display: flex; gap: 8px; width: max-content; will-change: transform; padding: 2px 0; }
html.mg2 body .mg-track .mg-chip { flex: none; width: var(--chipW); min-width: 0; height: var(--chipH); padding: 0 4px; border-radius: 6px; cursor: pointer; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px solid #8f6b28;
  background: linear-gradient(180deg, #3c3c40 0%, #19191b 46%, #050506 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 6px rgba(0,0,0,.6); transition: background .15s, border-color .15s; -webkit-user-drag: none; }
html.mg2 body .mg-track .mg-chip b { display: block; font: 700 calc(var(--chipH) * .42)/1.05 "Oswald", sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px rgba(0,0,0,.8); }
html.mg2 body .mg-track .mg-chip small { display: block; margin-top: 2px; font: 700 calc(var(--chipH) * .155)/1.05 var(--mg-ui); letter-spacing: .3px; color: #f3c94e; white-space: nowrap; }
html.mg2 body .mg-track .mg-chip.sel { border-color: #e9d27a; background: linear-gradient(180deg, #86d84e 0%, #3e9c24 46%, #1b5c10 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.6); }
html.mg2 body .mg-track .mg-chip.sel small { color: #fff6b8; }
html.mg2 body .mg-track .mg-chip:disabled { cursor: default; }


/* ============================================================================================
   v2 (2026-11-28): ЕДИНАЯ СЦЕНА, как у EGT. Вся игра — один кадр с пропорцией 1.6…1.78 (16:10…16:9), который равномерно
   масштабируется под окно: ПК, окно сайта, телефон боком и телефон в портрете (там кадр по ширине экрана, по центру; вокруг — фон игры).
   Внутри кадра всё в долях его высоты (cqh) / ширины (cqw), поэтому пропорции одинаковы на любом экране:
   табло джекпота 10% высоты · доска 76% · полоса снизу 14%; слева плашки игры 11% ширины, справа колонка кнопок 12%.
   ============================================================================================ */
:root.mg2 {
  --jpH: 7.4cqh; --side: 11cqw; --rb: 10.6cqh; --st: 18.4cqh; --chipW: 12.4cqh; --chipH: 8.9cqh; --ic: 6.7cqh; --lcdW: 19cqh; /* размеры сняты с EGT 20 Super Hot (ПК 1600×900) */
}
html.mg2, .mg2 body { background: #000; }
:root.mg2 { --vw: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)); --vh: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  --stW: min(var(--vw), var(--vh) * 1.7778); --stH: calc(var(--stW) / 1.7778); /* единый кадр РОВНО 16:9 во всех играх MGT (владелец 29.11): лишнее место — фон игры */ --stTop: calc(50% + (env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 2 - var(--stH) / 2); }
html.mg2 body .mg-app {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: var(--stW); height: var(--stH);
  margin-top: calc((env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 2);
  padding: 0; container-type: size; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 10% 74.5% 15.5%; grid-template-areas: "jp" "main" "panel";
}
/* строка 1 */
html.mg2 body .mg-jp { width: 100%; height: 100%; margin: 0; padding: 1.2cqh 1cqw 0; gap: 0 1cqw; align-items: center; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); grid-template-areas: "j0 j1 logo j2 j3"; }
html.mg2 body .mg-title { height: 8.4cqh; } html.mg2 body .mg-title.mg-logo img { height: 8.2cqh; }
html.mg2 body .mg-title b { font-size: 5.2cqh; letter-spacing: .06em; }
/* строка 2 */
html.mg2 body .mg-main { display: grid; grid-template-columns: 11cqw minmax(0, 1fr) 12cqw; gap: 0; padding: 0; height: 100%; }
html.mg2 body .mg-stage { grid-column: 2; width: 100% !important; height: 100% !important; flex: none !important; aspect-ratio: auto !important; max-height: none !important; }
html.mg2 body .mg-side { display: flex; gap: 2cqh; }
html.mg2 body .mg-badge { width: 7.6cqw; padding: 1.1cqh .4cqw 1cqh; border-radius: 1.2cqh; border-width: .3cqh; }
html.mg2 body .mg-badge b { font-size: 6.4cqh; } html.mg2 body .mg-badge.hot b { font-size: 4.6cqh; }
html.mg2 body .mg-badge small { font-size: 2cqh; margin-top: .5cqh; }
html.mg2 body .mg-round { gap: 1.8cqh; }
html.mg2 body .mg-rb { border-width: .32cqh; } html.mg2 body .mg-start { border-width: .45cqh; }
html.mg2 body .mg-start.auto::after { min-width: 3.4cqh; height: 3.4cqh; border-radius: 1.7cqh; font-size: 2cqh; line-height: 3.1cqh; padding: 0 .8cqh; }
html.mg2 body .mg-round > .pig-buy { width: 19cqh; height: 8.6cqh; margin-top: .6cqh; }
/* строка 3: сообщение над ставками, затем «Lobby» · правила · баланс(+) · ставки · выигрыш · звук · меню */
html.mg2 body .mg-panel { height: 100%; padding: .4cqh 1.4cqw 1.2cqh; gap: 0 1.4cqw; align-items: end; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 30%, rgba(0,0,0,.82) 100%); }
html.mg2 body .mg-left, html.mg2 body .mg-right { gap: 1.4cqw; padding-bottom: .4cqh; }
html.mg2 body .mg-icons { gap: 1cqh; }
html.mg2 body .mg-ic { font-size: 2.6cqh; }
html.mg2 body .mg-lobby { height: var(--ic); min-height: 0; min-width: 0; padding: 0 1.6cqh 0 1.4cqh; border-radius: 3.2cqh; gap: .9cqh; font-size: 2.1cqh; border-width: .2cqh; }
html.mg2 body .mg-lobby i { font-size: 2.4cqh; }
html.mg2 body .mg-panel .mg-lcd small { font-size: 2cqh; letter-spacing: .1cqh; }
html.mg2 body .mg-panel .mg-lcd b { font-size: 3.6cqh; }
html.mg2 body .mg-plus { width: 4cqh; height: 4cqh; font-size: 2.8cqh; border-width: .2cqh; }
html.mg2 body .mg-login { height: 4.4cqh; font-size: 1.9cqh; padding: 0 1.6cqh; border-radius: 2.2cqh; }
html.mg2 body .mg-bets { width: calc(var(--chipW) * 5.4 + 5 * 1cqh + 8cqh); gap: .4cqh; }
html.mg2 body .mg-msg { height: 3.6cqh; } html.mg2 body #hudMsg { font-size: 2.9cqh; line-height: 3.6cqh; letter-spacing: .1cqh; }
html.mg2 body .mg-arr { width: 3.6cqh; font-size: 2.6cqh; }
html.mg2 body #betRow { height: calc(var(--chipH) + .6cqh); }
html.mg2 body .mg-track { gap: 1cqh; padding: .3cqh 0; }
html.mg2 body .mg-track .mg-chip { border-radius: .9cqh; border-width: .25cqh; padding: 0 .5cqh; }
/* окна-модалки (правила, настройки, авто, бонусы) — по размеру окна браузера, как и раньше (вне сцены) */
html.mg2 body .mg-track .mg-chip b { font-size: calc(var(--chipH) * .37); letter-spacing: -.01em; }
html.mg2 body .mg-track .mg-chip small { font-size: calc(var(--chipH) * .145); letter-spacing: 0; }
/* правила — в меню (пункт «Rules»), чтобы в полосе хватило места балансу */
html.mg2 body #infoBtn { display: none; }
html.mg2 body .mg-spd { gap: .5cqh; } html.mg2 body .mg-spd small { font-size: calc(var(--rb) * .135); }
/* узкий кадр (16:10) — «Lobby» иконкой */
@container (max-aspect-ratio: 17/10) { html.mg2 body .mg-lobby span { display: none; } html.mg2 body .mg-lobby { width: var(--ic); padding: 0; justify-content: center; } }
/* очень маленький кадр (телефон в портрете): мелкие подписи, которые там уже не читаются, убираются; цифры и кнопки остаются */
@container (max-height: 300px) { html.mg2 body .mg-spd small, html.mg2 body .mg-start .arc, html.mg2 body .mg-track .mg-chip small { display: none; } html.mg2 body .mg-track .mg-chip b { font-size: calc(var(--chipH) * .4); } }
/* плашки игры слева: ширина по содержимому (в пределах колонки), чтобы «×1000», «BOTH WAYS» помещались целиком */
html.mg2 body .mg-badge { width: auto; min-width: 7.6cqw; max-width: 10.4cqw; padding-left: 1.2cqh; padding-right: 1.2cqh; }
html.mg2 body .mg-badge.hot b { font-size: 4.2cqh; } html.mg2 body .mg-badge small { font-size: 1.8cqh; letter-spacing: .05em; }
@container (max-height: 300px) { html.mg2 body .mg-badge.hot b { font-size: 3.4cqh; } html.mg2 body .mg-badge { padding-left: .6cqh; padding-right: .6cqh; } }
@container (max-height: 300px) { html.mg2 body .mg-badge b { font-size: 4cqh; } }
html.mg2 { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* без «раздувания» мелкого текста мобильным браузером — шрифты в кадре строго в долях его высоты */

/* полоса управления — подложка на всю ширину экрана (как у EGT), а не только под кадром: без резкого обрыва по бокам */
html.mg2 body::before { content: ""; position: fixed; left: 0; right: 0; z-index: 1; pointer-events: none;
  top: calc(var(--stTop) + var(--stH) * .845); height: calc(var(--stH) * .155);
  background: linear-gradient(90deg, transparent 0, rgba(217,178,90,.42) 18%, rgba(217,178,90,.42) 82%, transparent 100%) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.5) 30%, rgba(0,0,0,.82) 100%); }
html.mg2 body .mg-panel { background: none; } html.mg2 body .mg-panel::before { display: none; }
/* ставки: только целые фишки — ряд ровно на 5 фишек, выбранная по центру, стрелки листают по одной; без полупрозрачных краёв */
html.mg2 body .mg-bets { width: auto; }
html.mg2 body .mg-betline { justify-content: center; }
html.mg2 body #betRow { flex: none; width: calc(var(--chipW) * 5 + 4cqh); -webkit-mask-image: none !important; mask-image: none !important; }
/* колонка кнопок неподвижна во всех состояниях: сетка с фиксированными ячейками.
   1 — АВТО / ВЗЯТЬ (на одном месте), 2 — СТАРТ, 3 — скорость / ×2 (на одном месте), 4 — «купить бонус» (место есть всегда) */
html.mg2 body .mg-round { display: grid; grid-template-columns: 100%; grid-template-rows: var(--rb) var(--st) var(--rb) 9.2cqh; row-gap: 1.8cqh; justify-items: center; align-items: center; align-content: center; }
html.mg2 body #autoBtn, html.mg2 body #rbTake { grid-row: 1; grid-column: 1; }
html.mg2 body #spinBtn { grid-row: 2; grid-column: 1; }
html.mg2 body #turboBtn, html.mg2 body #rbGamble { grid-row: 3; grid-column: 1; }
html.mg2 body .mg-round > .pig-buy { grid-row: 4; grid-column: 1; margin: 0; }
html.mg2 body .mg-round > * { animation: none !important; }
html.mg2 body .mg-round.offer .mg-take, html.mg2 body .mg-round.offer .mg-gx2 { animation: mg2fade .2s ease !important; } @keyframes mg2fade { from { opacity: 0; } }
/* нижняя полоса: баланс и выигрыш — по центру ряда ставок, с отступом снизу (не «прилипают» к краю) */
html.mg2 body .mg-panel { padding-bottom: 2cqh; }
html.mg2 body .mg-left, html.mg2 body .mg-right { align-self: end; height: calc(var(--chipH) + .6cqh); padding-bottom: 0; align-items: center; }
html.mg2 body .mg-panel .mg-lcd { justify-content: center; gap: .3cqh; }

/* ============================================================================================
   v3 (2026-11-28): ТЕЛЕФОН В ПОРТРЕТЕ — как у EGT на телефоне (сняты эталоны 40 Super Hot и Porko Collect в iPhone-режиме):
   кадр 9:16 по ширине экрана, равномерный масштаб (сверху/снизу — фон игры). Внутри кадра (доли высоты кадра):
   табло 2×2 вокруг логотипа 19.5% · доска на всю ширину ~45% · строка «баланс | сообщение | последний выигрыш» 6.6% ·
   5 целых фишек 7.2% · ряд кнопок [×2] АВТО (СТАРТ) [+] [купить] 13.6% · низ: «Lobby», скорость под СТАРТом, звук, меню.
   ============================================================================================ */
@media (max-aspect-ratio: 19/20) {
  :root.mg2 { --stW: min(var(--vw), var(--vh) * .5625); --stH: calc(var(--stW) / .5625);
    --rb: 8.2cqh; --st: 13.2cqh; --chipH: 6.6cqh; --chipW: calc((100cqw - 4cqw - 7.2cqw) / 5); --ic: 5cqh; }
  html.mg2 body::before { display: none; }
  html.mg2 body .mg-app { width: var(--stW); height: var(--stH); padding: 0 2cqw;
    grid-template-columns: 1fr 1.1fr 1.4fr 1.1fr 1fr;
    grid-template-rows: 19.5% auto 6.6% 7.4% minmax(0, 1fr) 13.6% 7% 1.6%;
    grid-template-areas: "jp jp jp jp jp" "st st st st st" "bl bl ms wn wn" "bt bt bt bt bt" ". . . . ." "gx au sp pl by" "lb . sd so mn" ". . . . ."; }
  html.mg2 body .mg-main, html.mg2 body .mg-round, html.mg2 body .mg-panel, html.mg2 body .mg-left, html.mg2 body .mg-right, html.mg2 body .mg-bets, html.mg2 body .mg-icons { display: contents; }
  html.mg2 body .mg-side, html.mg2 body #infoBtn, html.mg2 body .mg-arr, html.mg2 body #bet { display: none !important; }
  /* верх: ♠ ♥ / ♦ ♣ по бокам, логотип по центру (как у EGT) */
  html.mg2 body .mg-jp { grid-area: jp; width: 100%; height: 100%; padding: .8cqh 0 .4cqh; gap: 1.2cqh 0; align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, .5fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr 1.55fr; grid-template-areas: "j0 . j1" "j2 . j3" "logo logo logo"; }
  html.mg2 body .mg-jc { height: 5cqh; } html.mg2 body .mg-jc.j1 .pl, html.mg2 body .mg-jc.j3 .pl { margin-left: auto; } html.mg2 body .mg-jc.j0 .pl, html.mg2 body .mg-jc.j2 .pl { margin-right: auto; }
  html.mg2 body .mg-jc.jpa { justify-content: flex-start; } html.mg2 body .mg-jc.j1, html.mg2 body .mg-jc.j3 { justify-content: flex-end !important; }
  html.mg2 body .mg-title { height: 100%; min-height: 0; } html.mg2 body .mg-title.mg-logo img { width: auto; height: 100%; max-width: 86%; max-height: 8.6cqh; object-fit: contain; }
  html.mg2 body .mg-title b { font-size: 4.2cqh; white-space: nowrap; text-align: center; line-height: 1.05; }
  /* доска: на всю ширину, по центру своей строки */
  /* доска сразу под табло (как у EGT); строка — по высоте доски (MGT.lay.shrink), свободное место — между ставками и кнопками */
  html.mg2 body .mg-stage { grid-area: st; grid-column: 1 / -1; width: 100% !important; height: 44.3cqh !important; }
  /* строка: баланс | сообщение | последний выигрыш */
  html.mg2 body .mg-panel .mg-lcd.cr { grid-area: bl; width: 100%; align-self: center; text-align: left; align-items: flex-start; }
  html.mg2 body .mg-panel .mg-lcd.win { grid-area: wn; width: 100%; align-self: center; text-align: right; align-items: flex-end; }
  html.mg2 body .mg-panel .mg-lcd small { font-size: 1.55cqh; } html.mg2 body .mg-panel .mg-lcd b { font-size: 2.6cqh; }
  html.mg2 body .mg-msg { grid-area: ms; height: 100%; align-self: center; overflow: hidden; display: flex; align-items: center; justify-content: center; }
  html.mg2 body #hudMsg { font-size: 1.7cqh; line-height: 2.1cqh; white-space: normal; text-align: center; max-height: 6.4cqh; overflow: hidden; }
  html.mg2 body .mg-betline { grid-area: bt; align-self: center; justify-content: center; }
  html.mg2 body #betRow { width: calc(var(--chipW) * 5 + 7.2cqw); height: calc(var(--chipH) + .6cqh); }
  html.mg2 body .mg-track { gap: 1.8cqw; } html.mg2 body .mg-track .mg-chip { border-radius: .9cqh; }
  /* кнопки: неподвижные ячейки */
  html.mg2 body #rbGamble { grid-area: gx; justify-self: center; align-self: center; }
  html.mg2 body #autoBtn, html.mg2 body #rbTake { grid-area: au; justify-self: center; align-self: center; }
  html.mg2 body #spinBtn { grid-area: sp; justify-self: center; align-self: center; }
  html.mg2 body #topPlus { grid-area: pl; justify-self: center; align-self: center; width: var(--rb); height: var(--rb); font-size: 4cqh; border-width: .3cqh;
    background: radial-gradient(circle at 50% 22%, #4d7fa0 0%, #173a52 40%, #061826 72%, #000 100%); color: #fff; }
  html.mg2 body .mg-round > .pig-buy, html.mg2 body .pig-buy.inhud { grid-area: by; justify-self: center; align-self: center; width: 100%; max-width: 12cqh; height: 9.6cqh; margin: 0; }
  html.mg2 body #turboBtn { grid-area: sd; justify-self: center; align-self: center; width: calc(var(--rb) * 1.55); height: calc(var(--rb) * .55); border-radius: 999px; flex-direction: row; gap: .8cqw; }
  html.mg2 body .mg-spd small { font-size: calc(var(--rb) * .15); }
  /* низ */
  html.mg2 body .mg-lobby { grid-area: lb; justify-self: start; align-self: center; width: var(--ic); height: var(--ic); padding: 0; justify-content: center; }
  html.mg2 body .mg-lobby span { display: none; }
  html.mg2 body #soundBtn { grid-area: so; justify-self: center; align-self: center; display: grid !important; }
  html.mg2 body #setBtn { grid-area: mn; justify-self: end; align-self: center; }
  html.mg2 body .mg-ic { width: var(--ic); height: var(--ic); font-size: 2.2cqh; }
  html.mg2 body .mg-start .arc text { font-size: 7.4px; }
  /* «+» (пополнение) на телефоне не показывается; значения — строго в своих ячейках (шрифт ужимается скриптом) */
  html.mg2 body #topPlus { display: none !important; }
  html.mg2 body .mg-panel .mg-lcd { min-width: 0; max-width: 100%; overflow: hidden; }
  html.mg2 body .mg-panel .mg-lcd b, html.mg2 body .mg-panel .mg-lcd small { max-width: 100%; overflow: hidden; }
  /* без покупки (как 40 Super Hot): АВТО · СТАРТ · скорость — симметрично; внизу «Lobby» … звук, меню */
  html.mg2 body .mg-app { grid-template-areas: "jp jp jp jp jp" "st st st st st" "bl bl ms wn wn" "bt bt bt bt bt" ". . . . ." "gx au sp sd ." "lb . . so mn" ". . . . ."; }
  html.mg2 body #turboBtn { width: var(--rb); height: var(--rb); border-radius: 50%; flex-direction: column; gap: .3cqh; }
  html.mg2 body .mg-spd small { font-size: calc(var(--rb) * .13); }
  /* правки владельца 29.11 (игры без покупки): ровный вертикальный ритм доска → строка выигрыша → ставки → СТАРТ → низ;
     при удвоении «Взять» слева от СТАРТа, «×2» справа, с зазорами; звук и меню рядом справа */
  html.mg2 body .mg-app { --rb: 7.6cqh; grid-template-columns: 1fr 1.25fr 1.5fr 1.25fr 1fr;
    grid-template-rows: 19.5% auto minmax(1cqh, 1.45fr) 6.6% 7.4% minmax(1.8cqh, .55fr) 13.6% minmax(1.8cqh, 1fr) 7% 1.2%; /* владелец 29.11 (4): фишки ниже, ближе к ряду СТАРТ (зазор остаётся) */
    grid-template-areas: "jp jp jp jp jp" "st st st st st" ". . . . ." "bl bl ms wn wn" "bt bt bt bt bt" ". . . . ." "gx au sp sd ." ". . . . ." "lb . . sm sm" ". . . . ."; }
  html.mg2 body #rbGamble { grid-area: sd; }
  html.mg2 body .mg-stage { height: 39.6cqh !important; } /* = 100% − остальные ряды (с минимальными зазорами) */
  html.mg2 body #soundBtn { grid-area: sm; justify-self: end; margin-right: calc(var(--ic) + 2cqw); }
  html.mg2 body #setBtn { grid-area: sm; justify-self: end; }
  /* с покупкой (как Porko Collect): верх 25.5% (табло 2×2, копилка, логотип), доска сразу под ним на всю ширину,
     строка выигрыша, сообщение, фишки, кнопки [×2] АВТО СТАРТ [КУПИТЬ — крупно], низ: «Lobby» баланс скорость звук меню */
  html.mg2 body .mg-app:has(.pig-buy) #rbGamble { grid-area: gx; }
  html.mg2 body .mg-app:has(.pig-buy) #soundBtn { grid-area: sm; justify-self: end; margin-right: calc(var(--ic) + 2cqw); } /* звук вплотную к меню (владелец 29.11 (3)) */
  html.mg2 body .mg-app:has(.pig-buy) #setBtn { grid-area: sm; justify-self: end; }
  html.mg2 body .mg-app:has(.pig-buy) { --rb: 8.2cqh; grid-template-columns: 1fr 1.1fr 1.4fr 1.1fr 1fr; --st: 11.8cqh;
    grid-template-rows: 24.5% auto minmax(0, .9fr) 3.4% 7.4% minmax(1.8cqh, 1fr) 12% 6.6% .8%; /* между фишками и кнопками — зазор ≥1.8%; свободное место делится — фишки ниже (владелец 29.11 (4)) */
    grid-template-areas: "jp jp jp jp jp" "st st st st st" ". . . . ." "ms ms ms ms ms" "bt bt bt bt bt" ". . . . ." "gx au sp by by" "lb bl sd sm sm" ". . . . ."; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-jp { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr 1.5fr; grid-template-areas: "j0 pt j1" "j2 pt j3" "logo logo logo"; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-stage { height: 43.5cqh !important; }
  /* «последний выигрыш» — по нижнему краю доски, в полосе под рамкой (как у Porko) */
  html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.win { grid-area: st; align-self: end; z-index: 3; margin-bottom: .2cqh; pointer-events: none; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.win { flex-direction: row; justify-content: center; align-items: baseline; gap: 2cqw; text-align: center; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.win small { font-size: 1.6cqh; } html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.win b { font-size: 2.1cqh; }
  html.mg2 body .mg-app:has(.pig-buy) #hudMsg { font-size: 2cqh; line-height: 3.4cqh; white-space: nowrap; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.cr { text-align: center; align-items: center; }
  html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.cr small { font-size: 1.4cqh; } html.mg2 body .mg-app:has(.pig-buy) .mg-panel .mg-lcd.cr b { font-size: 2.3cqh; }
  html.mg2 body .mg-app:has(.pig-buy) #turboBtn { width: 100%; max-width: calc(var(--rb) * 1.55); height: calc(var(--rb) * .55); border-radius: 999px; flex-direction: row; gap: .8cqw; align-self: end; margin-bottom: .2cqh; } /* под СТАРТом с явным зазором (как у EGT) */
  html.mg2 body .mg-app:has(.pig-buy) #spinBtn { align-self: start; }
  html.mg2 body .mg-round > .pig-buy, html.mg2 body .pig-buy.inhud { width: 92%; max-width: none; height: 10.6cqh; }
}

/* ============================================================================================
   окно «Информация» (2026-11-29): шапка, вкладки-разделы (липкие), разделы с крупными картинками; на телефоне — прокрутка по разделам
   ============================================================================================ */
html.mg2 body .mg-info .mg-icard { width: min(900px, 100%); max-height: min(92dvh, 900px); padding: 0; display: flex; flex-direction: column; overflow: hidden; text-align: left; }
html.mg2 body .mg-info .mg-x { z-index: 3; }
.mg2 .mg-ihead { flex: none; padding: 16px 56px 10px 20px; border-bottom: 1px solid rgba(217,178,90,.25); }
.mg2 .mg-ihead b { display: block; font: 600 22px/1.1 "Oswald", var(--mg-ui); letter-spacing: 2px; text-transform: uppercase; color: #f2d27a; }
.mg2 .mg-ihead small { display: block; margin-top: 3px; font: 700 11px var(--mg-ui); letter-spacing: 2px; color: #a8916a; }
.mg2 .mg-itabs { flex: none; display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; scrollbar-width: none; background: rgba(0,0,0,.25); border-bottom: 1px solid rgba(217,178,90,.18); }
.mg2 .mg-itabs::-webkit-scrollbar { display: none; }
.mg2 .mg-itabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid rgba(217,178,90,.35); background: rgba(0,0,0,.35); color: #e8dcc0; font: 700 13px var(--mg-ui); cursor: pointer; white-space: nowrap; }
.mg2 .mg-itabs button i { color: #d9b25a; font-size: 13px; }
.mg2 .mg-itabs button.on { background: linear-gradient(180deg, #86d84e, #3e9c24 55%, #1b5c10); border-color: #e9d27a; color: #fff; } .mg2 .mg-itabs button.on i { color: #fff6b8; }
.mg2 .mg-ibody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 22px; scroll-behavior: smooth; }
.mg2 .mg-isec { padding: 16px 0 10px; border-bottom: 1px solid rgba(217,178,90,.14); } .mg2 .mg-isec:last-child { border-bottom: 0; }
.mg2 .mg-isec h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 18px "Oswald", var(--mg-ui); letter-spacing: 1.5px; text-transform: uppercase; color: #f2d27a; }
.mg2 .mg-isec h4 i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: #1a1206; background: linear-gradient(180deg, #ffe9a0, #c8891e); }
.mg2 .mg-icap { margin: 0 0 10px; font: 500 13px var(--mg-ui); color: #cbbca4; } .mg2 .mg-icap b { color: #fff; font-family: "Oswald", sans-serif; }
.mg2 .mg-ipay { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0; }
.mg2 .mg-ipay .pt { padding: 12px 8px 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.35)); border: 1px solid rgba(217,178,90,.25); }
.mg2 .mg-ipay .pt .im img { width: 76px; height: 76px; } .mg2 .mg-ipay .pt .im img:only-child { width: 92px; height: 92px; }
.mg2 .mg-scard { display: flex; gap: 14px; align-items: flex-start; padding: 12px; margin-bottom: 10px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(217,178,90,.25); }
.mg2 .mg-scard .im { flex: none; display: flex; } .mg2 .mg-scard .im img { width: 96px; height: 96px; object-fit: contain; }
.mg2 .mg-scard .tx { min-width: 0; } .mg2 .mg-scard .nm { display: block; font: 600 18px "Oswald", sans-serif; letter-spacing: 1px; color: #f0c040; margin-bottom: 4px; }
.mg2 .mg-scard p { margin: 0 0 6px; font: 500 14px/1.5 var(--mg-ui); color: #e3d7bf; }
.mg2 .mg-scard .pays { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 16px "Oswald", sans-serif; color: #fff; } .mg2 .mg-scard .pays i { font-style: normal; color: #f0c040; margin-right: 6px; }
.mg2 .mg-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin-bottom: 8px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(217,178,90,.18); font: 500 14px/1.55 var(--mg-ui); color: #e3d7bf; }
.mg2 .mg-step em { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 15px "Oswald", sans-serif; font-style: normal; color: #1a1206; background: linear-gradient(180deg, #ffe9a0, #c8891e); }
.mg2 .mg-step b { color: #f2d27a; }
.mg2 .mg-gen { margin: 0; padding-left: 20px; font: 500 14px/1.6 var(--mg-ui); color: #d8ccb2; } .mg2 .mg-gen li { margin: 6px 0; }
.mg2 .mg-isec .lines { margin: 0; }
@media (max-aspect-ratio: 19/20) {
  html.mg2 body .mg-info { padding: 0; }
  html.mg2 body .mg-info .mg-icard { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .mg2 .mg-ihead { padding: calc(12px + env(safe-area-inset-top)) 56px 8px 14px; } .mg2 .mg-ihead b { font-size: 18px; }
  .mg2 .mg-itabs { padding: 8px 10px; } .mg2 .mg-itabs button { height: 34px; padding: 0 12px; font-size: 12px; }
  .mg2 .mg-ibody { padding: 0 12px calc(20px + env(safe-area-inset-bottom)); }
  .mg2 .mg-ipay { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .mg2 .mg-ipay .pt .im img { width: 60px; height: 60px; } .mg2 .mg-ipay .pt .im img:only-child { width: 72px; height: 72px; }
  .mg2 .mg-scard .im img { width: 72px; height: 72px; } .mg2 .mg-scard p, .mg2 .mg-step { font-size: 13px; }
}
html.mg2 body #paytable[hidden], html.mg2 body #rulesSrc[hidden] { display: none !important; }
@media (min-aspect-ratio: 19/20) { .mg2 .mg-itabs { flex-wrap: wrap; overflow-x: visible; } }
/* «Линии» в окне информации (владелец 29.11 (3)): компактная сетка мини-схем с номерами — 5 в ряд на телефоне, 9–10 на ПК */
html.mg2 body .mg-isec .lines { grid-column: auto; padding: 0; border: 0; border-radius: 0; background: none; }
html.mg2 body .mg-isec .lines .h { margin: 0 0 8px; text-align: left; font: 600 13px "Oswald", sans-serif; letter-spacing: 1px; color: #cbbca4; }
html.mg2 body .mg-isec .lines .lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
html.mg2 body .mg-isec .lines .ln { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; padding: 4px 5px 5px; border-radius: 6px; background: rgba(0,0,0,.35); border: 1px solid rgba(217,178,90,.18); }
html.mg2 body .mg-isec .lines .ln b { min-width: 0; text-align: left; font: 600 11px/1 "Oswald", sans-serif; color: #f1dca0; }
html.mg2 body .mg-isec .lines .ln svg { display: block; width: 100%; height: auto; max-width: none; }
html.mg2 body .mg-isec .lines > div:not(.h):not(.lg) svg { display: block; width: min(220px, 70%); height: auto; } /* схема «243/27 ways» — одна компактная */
@media (max-aspect-ratio: 19/20) { html.mg2 body .mg-isec .lines .lg { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; } }
/* символы в окне информации никогда не выходят за свои рамки (владелец 29.11 (3)): несколько картинок в плитке сжимаются по ширине плитки */
html.mg2 body .mg-ipay .pt { min-width: 0; overflow: hidden; }
html.mg2 body .mg-ipay .pt .im, html.mg2 body .mg-scard .im { max-width: 100%; min-width: 0; align-items: center; }
html.mg2 body .mg-ipay .pt .im img, html.mg2 body .mg-scard .im img { flex: 0 1 auto; min-width: 0; height: auto; aspect-ratio: 1 / 1; object-fit: contain; margin: 0 -3px; }
html.mg2 body .mg-ipay .pt .im img:only-child, html.mg2 body .mg-scard .im img:only-child { margin: 0; }
html.mg2 body .mg-scard { min-width: 0; overflow: hidden; } html.mg2 body .mg-scard .im { max-width: 46%; }
@media (max-aspect-ratio: 19/20) {
  html.mg2 body .mg-scard .im img { width: 64px; }
  html.mg2 body .mg-scard:has(.im img + img) { flex-direction: column; gap: 8px; } /* несколько картинок — ряд картинок сверху, текст на всю ширину */
  html.mg2 body .mg-scard:has(.im img + img) .im { max-width: 100%; }
}
/* табло джекпотов (масти) ближе друг к другу — одинаково во всех играх (владелец 29.11): колонки ровно по ширине плашки, логотип по центру,
   вся группа по центру кадра с одинаковыми зазорами; в TB-играх своё табло (.tbj) — не трогаем */
@media (min-aspect-ratio: 19/20) { /* ПК / телефон боком; портрет — своя раскладка 2×2 ниже */
html.mg2 body .mg-app:not(:has(.tbj)) { --jpH: 8cqh; } /* как у EGT: плашки чуть крупнее и почти вплотную, логотип между ними */
html.mg2 body .mg-app:not(:has(.tbj)) .mg-jp { justify-content: center; column-gap: .6cqw; padding-left: .6cqw; padding-right: .6cqw;
  grid-template-columns: repeat(2, calc(var(--jpH) * 4)) minmax(0, 1fr) repeat(2, calc(var(--jpH) * 4)); }
}
@media (max-aspect-ratio: 19/20) {
  html.mg2 body .mg-app:not(:has(.tbj)):not(:has(.pig-buy)) .mg-jp { justify-content: center; column-gap: 3cqw; grid-template-columns: calc(5cqh * 4) 0 calc(5cqh * 4); }
}
/* СТАРТ во время спина = СТОП (владелец 29.11): иконка «стоп», нажатие — мгновенный скип; после остановки — короткая пауза (кнопка погашена) */
.mg2 .mg-start .mg-stpi { display: none; }
.mg2 .mg-start.stop .mg-spi { display: none; }
.mg2 .mg-start.stop .mg-stpi { display: block; animation: none !important; font-size: calc(var(--st) * .34); margin-top: 0; }
.mg2 .mg-start.stop .arc { opacity: 0; }
.mg2 .mg-start.cool { filter: grayscale(.85) brightness(.62); cursor: default; }
.mg2 .mg-start.cool:active { transform: none; }
.mg2 .mg-start { transition: filter .15s; }

