/* =========================================================
   MA | HEAVEN — UI CORE V1.1 SAFE
   SINGLE SOURCE OF TRUTH FOR SHARED WEBSITE/GAME CHROME
   REVISION: generic .panel selector removed from game scope

   OWNERSHIP LOCK:
   - Header / Navigation / Profile / Sound placement
   - Left POINT/TICKET/POINT SHOP / Quick Links / Brand card
   - Game page heading / balance / help button
   - Right Notice / Live Results
   - Shared modal / shared panel geometry / responsive shell
   - Shared visual chip identity

   DO NOT put gameplay logic, physics, payout, odds, API behavior,
   or center game-board mechanics in this file.

   Game-specific CSS may style ONLY its center gameplay area.
   ========================================================= */

/* MA | HEAVEN FINAL UI V1
   Final shared visual lock for HOME + all game shells.
   IMPORTANT:
   - shared chrome only
   - no game board / physics / payout / API / gameplay selectors
   - loaded LAST so old page-specific CSS cannot visually drift shared UI
*/

:root{
  --ma-bg:#080808;
  --ma-panel:#10100f;
  --ma-panel-2:#151411;
  --ma-panel-border:#34312b;
  --ma-border-soft:#302d27;
  --ma-border-strong:#4b4130;
  --ma-ivory:#f0eadf;
  --ma-muted:#99948a;
  --ma-muted-2:#77736d;
  --ma-gold:#b89a58;
  --ma-gold-2:#d6ba76;
  --ma-green:#64c98b;
  --ma-red:#d76d6d;
  --ma-radius-panel:16px;
  --ma-radius-card:12px;
  --ma-radius-control:10px;
  --ma-font-ui:Inter,"Pretendard","Noto Sans KR",Arial,sans-serif;

  /* Legacy game variable aliases retained for game-specific CSS. */
  --bg:var(--ma-bg);
  --panel:var(--ma-panel);
  --panel2:var(--ma-panel-2);
  --ivory:var(--ma-ivory);
  --ivory2:#ddd4c4;
  --text:#f5f2eb;
  --muted:var(--ma-muted);
  --line:#37332c;
  --gold:var(--ma-gold);
  --gold2:var(--ma-gold-2);
  --green:var(--ma-green);
  --red:var(--ma-red);
  --radius:var(--ma-radius-panel);
  --ma-font-display:Georgia,"Times New Roman",serif;
}

/* ---------- shared page atmosphere ---------- */
body.homeFinalV1,
body.gameShellV5.finalUiV1{
  background:var(--ma-bg)!important;
  color:#f5f2eb!important;
  font-family:var(--ma-font-ui)!important;
}

body.homeFinalV1 a,
body.gameShellV5.finalUiV1 a{text-decoration:none}

/* ---------- HEADER: exact same visual language ---------- */
body.homeFinalV1 .siteHeader,
body.gameShellV5.finalUiV1 .siteHeader{
  height:64px!important;
  position:sticky!important;
  top:0!important;
  z-index:80!important;
  display:grid!important;
  grid-template-columns:auto 1fr auto!important;
  align-items:center!important;
  gap:30px!important;
  padding:0 22px!important;
  background:#090909f7!important;
  border-bottom:1px solid #292722!important;
  backdrop-filter:blur(16px)!important;
}

body.homeFinalV1 .brand,
body.gameShellV5.finalUiV1 .brand{
  display:flex!important;
  flex-direction:column!important;
  line-height:1!important;
  width:auto!important;
}
body.homeFinalV1 .brand span,
body.gameShellV5.finalUiV1 .brand span{
  font:700 23px var(--ma-font-display)!important;
  letter-spacing:3px!important;
  color:var(--ma-ivory)!important;
}
body.homeFinalV1 .brand small,
body.gameShellV5.finalUiV1 .brand small{
  font-size:7px!important;
  letter-spacing:3px!important;
  color:#8f8060!important;
  margin-top:5px!important;
}

