/* Logged-in member shell: broad selectors keep the skin stable while portal state changes. */
body.member-neon #portal>.wrap{width:min(1440px,calc(100% - 32px));max-width:none;margin:0 auto}
body.member-neon #portal .top{position:sticky;top:12px;z-index:60;display:grid;grid-template-columns:minmax(220px,1fr) auto minmax(170px,1fr);align-items:center;gap:20px;min-height:76px;padding:10px 18px;border-radius:18px!important;background:rgba(11,14,49,.9)!important;box-shadow:0 12px 28px rgba(0,0,0,.22)!important}
body.member-neon #portal .top .agent-site-logo:not(.hidden){width:58px;height:54px}
body.member-neon #portal .top h1{font-size:22px;font-weight:700}
body.member-neon #portal .member-topnav{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0}
body.member-neon #portal .member-topnav button{min-height:42px;padding:9px 13px;border:1px solid transparent;border-radius:11px;background:transparent;color:#d7d5ee;font:600 14px/1 'Kanit','Noto Sans Thai',sans-serif}
body.member-neon #portal .member-topnav button:hover,body.member-neon #portal .member-topnav button[aria-current="page"]{border-color:#6855bd;background:#211d5e;color:#fff}
body.member-neon #portal .top-actions{justify-content:flex-end}
body.member-neon #portal .bet-overview{margin-top:12px}
body.member-neon #portal .simple-nav{display:none!important}
#memberWithdraw{scroll-margin-top:96px}
body.member-neon #portal .panel,body.member-neon #portal .results-shell{border-radius:18px!important}
body.member-neon #portal .member-home-dashboard{display:grid!important;gap:14px;margin:0 0 16px}
body.member-neon #portal .member-home-dashboard.hidden{display:grid!important}
/* Remove the legacy duplicate sections from the post-login landing view. The
   lottery picker remains intact below the new member dashboard. */
