/* Phone layout: compact navigation, readable controls, safe-area spacing. */
@media(max-width:640px){
 html{scroll-padding-bottom:100px;scrollbar-width:none}
 html::-webkit-scrollbar{display:none}
 body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
 body.has-subpage .header{height:66px;margin:0 16px;padding:0;align-items:center;gap:10px;border-bottom:1px solid #ffffff12}
 body.has-subpage .header .brand{font-size:25px;letter-spacing:-1.5px}
 body.has-subpage .header-actions{margin-left:auto;gap:8px;align-items:center}
 body.has-subpage .header .account-entry,body.has-subpage .header .deposit-entry{position:static;max-width:143px;min-height:42px;padding:11px 12px;font-size:13px;box-sizing:border-box;display:flex;align-items:center}
 body.has-subpage .header .account-entry{background:#201728;border-color:#bd86e62e;color:#e2ccef}
 body.has-subpage .header .deposit-entry{min-width:56px;justify-content:center;box-shadow:0 3px 16px #9254c12b}
 body.has-subpage .header .sfx-toggle,body.has-subpage .header .music-toggle,body.has-subpage .header .music-credits,body.has-subpage .header-nav{display:none}
 .portal-topnav{display:none}
 .portal-wrap{padding:18px 16px 30px}
 .portal-wrap>.portal-heading{margin-bottom:16px;align-items:center;gap:8px}
 .portal-heading .p-kicker,.portal-heading p{display:none}
 .portal-heading h1{font-size:25px;letter-spacing:-.5px;margin:0;line-height:1.35}
 .portal-heading .portal-back{font-size:13px;padding:8px 0;min-height:40px;display:flex;align-items:center}
 .portal-feature{height:140px;border-radius:16px;background:linear-gradient(110deg,#281633,#170f22);border-color:#d9a0ff30}
 .portal-feature>div{padding:17px}
 .portal-feature .p-kicker{font-size:10px;letter-spacing:1px}
 .portal-feature h2{font-size:23px;margin:12px 0 14px;letter-spacing:-.7px}
 .portal-feature .p-button{font-size:14px;padding:9px 14px;min-height:40px;box-sizing:border-box;border-color:#dfa6ff55;background:#1d122bd6}
 .portal-feature>img{width:63%;opacity:.85}
 .portal-feature-mark{display:none}
 .portal-notice{padding:12px 0;margin-bottom:15px;gap:8px}
 .portal-notice p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
 .portal-notice>a{font-size:13px;min-height:34px;display:flex;align-items:center}
 .portal-search-row{gap:12px;margin-bottom:14px}
 .portal-segment{gap:8px}
 .portal-segment button{min-height:44px;padding:10px 17px;flex-shrink:0;font-size:14px;border-radius:11px}
 .portal-search-row .portal-segment{display:grid;grid-template-columns:1fr 1fr;background:#18111f;border:1px solid #ffffff0d;border-radius:13px;padding:4px;gap:4px}
 .portal-search-row .portal-segment button{border:0;background:transparent;color:#a99cb6;min-height:40px;padding:8px}
 .portal-search-row .portal-segment button[aria-pressed=true]{color:#f0d7ff;background:#3a234c;box-shadow:0 2px 10px #0003}
 .portal-search{position:relative;gap:0}
 .portal-search:has(input)>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
 .portal-search input{width:100%;font-size:16px;border-radius:12px;padding:13px 15px;height:47px;background:#16101d;border-color:#b389cb27;box-sizing:border-box}
 .provider-strip{gap:8px;padding-bottom:8px;margin-right:-16px;padding-right:16px}
 .provider-strip button{font-size:14px;min-height:46px;min-width:58px;padding:10px 14px;border-radius:12px;background:#16101d}
 .provider-strip button[aria-pressed=true]{background:#d9aff7;color:#190e22;box-shadow:0 3px 12px #b978ed22}
 .portal-section-title{margin:14px 0 13px}
 .portal-section-title h2{font-size:20px;letter-spacing:-.3px}
 .portal-section-title span{font-size:12px}
 .portal-games{gap:12px}
 .portal-game{border-radius:14px}
 .portal-game img{aspect-ratio:1.17;object-fit:cover}
 .portal-game-copy{padding:12px 10px}
 .portal-game-copy strong{font-size:14px;line-height:1.4;min-height:39px}
 .portal-game-copy small{font-size:12px;line-height:1.4;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .portal-favorite{width:44px;height:44px;right:4px;top:4px;line-height:40px;font-size:24px;border-color:#fff3;background:#130b20c7}
 .portal-shortcuts{gap:10px;margin:22px 0}
 .portal-shortcuts a{padding:16px 13px;font-size:14px;min-height:52px;box-sizing:border-box}
 .portal-caption{font-size:12px}
 .portal-bottom{min-height:66px;box-sizing:border-box;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid #d9a5fb2a;background:#140d1ef5;box-shadow:0 -8px 25px #0003}
 .portal-bottom a{position:relative;justify-content:center;min-height:50px;gap:5px;border-radius:12px;margin:0 2px;color:#93859f}
 .portal-bottom a>span{font-size:23px;line-height:22px}
 .portal-bottom a>small{display:none}
 .portal-bottom a>strong{font-size:13px;font-weight:500}
 .portal-bottom a[aria-current]{background:#bc7fec17;color:#e5baff}
 .portal-bottom a[aria-current]:before{content:'';position:absolute;top:-8px;width:24px;height:2px;border-radius:2px;background:#d5a1fc;left:calc(50% - 12px)}
 .portal-promos{margin-top:18px;gap:12px}
 .portal-promo{min-height:210px}
 .portal-promo>div{padding:16px}
 .portal-promo h2{font-size:21px}
 .portal-promo-detail{gap:20px;margin-top:18px}
 .portal-promo-detail img{max-height:220px;object-fit:cover;border-radius:16px}
 .portal-promo-detail .p-button{width:100%;box-sizing:border-box;text-align:center;justify-content:center;min-height:46px}
 .agency-banner{margin-bottom:18px;border-radius:15px}
 .agency-banner>div{padding:20px}
 .agency-banner h2{font-size:23px;line-height:1.4;margin:12px 0}
 .agency-banner p{line-height:1.6}
 .agency-tabs{margin-right:-16px;padding-right:16px;margin-bottom:16px}
 .agency-tabs button{flex:0 0 auto;font-size:14px;padding:11px 16px}
 .agency-content{padding:20px 16px;border-radius:15px}
 .agency-invite h2{font-size:23px;line-height:1.4}
 .portal-share{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .portal-share button{min-height:44px;font-size:14px;white-space:nowrap}
 .agency-code .p-button{min-height:46px;justify-content:center}
 .agency-tree>div{gap:10px}.agency-tree span{padding:13px 14px}
 .account-nav{padding:12px 16px;gap:18px;scrollbar-width:none}
 .account-nav a{font-size:14px;min-height:36px;display:flex;align-items:center}
 .account-wrap{padding-left:16px;padding-right:16px}
 .account-heading{margin:20px 0}.account-heading h1{font-size:25px;line-height:1.2;overflow-wrap:anywhere}
 .account-heading .p-kicker{font-size:12px}.account-heading p{font-size:14px}
 .member-identity{gap:14px;padding:18px}.member-identity h2{font-size:22px}
 .member-money{padding:22px 18px}.member-money>strong{font-size:34px}
 .portal-member-summary{gap:14px}.portal-member-summary>div{padding:20px}
 .member-menu a{min-height:56px;box-sizing:border-box}
 .account-panel input,.account-panel select,.account-panel textarea,.member-field input,.member-field select,.member-field textarea{font-size:16px!important;min-height:46px;box-sizing:border-box;max-width:100%}
 .funds-screen .funds-nav{position:sticky;top:0;z-index:40;background:#130d1ef5;backdrop-filter:blur(16px);padding:12px 16px}
 .funds-screen .funds-nav a{min-height:38px;display:flex;align-items:center;font-size:14px}
 .funds-screen .funds-nav h1{font-size:19px}
 .funds-screen .account-wrap{padding:12px 16px 30px}
 .funds-screen .member-main .account-panel{padding:20px 16px;border-radius:16px}
 .funds-screen .member-amounts{gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}
 .funds-screen .member-amounts>button{min-height:46px;padding:10px 6px;border-radius:10px;font-size:14px}
 .funds-screen .member-main .account-panel>.p-button{min-height:49px;border-radius:12px;font-size:16px}
 .keyboard-open .portal-bottom{display:none}
 .pc28-screen .portal-bottom{display:none}
}
@media(max-width:640px){
 .account-panel input[type=checkbox],.account-panel input[type=radio]{min-height:18px!important;min-width:18px;width:18px;height:18px;flex:0 0 18px}
}
@media(max-width:360px){
 body.has-subpage .header{margin:0 12px;gap:6px}
 body.has-subpage .header .brand{font-size:23px}
 body.has-subpage .header .account-entry{max-width:115px;font-size:12px;padding:10px 8px}
 .portal-wrap{padding-left:12px;padding-right:12px}
 .portal-feature h2{font-size:21px}
 .portal-game-copy strong{font-size:14px}
}

@media(max-width:640px){.portal-bottom a>span>svg{width:23px;height:23px;display:block;margin:auto}.wallet-balance{padding:24px 20px}.wallet-balance>small{line-height:1.7;margin:14px 0 20px}.wallet-balance .hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0}.wallet-balance .hero-actions a{min-height:44px;padding:12px;box-sizing:border-box}.wallet-shortcuts{grid-template-columns:1fr}.wallet-shortcuts>a{display:flex;align-items:center;justify-content:space-between;padding:18px 16px}.wallet-shortcuts small{font-size:12px}.wallet-shortcuts strong{font-size:15px}}