body.homeFinalV1 .categoryNav,
body.gameShellV5.finalUiV1 .categoryNav{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
body.homeFinalV1 .navItem,
body.gameShellV5.finalUiV1 .navItem{
  height:40px!important;
  padding:0 16px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:#9e9a91!important;
  font-family:var(--ma-font-ui)!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.6px!important;
  cursor:pointer!important;
}
body.homeFinalV1 .navItem:hover,
body.homeFinalV1 .navItem.active,
body.gameShellV5.finalUiV1 .navItem:hover,
body.gameShellV5.finalUiV1 .navItem.active{
  color:var(--ma-ivory)!important;
  background:#141310!important;
  border-color:var(--ma-border-strong)!important;
}
body.homeFinalV1 .navDropBtn span,
body.gameShellV5.finalUiV1 .navDropBtn span{color:var(--ma-gold-2)!important}

body.homeFinalV1 .headerTools,
body.gameShellV5.finalUiV1 .headerTools{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
body.homeFinalV1 .accountArea,
body.gameShellV5.finalUiV1 .accountArea{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
}
body.homeFinalV1 .avatar,
body.gameShellV5.finalUiV1 .avatar{
  width:36px!important;height:36px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  border:1px solid #77643d!important;
  background:#15130f!important;
  display:grid!important;place-items:center!important;
  font-weight:900!important;
  flex:0 0 auto!important;
}
body.homeFinalV1 .avatar img,
body.gameShellV5.finalUiV1 .avatar img{width:100%!important;height:100%!important;object-fit:cover!important}
body.homeFinalV1 .accountName b,
body.gameShellV5.finalUiV1 .accountName b{
  display:block!important;
  max-width:140px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  font-size:12px!important;
}
body.homeFinalV1 .accountName small,
body.gameShellV5.finalUiV1 .accountName small{
  display:block!important;color:var(--ma-muted-2)!important;font-size:9px!important;margin-top:2px!important;
}
body.homeFinalV1 .logoutBtn,
body.homeFinalV1 .headerLogin,
body.homeFinalV1 .iconBtn,
body.gameShellV5.finalUiV1 .logoutBtn,
body.gameShellV5.finalUiV1 .headerLogin,
body.gameShellV5.finalUiV1 .iconBtn{
  height:36px!important;
  min-height:36px!important;
  border:1px solid #49443a!important;
  border-radius:10px!important;
  background:#11110f!important;
  color:var(--ma-ivory)!important;
  padding:0 12px!important;
  font-family:var(--ma-font-ui)!important;
}
body.homeFinalV1 .iconBtn,
body.gameShellV5.finalUiV1 .iconBtn{width:40px!important;padding:0!important}

/* ---------- GAME dropdown ---------- */
body.homeFinalV1 .gameMenu,
body.gameShellV5.finalUiV1 .gameMenu{
  position:absolute!important;
  left:210px!important;
  top:58px!important;
  width:min(760px,calc(100vw - 260px))!important;
  padding:16px!important;
  border:1px solid #403a30!important;
  border-radius:14px!important;
  background:#0d0d0c!important;
  box-shadow:0 30px 80px #000d!important;
}
body.homeFinalV1 .gameMenuHead,
body.gameShellV5.finalUiV1 .gameMenuHead{
  display:flex!important;align-items:baseline!important;gap:10px!important;margin-bottom:12px!important;
}
body.homeFinalV1 .gameMenuHead span,
body.gameShellV5.finalUiV1 .gameMenuHead span{
  font:700 17px var(--ma-font-display)!important;color:var(--ma-ivory)!important;
}
body.homeFinalV1 .gameMenuHead small,
body.gameShellV5.finalUiV1 .gameMenuHead small{font-size:9px!important;color:var(--ma-muted)!important}
body.homeFinalV1 .gameMenuGrid,
body.gameShellV5.finalUiV1 .gameMenuGrid{
  display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;
}
body.homeFinalV1 .gameMenuGrid a,
body.gameShellV5.finalUiV1 .gameMenuGrid a{
  padding:12px!important;
  border:1px solid #2f2c26!important;
  border-radius:11px!important;
  background:#121210!important;
  display:grid!important;
  grid-template-columns:32px 1fr!important;
  grid-template-rows:auto auto!important;
  column-gap:8px!important;
  color:var(--ma-ivory)!important;
}
body.homeFinalV1 .gameMenuGrid a:hover,
body.homeFinalV1 .gameMenuGrid a.active,
body.gameShellV5.finalUiV1 .gameMenuGrid a:hover,
body.gameShellV5.finalUiV1 .gameMenuGrid a.active{
  border-color:#7c683f!important;background:#171510!important;
}
body.homeFinalV1 .gameMenuGrid b,
body.gameShellV5.finalUiV1 .gameMenuGrid b{grid-row:1/3!important;font-size:20px!important}
body.homeFinalV1 .gameMenuGrid span,
body.gameShellV5.finalUiV1 .gameMenuGrid span{font-weight:900!important;font-size:11px!important}
body.homeFinalV1 .gameMenuGrid small,
body.gameShellV5.finalUiV1 .gameMenuGrid small{font-size:9px!important;color:#8e8a82!important;margin-top:3px!important}

/* ---------- SHARED outer shell / side cards ---------- */
body.homeFinalV1 .homeShell,
body.gameShellV5.finalUiV1 .gameShell{
  max-width:1460px!important;
  margin:0 auto!important;
  padding:18px!important;
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr) 280px!important;
  gap:14px!important;
  align-items:start!important;
}
/* Shared shell panels only.
   Do NOT target generic .panel because CARD uses .cardStage.panel
   for the center gameplay board. */
body.homeFinalV1 .userPanel.panel,
body.homeFinalV1 .livePanel.panel,
body.gameShellV5.finalUiV1 .userPanel.panel,
body.gameShellV5.finalUiV1 .livePanel.panel{
  background:linear-gradient(180deg,#11110f,#0c0c0b)!important;
  border:1px solid var(--ma-panel-border)!important;
  border-radius:var(--ma-radius-panel)!important;
}
body.homeFinalV1 .userPanel,
body.gameShellV5.finalUiV1 .userPanel{
  padding:14px!important;
  height:max-content!important;
  position:sticky!important;
  top:82px!important;
}
body.homeFinalV1 .memberBox,
body.gameShellV5.finalUiV1 .memberBox{
  padding:12px!important;
  border:1px solid var(--ma-border-soft)!important;
  border-radius:12px!important;
  background:#141310!important;
}
body.homeFinalV1 .memberTop,
body.gameShellV5.finalUiV1 .memberTop{display:flex!important;align-items:center!important;gap:10px!important}
body.homeFinalV1 .memberTop .avatar,
body.gameShellV5.finalUiV1 .memberTop .avatar{width:44px!important;height:44px!important}
body.homeFinalV1 .memberText b,
body.gameShellV5.finalUiV1 .memberText b{
  display:block!important;font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.homeFinalV1 .memberText span,
body.gameShellV5.finalUiV1 .memberText span{font-size:9px!important;color:#8e8a82!important}
body.homeFinalV1 .memberGuest,
body.gameShellV5.finalUiV1 .memberGuest{font-size:9px!important;color:var(--ma-muted-2)!important;line-height:1.5!important}

body.homeFinalV1 .walletCard,
body.gameShellV5.finalUiV1 .walletCard{
  margin-top:10px!important;
  border:1px solid var(--ma-border-soft)!important;
  border-radius:12px!important;
  overflow:hidden!important;
}
body.homeFinalV1 .walletLine,
body.gameShellV5.finalUiV1 .walletLine{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:13px!important;
}
body.homeFinalV1 .walletLine+.walletLine,
body.gameShellV5.finalUiV1 .walletLine+.walletLine{border-top:1px solid #292722!important}
body.homeFinalV1 .walletLine span,
body.gameShellV5.finalUiV1 .walletLine span{font-size:10px!important;font-weight:900!important;letter-spacing:1px!important}
body.homeFinalV1 .walletLine small,
body.gameShellV5.finalUiV1 .walletLine small{display:block!important;font-size:8px!important;color:var(--ma-muted-2)!important;margin-top:3px!important}
body.homeFinalV1 .walletLine strong,
body.gameShellV5.finalUiV1 .walletLine strong{
  font-size:15px!important;color:var(--ma-ivory)!important;text-align:right!important;white-space:nowrap!important;
  max-width:115px!important;overflow:hidden!important;text-overflow:ellipsis!important;
}

body.homeFinalV1 .primaryBtn,
body.gameShellV5.finalUiV1 .primaryBtn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  border:1px solid #8c774a!important;
  border-radius:11px!important;
  background:var(--ma-ivory)!important;
  color:#111!important;
  padding:11px 13px!important;
  font-size:11px!important;
  font-weight:900!important;
}
body.homeFinalV1 .primaryBtn.full,
body.gameShellV5.finalUiV1 .primaryBtn.full{display:flex!important;width:100%!important;margin-top:10px!important}

body.homeFinalV1 .quickLinks,
body.gameShellV5.finalUiV1 .quickLinks{margin-top:12px!important}
body.homeFinalV1 .powerLink,
body.gameShellV5.finalUiV1 .powerLink{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:10px 2px!important;border-bottom:1px solid #272520!important;font-size:10px!important;color:#aaa69e!important;
}
body.homeFinalV1 .powerLink strong,
body.gameShellV5.finalUiV1 .powerLink strong{font-size:10px!important;color:#ded8ce!important}

body.gameShellV5.finalUiV1 .brandNote{
  margin-top:14px!important;
  padding:12px!important;
  border:1px solid #34312a!important;
  border-radius:11px!important;
  background:transparent!important;
}
body.gameShellV5.finalUiV1 .brandNote b{
  font-family:var(--ma-font-display)!important;
  font-size:17px!important;
  line-height:1.35!important;
  color:var(--ma-ivory)!important;
}
body.gameShellV5.finalUiV1 .brandNote p{
  color:#aaa49a!important;font-size:9px!important;line-height:1.8!important;margin:8px 0!important;
}
body.gameShellV5.finalUiV1 .brandNote small{
  color:#c9a954!important;letter-spacing:1px!important;font-size:9px!important;
}

/* ---------- Game heading / POINT / help: shared lock only ---------- */
body.gameShellV5.finalUiV1 .gameHeading{
  display:flex!important;
  justify-content:space-between!important;
  gap:16px!important;
  align-items:flex-end!important;
  margin-bottom:10px!important;
  padding:4px 4px 0!important;
}
body.gameShellV5.finalUiV1 .gameHeading>div>small{
  display:block!important;color:#b7954f!important;letter-spacing:3px!important;font-size:7px!important;
}
body.gameShellV5.finalUiV1 .gameHeading h1{
  font-family:var(--ma-font-display)!important;
  font-size:38px!important;
  line-height:1.05!important;
  margin:5px 0 4px!important;
  letter-spacing:1px!important;
  color:var(--ma-ivory)!important;
}
body.gameShellV5.finalUiV1 .gameHeading p{
  margin:0!important;color:#9b968d!important;font-size:10px!important;line-height:1.55!important;
}
body.gameShellV5.finalUiV1 .headingTools{
  display:flex!important;align-items:stretch!important;gap:8px!important;flex:0 0 auto!important;
}
body.gameShellV5.finalUiV1 .balanceBox{
  min-width:170px!important;min-height:54px!important;padding:9px 13px!important;
  border:1px solid #403827!important;border-radius:11px!important;background:#11100e!important;
  text-align:right!important;display:flex!important;flex-direction:column!important;justify-content:center!important;
}
body.gameShellV5.finalUiV1 .balanceBox span{
  display:block!important;font-size:7px!important;color:#827c72!important;letter-spacing:.04em!important;
}
body.gameShellV5.finalUiV1 .balanceBox b{
  display:block!important;margin-top:3px!important;font-size:16px!important;line-height:1.1!important;color:#e9d184!important;white-space:nowrap!important;
}
body.gameShellV5.finalUiV1 .textBtn{
  min-width:84px!important;min-height:54px!important;padding:0 14px!important;
  border:1px solid #4b4334!important;border-radius:11px!important;background:#11110f!important;
  color:var(--ma-ivory)!important;font-weight:900!important;font-size:10px!important;
}
body.gameShellV5.finalUiV1 .textBtn:hover{border-color:#6b5b3e!important;background:#15130f!important}

/* ---------- Right NOTICE / LIVE panel: identical on HOME + games ---------- */
body.homeFinalV1 .livePanel,
body.gameShellV5.finalUiV1 .livePanel{
  padding:13px!important;
  height:calc(100vh - 100px)!important;
  max-height:760px!important;
  position:sticky!important;
  top:82px!important;
  display:grid!important;
  grid-template-rows:auto 1fr!important;
  overflow:hidden!important;
}
body.homeFinalV1 .noticeSection,
body.gameShellV5.finalUiV1 .noticeSection{
  padding-bottom:14px!important;border-bottom:1px solid #2c2924!important;
}
body.homeFinalV1 .feedSection,
body.gameShellV5.finalUiV1 .feedSection{
  padding-top:14px!important;display:flex!important;flex-direction:column!important;min-height:0!important;
}
body.homeFinalV1 .panelTitle,
body.gameShellV5.finalUiV1 .panelTitle{
  display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:10px!important;
}
body.homeFinalV1 .panelTitle b,
body.gameShellV5.finalUiV1 .panelTitle b{font-size:12px!important;color:#f5f2eb!important}
body.homeFinalV1 .panelTitle span,
body.gameShellV5.finalUiV1 .panelTitle span{font-size:8px!important;color:#8e8a82!important}
body.homeFinalV1 .liveDot,
body.gameShellV5.finalUiV1 .liveDot{color:var(--ma-green)!important}
body.homeFinalV1 .rightNotice,
body.gameShellV5.finalUiV1 .rightNotice{
  font-size:10px!important;line-height:1.65!important;color:#9c978e!important;
  max-height:120px!important;overflow:auto!important;padding-right:3px!important;
}
body.homeFinalV1 .rightFeed,
body.gameShellV5.finalUiV1 .rightFeed{overflow:auto!important;min-height:0!important;padding-right:4px!important}
body.homeFinalV1 .liveItem,
body.gameShellV5.finalUiV1 .liveItem{
  position:relative!important;padding:10px 8px 10px 12px!important;
  border-bottom:1px solid #26241f!important;font-size:9px!important;line-height:1.45!important;color:#aaa59c!important;
}
body.homeFinalV1 .liveItem:before,
body.gameShellV5.finalUiV1 .liveItem:before{
  content:""!important;position:absolute!important;left:0!important;top:12px!important;bottom:12px!important;
  width:2px!important;border-radius:3px!important;background:#8a806d!important;
}
body.homeFinalV1 .liveItem.win:before,
body.gameShellV5.finalUiV1 .liveItem.win:before{background:var(--ma-green)!important}
body.homeFinalV1 .liveItem.lose:before,
body.gameShellV5.finalUiV1 .liveItem.lose:before{background:var(--ma-red)!important}
body.homeFinalV1 .liveItem.draw:before,
body.gameShellV5.finalUiV1 .liveItem.draw:before{background:var(--ma-gold-2)!important}
body.homeFinalV1 .liveItem .who,
body.gameShellV5.finalUiV1 .liveItem .who{color:#e8e1d7!important;font-weight:800!important}
body.homeFinalV1 .liveItem .prize,
body.gameShellV5.finalUiV1 .liveItem .prize{color:#d8c28b!important;font-weight:900!important}
body.homeFinalV1 .liveItem.win .prize,
body.gameShellV5.finalUiV1 .liveItem.win .prize{color:var(--ma-green)!important}
body.homeFinalV1 .liveItem.lose .prize,
body.gameShellV5.finalUiV1 .liveItem.lose .prize{color:var(--ma-red)!important}

/* Rules inside right rail stay game-specific in content, common in presentation */
body.gameShellV5.finalUiV1 .gameRuleGuide,
body.gameShellV5.finalUiV1 .diceGuide,
body.gameShellV5.finalUiV1 .rouletteGuide{
  padding:10px 0 0!important;
}
body.gameShellV5.finalUiV1 .gameRuleGuide b,
body.gameShellV5.finalUiV1 .diceGuide b,
body.gameShellV5.finalUiV1 .rouletteGuide b{
  font-size:9px!important;color:#d2bc84!important;
}
body.gameShellV5.finalUiV1 .gameRuleGuide p,
body.gameShellV5.finalUiV1 .diceGuide p,
body.gameShellV5.finalUiV1 .rouletteGuide p{
  font-size:8px!important;color:#9a958c!important;line-height:1.55!important;margin:6px 0!important;
}

/* ---------- Help modal / sound panel ---------- */
body.homeFinalV1 .helpBackdrop,
body.gameShellV5.finalUiV1 .helpBackdrop{background:#000b!important}
body.homeFinalV1 .helpCard,
body.gameShellV5.finalUiV1 .helpCard{
  border:1px solid #4b4334!important;
  border-radius:16px!important;
  background:#10100f!important;
  box-shadow:0 28px 90px #000d!important;
}
body.homeFinalV1 .helpHead h2,
body.gameShellV5.finalUiV1 .helpHead h2{
  font-family:var(--ma-font-display)!important;color:var(--ma-ivory)!important;
}
body.homeFinalV1 .helpSteps>div,
body.gameShellV5.finalUiV1 .helpSteps>div{
  border:1px solid var(--ma-border-soft)!important;border-radius:11px!important;background:#11110f!important;
}
body.homeFinalV1 .helpSteps b,
body.gameShellV5.finalUiV1 .helpSteps b{color:var(--ma-gold)!important}

body.homeFinalV1 .soundPanel,
body.gameShellV5.finalUiV1 .soundPanel{
  position:fixed!important;
  right:18px!important;
  top:70px!important;
  z-index:110!important;
  width:220px!important;
  padding:14px!important;
  border:1px solid #3e392e!important;
  border-radius:12px!important;
  background:#10100f!important;
  box-shadow:0 18px 50px #000b!important;
}
body.homeFinalV1 .soundPanel b,
body.gameShellV5.finalUiV1 .soundPanel b{color:var(--ma-ivory)!important}
body.homeFinalV1 .soundPanel label,
body.gameShellV5.finalUiV1 .soundPanel label{
  color:#aaa49a!important;font-size:10px!important;
}
body.homeFinalV1 .soundPanel button,
body.gameShellV5.finalUiV1 .soundPanel button{
  width:100%!important;height:36px!important;border:1px solid #403a2f!important;
  background:#171612!important;color:var(--ma-ivory)!important;border-radius:8px!important;
}

/* ---------- Shared casino chips: visual identity only, geometry stays page-owned ---------- */
body.gameShellV5.finalUiV1 .gameChip{
  --chip-center:#fffdf7;
  color:#101010!important;
}
body.gameShellV5.finalUiV1 .gameChip .gameChipValue{
  font-family:Arial,sans-serif!important;
  color:#0d0d0d!important;
  text-shadow:none!important;
}
body.gameShellV5.finalUiV1 .chipRow{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

/* ---------- HOME-specific typography, same brand mood without changing its content ---------- */
body.homeFinalV1 .hero h1,
body.homeFinalV1 .sectionHeader h2,
body.homeFinalV1 .gameText h3,
body.homeFinalV1 .infoCard h3,
body.homeFinalV1 .shopCard h3{
  font-family:var(--ma-font-display)!important;
  color:var(--ma-ivory)!important;
}
body.homeFinalV1 .heroTopline,
body.homeFinalV1 .sectionHeader small,
body.homeFinalV1 .infoCard small,
body.homeFinalV1 .shopCard small{color:#a88d53!important}
body.homeFinalV1 .gameCard,
body.homeFinalV1 .infoCard,
body.homeFinalV1 .shopCard{
  border-color:var(--ma-panel-border)!important;
  background:linear-gradient(180deg,#121210,#0d0d0c)!important;
}

/* ---------- responsive shared shell ---------- */
@media(max-width:1100px){
  body.homeFinalV1 .homeShell,
  body.gameShellV5.finalUiV1 .gameShell{
    grid-template-columns:190px minmax(0,1fr)!important;
  }
  body.homeFinalV1 .livePanel,
  body.gameShellV5.finalUiV1 .livePanel{display:none!important}
  body.homeFinalV1 .gameMenu,
  body.gameShellV5.finalUiV1 .gameMenu{left:160px!important}
}

@media(max-width:760px){
  body.homeFinalV1,
  body.gameShellV5.finalUiV1{padding-bottom:88px!important}
  body.homeFinalV1 .siteHeader,
  body.gameShellV5.finalUiV1 .siteHeader{
    height:68px!important;
    padding:0 14px!important;
    grid-template-columns:1fr auto!important;
    gap:8px!important;
  }
  body.homeFinalV1 .brand span,
  body.gameShellV5.finalUiV1 .brand span{font-size:22px!important;letter-spacing:2px!important}
  body.homeFinalV1 .brand small,
  body.gameShellV5.finalUiV1 .brand small{font-size:6px!important}
  body.homeFinalV1 .categoryNav,
  body.gameShellV5.finalUiV1 .categoryNav{display:none!important}
  body.homeFinalV1 .accountArea .accountName,
  body.homeFinalV1 .accountArea .logoutBtn,
  body.gameShellV5.finalUiV1 .accountArea .accountName,
  body.gameShellV5.finalUiV1 .accountArea .logoutBtn{display:none!important}
  body.homeFinalV1 .mobileMenuBtn,
  body.gameShellV5.finalUiV1 .mobileMenuBtn{display:inline-grid!important;place-items:center!important}
  body.homeFinalV1 .gameMenu,
  body.gameShellV5.finalUiV1 .gameMenu{display:none!important}
  body.homeFinalV1 .homeShell,
  body.gameShellV5.finalUiV1 .gameShell{display:block!important;padding:10px!important}
  body.homeFinalV1 .userPanel,
  body.gameShellV5.finalUiV1 .userPanel{display:none!important}

  body.gameShellV5.finalUiV1 .gameHeading{
    align-items:flex-start!important;
    flex-direction:column!important;
    padding:10px 2px!important;
  }
  body.gameShellV5.finalUiV1 .gameHeading h1{font-size:28px!important}
  body.gameShellV5.finalUiV1 .gameHeading p{font-size:10px!important}
  body.gameShellV5.finalUiV1 .headingTools{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    width:100%!important;
    margin-top:8px!important;
  }
  body.gameShellV5.finalUiV1 .balanceBox{
    min-width:0!important;min-height:52px!important;text-align:left!important;
  }
  body.gameShellV5.finalUiV1 .textBtn{
    min-width:92px!important;min-height:52px!important;padding:0 10px!important;
  }

  body.homeFinalV1 .soundPanel,
  body.gameShellV5.finalUiV1 .soundPanel{
    right:10px!important;
    left:10px!important;
    top:76px!important;
    width:auto!important;
  }
}


/* =========================================================
   FINAL UI V1.1 — PROFILE LAYOUT HARD LOCK
   Same profile structure on HOME + every game page.
   Visual-only: no auth / API / game logic changes.
   ========================================================= */

/* Header profile container */
body.homeFinalV1 .accountArea,
body.gameShellV5.finalUiV1 .accountArea{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  min-width:0!important;
  height:44px!important;
}

/* Avatar is always a fixed circle */
body.homeFinalV1 .accountArea>.avatar,
body.gameShellV5.finalUiV1 .accountArea>.avatar{
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  margin:0!important;
}

/* IMPORTANT:
   Some old page CSS made .accountName a horizontal flex row.
   Lock it to the same two-line column everywhere. */
body.homeFinalV1 .accountName,
body.gameShellV5.finalUiV1 .accountName{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:2px!important;
  min-width:0!important;
  max-width:150px!important;
  height:36px!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  text-align:left!important;
  white-space:normal!important;
}

body.homeFinalV1 .accountName b,
body.gameShellV5.finalUiV1 .accountName b{
  display:block!important;
  width:100%!important;
  max-width:150px!important;
  margin:0!important;
  padding:0!important;
  font-family:var(--ma-font-ui)!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:16px!important;
  color:var(--ma-ivory)!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

body.homeFinalV1 .accountName small,
body.gameShellV5.finalUiV1 .accountName small{
  display:block!important;
  position:static!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  font-family:var(--ma-font-ui)!important;
  font-size:8px!important;
  font-weight:500!important;
  line-height:11px!important;
  color:#77736d!important;
  white-space:nowrap!important;
  transform:none!important;
}

/* Logout button must never push the member label onto the same line */
body.homeFinalV1 .accountArea>.logoutBtn,
body.gameShellV5.finalUiV1 .accountArea>.logoutBtn{
  flex:0 0 auto!important;
  margin-left:2px!important;
  white-space:nowrap!important;
}

/* Left member card — same two-line identity block */
body.homeFinalV1 .memberTop,
body.gameShellV5.finalUiV1 .memberTop{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}

body.homeFinalV1 .memberText,
body.gameShellV5.finalUiV1 .memberText{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:3px!important;
  min-width:0!important;
  flex:1 1 auto!important;
  line-height:1!important;
}

body.homeFinalV1 .memberText b,
body.gameShellV5.finalUiV1 .memberText b{
  display:block!important;
  width:100%!important;
  margin:0!important;
  font-size:13px!important;
  font-weight:900!important;
  line-height:16px!important;
  color:var(--ma-ivory)!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

body.homeFinalV1 .memberText span,
body.gameShellV5.finalUiV1 .memberText span{
  display:block!important;
  position:static!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  font-size:8px!important;
  font-weight:500!important;
  line-height:11px!important;
  color:#77736d!important;
  white-space:nowrap!important;
  transform:none!important;
}

/* Mobile: account name is hidden by the existing shell rule.
   Keep avatar/sound/menu alignment stable. */
@media(max-width:760px){
  body.homeFinalV1 .accountArea,
  body.gameShellV5.finalUiV1 .accountArea{
    height:40px!important;
    gap:7px!important;
  }
}


/* =========================================================
   FINAL UI V1.2 — SHARED SHELL GEOMETRY HARD LOCK
   Locks dimensions that old per-game CSS previously left different.
   Shared chrome only. No center game-board / gameplay selectors.
   ========================================================= */

body.homeFinalV1 .siteHeader *,
body.gameShellV5.finalUiV1 .siteHeader *,
body.homeFinalV1 .userPanel *,
body.gameShellV5.finalUiV1 .userPanel *,
body.homeFinalV1 .livePanel *,
body.gameShellV5.finalUiV1 .livePanel *,
body.gameShellV5.finalUiV1 .gameHeading *{
  box-sizing:border-box!important;
}

/* Desktop shell columns must be physically identical on every game. */
@media(min-width:1101px){
  body.gameShellV5.finalUiV1 .gameShell{
    width:min(1460px,calc(100% - 36px))!important;
    max-width:1460px!important;
    grid-template-columns:220px minmax(0,1fr) 280px!important;
    column-gap:14px!important;
    row-gap:14px!important;
  }

  body.gameShellV5.finalUiV1 .gameShell>.userPanel{
    width:220px!important;
    min-width:220px!important;
    max-width:220px!important;
  }

  body.gameShellV5.finalUiV1 .gameShell>.livePanel{
    width:280px!important;
    min-width:280px!important;
    max-width:280px!important;
  }

  body.gameShellV5.finalUiV1 .gameShell>.gameMain{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }
}

/* Left rail outer card */
body.homeFinalV1 .userPanel,
body.gameShellV5.finalUiV1 .userPanel{
  box-sizing:border-box!important;
  padding:14px!important;
  border-width:1px!important;
  border-style:solid!important;
  border-color:var(--ma-panel-border)!important;
  border-radius:16px!important;
  height:max-content!important;
  min-height:0!important;
  overflow:hidden!important;
}

/* Member card: old game CSS varied between 66px / 78px / custom. */
body.homeFinalV1 .userPanel .memberBox,
body.gameShellV5.finalUiV1 .userPanel .memberBox{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:78px!important;
  padding:12px!important;
  margin:0!important;
  border:1px solid var(--ma-border-soft)!important;
  border-radius:12px!important;
  background:#141310!important;
  display:flex!important;
  align-items:center!important;
  overflow:hidden!important;
}

/* Logged-in identity fills exactly the same member-card geometry. */
body.homeFinalV1 .userPanel .memberTop,
body.gameShellV5.finalUiV1 .userPanel .memberTop{
  width:100%!important;
  min-width:0!important;
  min-height:52px!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
body.homeFinalV1 .userPanel .memberTop>.avatar,
body.gameShellV5.finalUiV1 .userPanel .memberTop>.avatar{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  flex:0 0 44px!important;
  margin:0!important;
}
body.homeFinalV1 .userPanel .memberText,
body.gameShellV5.finalUiV1 .userPanel .memberText{
  width:calc(100% - 54px)!important;
  min-width:0!important;
  max-width:calc(100% - 54px)!important;
}

/* Wallet: same two fixed-height rows everywhere. */
body.homeFinalV1 .userPanel .walletCard,
body.gameShellV5.finalUiV1 .userPanel .walletCard{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  margin:10px 0 0!important;
  padding:0!important;
  border:1px solid var(--ma-border-soft)!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:transparent!important;
}
body.homeFinalV1 .userPanel .walletLine,
body.gameShellV5.finalUiV1 .userPanel .walletLine{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:62px!important;
  min-height:62px!important;
  max-height:62px!important;
  margin:0!important;
  padding:12px 13px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
}
body.homeFinalV1 .userPanel .walletLine div,
body.gameShellV5.finalUiV1 .userPanel .walletLine div{
  min-width:0!important;
  margin:0!important;
}
body.homeFinalV1 .userPanel .walletLine span,
body.gameShellV5.finalUiV1 .userPanel .walletLine span{
  display:block!important;
  margin:0!important;
  font-size:10px!important;
  line-height:13px!important;
}
body.homeFinalV1 .userPanel .walletLine small,
body.gameShellV5.finalUiV1 .userPanel .walletLine small{
  display:block!important;
  margin:3px 0 0!important;
  font-size:8px!important;
  line-height:10px!important;
}
body.homeFinalV1 .userPanel .walletLine strong,
body.gameShellV5.finalUiV1 .userPanel .walletLine strong{
  margin:0!important;
  font-size:15px!important;
  line-height:18px!important;
  max-width:116px!important;
}

/* POINT SHOP button */
body.homeFinalV1 .userPanel .primaryBtn.full,
body.gameShellV5.finalUiV1 .userPanel .primaryBtn.full{
  box-sizing:border-box!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:10px 0 0!important;
  padding:0 13px!important;
  border-radius:11px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}

/* Quick links: same row rhythm, regardless of old page CSS. */
body.homeFinalV1 .userPanel .quickLinks,
body.gameShellV5.finalUiV1 .userPanel .quickLinks{
  box-sizing:border-box!important;
  width:100%!important;
  margin:12px 0 0!important;
  padding:0!important;
}
body.homeFinalV1 .userPanel .powerLink,
body.gameShellV5.finalUiV1 .userPanel .powerLink{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:40px!important;
  margin:0!important;
  padding:0 2px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  line-height:1.2!important;
}
body.homeFinalV1 .userPanel .powerLink strong,
body.gameShellV5.finalUiV1 .userPanel .powerLink strong{
  margin:0!important;
  line-height:13px!important;
}

/* Game brand note: exact outer geometry/rhythm.
   Content can remain game-specific, but the card dimensions no longer drift. */
body.gameShellV5.finalUiV1 .userPanel .brandNote{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:214px!important;
  margin:14px 0 0!important;
  padding:12px!important;
  border:1px solid #34312a!important;
  border-radius:12px!important;
  background:transparent!important;
  overflow:hidden!important;
}
body.gameShellV5.finalUiV1 .userPanel .brandNote b{
  display:block!important;
  margin:0!important;
  font-size:17px!important;
  line-height:1.28!important;
}
body.gameShellV5.finalUiV1 .userPanel .brandNote p{
  margin:10px 0!important;
  font-size:8px!important;
  line-height:1.7!important;
}
body.gameShellV5.finalUiV1 .userPanel .brandNote small{
  display:block!important;
  margin:0!important;
  font-size:9px!important;
  line-height:13px!important;
}

/* Right rail physical dimensions */
body.homeFinalV1 .livePanel,
body.gameShellV5.finalUiV1 .livePanel{
  box-sizing:border-box!important;
  padding:13px!important;
  border-width:1px!important;
  border-style:solid!important;
  border-color:var(--ma-panel-border)!important;
  border-radius:16px!important;
}
@media(min-width:1101px){
  body.gameShellV5.finalUiV1 .livePanel{
    height:calc(100vh - 100px)!important;
    max-height:760px!important;
    min-height:560px!important;
  }
}

/* Shared heading geometry — old game CSS had different padding/margins. */
body.gameShellV5.finalUiV1 .gameHeading{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:86px!important;
  margin:0 0 10px!important;
  padding:4px 4px 0!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
}
body.gameShellV5.finalUiV1 .headingTools{
  box-sizing:border-box!important;
  min-height:54px!important;
  margin:0!important;
}
body.gameShellV5.finalUiV1 .balanceBox{
  box-sizing:border-box!important;
  width:188px!important;
  min-width:188px!important;
  max-width:188px!important;
  height:60px!important;
  min-height:60px!important;
  max-height:60px!important;
  padding:9px 13px!important;
}
body.gameShellV5.finalUiV1 .textBtn{
  box-sizing:border-box!important;
  width:92px!important;
  min-width:92px!important;
  max-width:92px!important;
  height:60px!important;
  min-height:60px!important;
  max-height:60px!important;
  padding:0 12px!important;
}

/* Tablet/mobile keep responsive behavior; remove desktop fixed widths. */
@media(max-width:1100px){
  body.gameShellV5.finalUiV1 .gameShell>.userPanel,
  body.gameShellV5.finalUiV1 .gameShell>.livePanel{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
}

@media(max-width:760px){
  body.homeFinalV1 .userPanel,
  body.gameShellV5.finalUiV1 .userPanel{
    height:auto!important;
    overflow:visible!important;
  }
  body.gameShellV5.finalUiV1 .gameHeading{
    min-height:0!important;
  }
  body.gameShellV5.finalUiV1 .balanceBox,
  body.gameShellV5.finalUiV1 .textBtn{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:52px!important;
    min-height:52px!important;
    max-height:52px!important;
  }
}

/* =========================================================
   COMMON CSS RESPONSIBILITY CLEANUP STAGE 2 V1
   game-common-v4.css retired. Shared empty-state presentation
   and legacy game variable aliases now live in UI CORE.
   ========================================================= */
body.gameShellV5.finalUiV1 .emptyLink{
  padding:12px 8px;
  color:var(--ma-muted-2);
  font-size:9px;
}

