/* MA | HEAVEN V3 — shared shell for HOME / SLOT / DICE / CARD */
:root{--mh-bg:#050505;--mh-panel:#101010;--mh-line:#544322;--mh-gold:#c9a45b;--mh-gold2:#f0d58c;--mh-muted:#9d988e;--mh-green:#65dc9a}
html,body{max-width:100%;overflow-x:hidden}
body{padding-top:env(safe-area-inset-top,0)}
.header,.homeHeader{min-height:62px;height:62px;background:#050505f5;border-bottom:1px solid #6f5a31;box-shadow:0 8px 28px #000b;backdrop-filter:blur(12px)}
.header{padding:0 18px;gap:24px}.homeHeader{padding-left:18px;padding-right:18px}
.logo,.brand{font-size:22px;letter-spacing:3px}.logo small,.brand small{font-size:6px;letter-spacing:2.5px}
.nav,.topNav{gap:25px;font-size:12px;align-self:stretch;align-items:center}
.nav a,.topNav a{display:flex;align-items:center;height:100%;padding:0 0;border-bottom:2px solid transparent;text-decoration:none;color:#9d9a92}
.nav a:hover,.nav a.active,.topNav a:hover,.topNav a.active{color:#f1d48b;border-bottom-color:#d4b15e}
.profile,.accountArea{min-width:0}.profile b,.accountArea b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px;display:block}
.soundToggle,.soundButton{flex:0 0 auto}
.layout,.homeShell{max-width:1540px;margin-left:auto;margin-right:auto;grid-template-columns:220px minmax(0,1fr) 300px;gap:14px;padding:14px}
.cardPage{max-width:1540px!important;margin:0 auto;padding:14px 14px 28px!important}
.cardContentLayout{grid-template-columns:220px minmax(0,1fr) 300px!important;gap:14px!important}
.card,.panel,.cardSideLeft,.gameRightPanel{border-color:var(--mh-line);border-radius:10px;background:linear-gradient(180deg,#111,#090909);box-shadow:0 22px 60px #000d}
.left,.cardSideLeft,.homeSide{padding:12px}
.member,.memberBox{border-radius:8px;background:linear-gradient(180deg,#151515,#0b0b0b);border:1px solid #514225}
.tickets,.balanceCard{border-radius:8px;background:linear-gradient(145deg,#1c1913,#0d0d0d);border:1px solid #9b7c3c}
.menuItem,.powerLink{transition:.15s}.menuItem:hover,.powerLink:hover{background:#c9a45b0b;color:#f4dc9b}
.poster{border-radius:8px}
.right,.homeRight,.gameRightPanel{padding:13px}
.gameRightPanel{position:sticky;top:76px;max-height:calc(100vh - 92px);overflow:hidden}
.gameRightHead{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1px solid #2d2d2b}.gameRightHead b{font-size:13px;color:#efe4cf}.gameRightHead span{font-size:9px;color:#e1d3b0}.gameRightHead .liveDot{color:var(--mh-green)}
.gameRightNotice{padding:11px 0;min-height:130px;color:#bdb8af;font-size:10px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.gameRightNotice a{color:#e8cb82;text-decoration:underline}.gameRightDivider{height:1px;background:#292929;margin:2px 0 13px}
.gameLiveFeed{max-height:390px!important;overflow:auto!important}.gameLiveItem{padding:9px 0!important;border-bottom:1px solid #292929!important;background:transparent!important;border-radius:0!important}.gameLiveEmpty{padding:14px 0;color:#6f6b64;font-size:10px}
.mobileNav{z-index:110}

@media(max-width:1150px) and (min-width:761px){
  .layout,.homeShell{grid-template-columns:190px minmax(0,1fr)}
  .right,.homeRight{grid-column:1/-1;position:static;max-height:none}
  .cardContentLayout{grid-template-columns:190px minmax(0,1fr)!important}
  .gameRightPanel{grid-column:1/-1;position:static;max-height:none;display:grid;grid-template-columns:1fr 1fr;gap:14px}
  .gameRightPanel .gameRightDivider{display:none}.gameRightPanel .gameLiveFeed{max-height:260px!important}
}

@media(max-width:760px){
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0))!important}
  .header,.homeHeader{height:58px;min-height:58px;padding:0 8px!important;gap:6px!important;top:0}
  .logo,.brand{font-size:16px!important;letter-spacing:2px!important;min-width:0;overflow:hidden;text-overflow:ellipsis}.logo small,.brand small{display:none!important}
  .nav,.topNav{display:none!important}
  .profile,.accountArea{margin-left:auto!important;gap:5px!important}.profile>div:not(.avatar),.accountArea .accountName{display:none!important}
  .profile .avatar,.accountArea .avatar,.avatar{width:32px!important;height:32px!important;flex:0 0 32px}.profile .btn,.accountArea .logoutBtn,.headerLogin{padding:7px 8px!important;font-size:9px!important;white-space:nowrap}
  .soundToggle,.soundButton{width:32px!important;height:32px!important;padding:0!important;font-size:13px!important}

  .layout{display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;padding:7px!important;gap:9px!important}
  .layout .machine{order:1}.layout .left{order:2;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;padding:9px!important}.layout .right{order:3}
  .layout .left .member,.layout .left .tickets{margin:0!important}.layout .left .menu{grid-column:1/-1;margin:0!important;display:grid;grid-template-columns:1fr 1fr;gap:5px}.layout .left .menuItem{border:1px solid #292929;border-radius:7px;padding:10px 8px!important}.layout .left .poster{grid-column:1/-1;margin:0!important;min-height:110px}
  .layout .right{padding:9px!important}.layout .infoBody{min-height:0!important}.layout .feed{max-height:300px!important}

  .cardPage{width:100%!important;max-width:none!important;padding:7px 7px 12px!important}
  .cardContentLayout{display:flex!important;flex-direction:column!important;gap:9px!important}
  .cardGameColumn{order:1;width:100%;min-width:0}.cardSideLeft{order:2;position:static!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:9px!important}.gameRightPanel,.gameLivePanel{order:3;position:static!important;max-height:none!important;width:100%}
  .cardSideLeft .member,.cardSideLeft .tickets{margin:0!important}.cardSideLeft .menu{grid-column:1/-1!important;margin:0!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}.cardSideLeft .menuItem{border:1px solid #292929;border-radius:7px;padding:10px 8px!important}.cardSideLeft .poster{grid-column:1/-1!important;margin:0!important;min-height:110px}
  .gameRightPanel{padding:9px!important}.gameRightNotice{min-height:0}.gameLiveFeed{max-height:300px!important}

  .homeShell{display:flex!important;flex-direction:column!important;padding:7px!important;gap:9px!important;width:100%!important;max-width:none!important}.homeMain{order:1}.homeSide{order:2}.homeRight{order:3}
  .mobileNav{display:grid!important;position:fixed!important;left:6px!important;right:6px!important;bottom:calc(5px + env(safe-area-inset-bottom,0))!important;height:58px!important;grid-template-columns:repeat(8,1fr)!important;border:1px solid #6a542c!important;border-radius:14px!important;background:linear-gradient(180deg,#15130fef,#080808f5)!important;box-shadow:0 12px 40px #000e,0 0 0 1px #fff1bd0a!important;backdrop-filter:blur(10px);padding:4px!important}
  .mobileNav a,.mobileNav .mobileNavItem{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;color:#8f8b82!important;font-size:16px!important;border-radius:10px!important;text-decoration:none!important;min-width:0!important}.mobileNav a span,.mobileNav .mobileNavItem span{font-size:8px!important;letter-spacing:1px!important}.mobileNav a.active,.mobileNav .mobileNavItem.active{color:#f0d58c!important;background:#c9a45b12!important}
  .soundPanel{position:fixed!important;left:7px!important;right:7px!important;top:auto!important;bottom:70px!important;width:auto!important;z-index:120!important}
}

@media(max-width:420px){
  .layout .left,.cardSideLeft{grid-template-columns:1fr!important}.layout .left .menu,.layout .left .poster,.cardSideLeft .menu,.cardSideLeft .poster{grid-column:1!important}.layout .left .menu,.cardSideLeft .menu{grid-template-columns:1fr 1fr!important}
  .machineBottom{gap:4px!important}.smallBox{min-width:78px!important;padding-left:5px!important;padding-right:5px!important}.spin{min-width:0!important;max-width:48vw!important}
}

@media(max-width:340px){
  .layout .left .menu,.cardSideLeft .menu{grid-template-columns:1fr!important}.profile .btn,.accountArea .logoutBtn{font-size:8px!important;padding:6px!important}.logo,.brand{font-size:14px!important}.mobileNav{left:4px!important;right:4px!important}
}

@media(orientation:landscape) and (max-height:520px) and (max-width:950px){
  .header,.homeHeader{position:sticky}.mobileNav{height:52px!important}.soundPanel{bottom:62px!important}.gameRightPanel{max-height:none!important}
}
.cardTicketShopBtn{display:block;text-align:center;text-decoration:none}.gameLiveItem{font-size:11px;line-height:1.55;color:#bdb8af}.gameLiveWho{font-weight:800;color:#eee4cc}.gameLiveItem b{color:#d7b86d}.diceComing{min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.diceComing .diceIcon{font-size:72px;filter:drop-shadow(0 0 22px #c9a45b25)}
@media(max-width:760px){.diceComing{min-height:300px}.diceComing .diceIcon{font-size:56px}}
.gameLiveFeed .liveRow{padding:9px 0;border-bottom:1px solid #292929;font-size:11px;line-height:1.55;color:#bdb8af}.gameLiveFeed .liveRow .who{font-weight:800;color:#eee4cc}.gameLiveFeed .liveRow .prize{font-weight:900;color:#d7b86d}.gameLiveFeed .liveRow.lose .prize{color:#9f737b}

@media(max-width:430px){.mobileNav a,.mobileNav .mobileNavItem{font-size:14px!important}.mobileNav a span,.mobileNav .mobileNavItem span{font-size:7px!important;letter-spacing:0!important}}