body.member-neon #portal #member-art-wrap,
body.member-neon #portal #betHowTo,
body.member-neon #portal #laosResultGuide{display:none!important}
body.member-neon #portal .member-home-profile{display:flex;align-items:center;gap:12px;padding:14px 18px;border:1px solid #514b9f;border-radius:18px;background:linear-gradient(115deg,#15164d,#141338);color:#fff}
body.member-neon #portal .member-home-profile>div{display:grid;gap:3px;min-width:0}.member-home-profile strong{font-size:20px}.member-home-profile small{color:#aaa5c5}.member-home-profile>button{margin-left:auto;border:0;background:transparent;color:#fff;font-size:20px}.member-home-avatar{display:grid;place-items:center;width:54px;height:54px;border:2px solid #57d9ff;border-radius:50%;color:#8feaff;font-size:25px}.member-home-vip{padding:4px 10px;border:1px solid #e7bc43;border-radius:999px;color:#ffd95e;font-weight:800}
body.member-neon #portal .member-home-credit{display:grid;grid-template-columns:minmax(180px,1fr) repeat(2,minmax(150px,.6fr));align-items:center;gap:12px;padding:16px 20px;border:1px solid #416eff;border-radius:20px;background:linear-gradient(105deg,#101f68,#22205e 55%,#35166c)}.member-home-credit small{display:block;color:#dce5ff;font-size:15px}.member-home-credit strong{display:block;color:#fff;font-size:32px;line-height:1.2}.member-home-action{min-height:68px;border:1px solid #55e4ff;border-radius:16px;color:#fff;font:700 18px 'Kanit';background:linear-gradient(135deg,#087dda,#4b20df)}.member-home-action.withdraw{background:linear-gradient(135deg,#b12be5,#7224e9);border-color:#e0a5ff}.member-home-action i{margin-right:8px}
body.member-neon #portal .member-home-shortcuts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.member-home-shortcuts :is(button,.member-contact-line){display:grid;place-items:center;gap:5px;min-height:96px;padding:8px;text-decoration:none;border:1px solid #416eff;border-radius:18px;background:linear-gradient(150deg,#172875,#111447);color:#fff;font:600 15px 'Kanit'}.member-home-shortcuts i,.member-home-shortcuts .member-contact-line svg{width:25px;height:25px;color:#80eaff;font-size:25px}.member-home-shortcuts .member-contact-line svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.member-home-shortcuts .member-contact-line svg text{fill:currentColor;stroke:none;font:800 5px/1 sans-serif}.member-home-hero{display:block;overflow:hidden;border:1px solid #725dff;border-radius:20px;background:#10082f}.member-home-hero img{display:block;width:100%;aspect-ratio:2.4/1;object-fit:cover}
body.member-neon #view-bet:has(.selected-draw-bar) .member-home-dashboard{display:none}
@media(max-width:980px){body.member-neon #portal .top{grid-template-columns:minmax(180px,1fr) auto}body.member-neon #portal .member-topnav{grid-column:1/-1;grid-row:2;justify-content:stretch}body.member-neon #portal .member-topnav button{flex:1 1 0}}
@media(max-width:650px){body.member-neon{padding-bottom:78px}body.member-neon #portal>.wrap{width:100%}body.member-neon #portal .top{position:sticky;top:0;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-height:62px;padding:6px 10px;border-width:0 0 1px!important;border-radius:0!important}body.member-neon #portal .top .agent-site-logo:not(.hidden){width:48px;height:44px}body.member-neon #portal .top h1{font-size:17px}body.member-neon #portal .top p{font-size:10px}body.member-neon #portal #creditBadge{max-width:142px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}body.member-neon #portal #logoutBtn{display:none}body.member-neon #portal .member-topnav{display:none}body.member-neon #portal .bet-overview{margin-top:0}body.member-neon #portal .panel,body.member-neon #portal .results-shell{border-left:0!important;border-right:0!important;border-radius:0!important}}
@media(max-width:650px){body.member-neon #portal .member-home-credit{grid-template-columns:1fr 1fr;padding:12px}.member-home-credit>div{grid-column:1/-1}.member-home-credit strong{font-size:27px}.member-home-action{min-height:58px;font-size:15px}.member-home-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))!important}.member-home-shortcuts :is(button,.member-contact-line){min-height:78px;font-size:12px}.member-home-hero img{aspect-ratio:1.8/1}}
@media(prefers-reduced-motion:reduce){body.member-neon #portal *{scroll-behavior:auto!important;transition:none!important}}
/* Profile is a compact account center on small screens. */
body.member-neon #portal #view-profile .member-summary{padding:18px 20px!important;background:linear-gradient(145deg,#292359,#1d1a4d)!important;border:1px solid #625597!important;border-radius:18px!important}
body.member-neon #portal #view-profile .profile-heading-row,body.member-neon #portal #view-profile .profile-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
body.member-neon #portal #view-profile .profile-eyebrow{display:block;margin-bottom:3px;color:#aeb8df;font-size:12px;font-weight:600;letter-spacing:.02em}
body.member-neon #portal #view-profile .profile-status{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border:1px solid rgba(76,221,162,.45);border-radius:999px;color:#79efbd;background:rgba(25,115,82,.2);font-size:12px;font-weight:700;white-space:nowrap}
body.member-neon #portal #view-profile .profile-status i{font-size:9px}
body.member-neon #portal #view-profile #profileBalance{font-size:clamp(28px,5vw,42px)!important;letter-spacing:-.02em!important;line-height:1.15!important}
body.member-neon #portal #view-profile .profile-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
body.member-neon #portal #view-profile .profile-facts>section{padding:16px!important}
body.member-neon #portal #view-profile .profile-card-heading h3{margin:0}
body.member-neon #portal #view-profile .profile-inline-action{min-height:32px;padding:5px 11px;border:1px solid #4b9fe8;border-radius:999px;background:#172d61;color:#bde9ff;font:600 12px/1 'Noto Sans Thai',sans-serif}
body.member-neon #portal #view-profile .profile-facts dl{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:10px 12px;margin:14px 0 0}
body.member-neon #portal #view-profile .profile-facts dt{color:#aeb8df}
body.member-neon #portal #view-profile .profile-facts dd{margin:0;min-width:0;color:#fff;text-align:right;font-weight:700;overflow-wrap:anywhere}
body.member-neon #portal #view-profile .profile-account-number{display:flex;align-items:center;justify-content:flex-end;gap:7px!important}
body.member-neon #portal #view-profile #profileBankAccountNumber{font-variant-numeric:tabular-nums;letter-spacing:.04em}
body.member-neon #portal #view-profile #profileBankToggle{flex:0 0 auto;padding:3px 7px;border:1px solid #625597;border-radius:6px;background:#302653;color:#c8c5e8;font:600 11px/1.2 'Noto Sans Thai',sans-serif}
@media(max-width:700px){
 body.member-neon #portal #view-profile .member-summary{padding:15px!important;border-radius:15px!important}
 body.member-neon #portal #view-profile .profile-facts{grid-template-columns:1fr!important;gap:10px}
 body.member-neon #portal #view-profile .profile-facts>section{padding:14px!important}
 body.member-neon #portal #view-profile .profile-heading-row{align-items:flex-start}
 body.member-neon #portal #view-profile .profile-status{font-size:11px;padding:4px 7px}
 body.member-neon #portal #view-profile .profile-shortcuts button{border-radius:11px!important;background:#111c45!important}
 body.member-neon #portal #view-profile .profile-help{margin:14px 2px 8px!important}
}

/* Desktop: merge the secondary blue draw bar into the primary desktop header row. */
@media(min-width:901px){
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top{display:grid!important;grid-template-columns:100px minmax(0,1fr) auto!important;grid-template-rows:64px!important;align-items:center!important;gap:16px!important;height:64px!important;min-height:64px!important;padding:0 24px!important;box-sizing:border-box!important;background:#141333!important;border:0!important;border-bottom:1px solid #51437e!important;border-radius:0!important;overflow:hidden!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top>div:first-child{grid-column:1!important;grid-row:1!important;display:flex!important;align-items:center!important;min-width:0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top #agentSiteLogo{display:block!important;width:60px!important;height:48px!important;object-fit:contain!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top :is(#pageTitle,#agentLine){display:none!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top .member-topnav{grid-column:2!important;grid-row:1!important;display:flex!important;justify-content:center!important;align-items:center!important;gap:8px!important;min-width:0!important;margin:0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top .member-topnav button{min-height:42px!important;padding:8px 14px!important;border-radius:9px!important;font-size:14px!important;white-space:nowrap!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top .top-actions{grid-column:3!important;grid-row:1!important;display:flex!important;align-items:center!important;gap:10px!important;margin:0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top #creditBadge{display:inline-flex!important;position:static!important;max-width:none!important;min-height:42px!important;padding:8px 18px!important;border-radius:22px!important;font-size:15px!important;white-space:nowrap!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap>header.top #betSettingsBtn{display:grid!important;width:42px!important;height:42px!important;place-items:center!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet>.panel #openLotteryCards{display:none!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet>.panel{position:relative!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet>.panel:has(.selected-draw-bar)::before{content:"หวยลาว";position:absolute;z-index:2;top:14px;right:28px;color:#fff;font-size:20px;font-weight:800;pointer-events:none}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet .selected-draw-bar{position:absolute!important;top:0!important;left:0!important;right:0!important;z-index:1!important;min-height:64px!important;height:64px!important;box-sizing:border-box!important;padding:8px 28px!important;background:#287fe0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet .selected-draw-bar>div{visibility:hidden!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet .selected-draw-bar button{visibility:hidden!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal>.wrap #view-bet>.panel>.panel-body{padding-top:76px!important}
}
/* Mobile member header: normal document flow, with space reserved before the betting form. */
.mobile-menu-toggle,.mobile-sidebar,.mobile-sidebar-backdrop{display:none}
@media(max-width:900px){
 body.member-neon:has(#portal) #portal .wrap{position:relative!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:52px 40px!important;gap:6px 8px!important;align-items:center!important;width:100%!important;height:auto!important;min-height:104px!important;padding:7px 10px!important;box-sizing:border-box!important;overflow:visible!important;background:#141333!important;border-bottom:1px solid #625597!important;z-index:20!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top>div:first-child{grid-column:1;grid-row:1;display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top .agent-site-logo{display:block!important;width:38px!important;height:38px!important;object-fit:contain!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top #pageTitle{display:block!important;margin:0!important;font-size:14px!important;color:#fff!important;white-space:nowrap!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top #agentLine{display:block!important;margin:2px 0 0!important;font-size:10px!important;color:#bdb5df!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:120px!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top .top-actions{grid-column:2;grid-row:1;display:flex!important;align-items:center!important;justify-content:flex-end!important;position:static!important;margin:0!important;min-width:0!important;gap:0!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top #creditBadge{display:inline-flex!important;position:static!important;width:auto!important;max-width:145px!important;min-height:36px!important;padding:5px 9px!important;overflow:hidden!important;text-overflow:ellipsis!important;border:1px solid #62d7ff!important;border-radius:9px!important;background:#142557!important;color:#fff!important;font-size:12px!important;font-weight:800!important;white-space:nowrap!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap header.top :is(.member-topnav,#betSettingsBtn,#logoutBtn){display:none!important}
 .mobile-menu-toggle{grid-column:1/-1!important;grid-row:2!important;position:static!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:100%!important;min-height:38px!important;padding:6px 12px!important;border:1px solid #51437e!important;border-radius:9px!important;background:#201b49!important;color:#f6f5ff!important;font:700 13px/1 'Noto Sans Thai',sans-serif!important}
 body.member-neon:has(#portal #view-bet:not(.hidden)) #portal .wrap #view-bet{padding-top:0!important;box-sizing:border-box!important}
 .mobile-sidebar-backdrop{position:fixed;inset:0;z-index:90;background:rgba(3,5,20,.68)}
 .mobile-sidebar{display:block;position:fixed;top:0;right:0;bottom:0;z-index:100;width:min(300px,82vw);padding:14px;background:#141333;color:#fff;box-shadow:-12px 0 30px rgba(0,0,0,.4);transform:translateX(105%);transition:transform .2s ease}
 .mobile-sidebar.open{transform:translateX(0)}
 .mobile-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:4px 2px 14px;border-bottom:1px solid #625597;font-size:18px}
 .mobile-sidebar-head button{width:36px;height:36px;border:1px solid #625597;border-radius:8px;background:#252052;color:#fff;font-size:24px;line-height:1}
 .mobile-sidebar-credit{display:flex;flex-direction:column;gap:3px;margin:14px 0;padding:12px;border:1px solid #62d7ff;border-radius:10px;background:#142557}.mobile-sidebar-credit small{color:#bdb5df}.mobile-sidebar-credit b{font-size:24px;color:#fff}
 .mobile-sidebar nav{display:grid;gap:8px}.mobile-sidebar nav button{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;border:1px solid #625597;border-radius:9px;background:#201b49;color:#fff;font:700 15px/1.2 'Noto Sans Thai',sans-serif;text-align:left}.mobile-sidebar nav button i{width:22px;color:#68e6ff;text-align:center}
}
