/* Mobile touch and form geometry shared across public and administrator pages. */
@media (max-width: 900px) {
 html body .fp117-header .fp117-mobile > summary {display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;padding:10px;border:1px solid #38515e;border-radius:7px;}
 html body .fp117-header .fp117-mobile > summary svg {display:block;flex:none;width:24px;height:24px;}
 html body .fp117-mobile > nav {max-height:calc(100dvh - 100px);overscroll-behavior:contain;}
 html body .fp117-header .fp117-mobile nav > a,
 html body .fp117-header .fp117-mobile .fp117-group > summary {min-height:44px;}
}
@media (max-width: 750px) {
 html body:has(.fp117-header) :is(main,.auth-card,#app,.fp-public-design) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]),select,textarea) {font-size:16px!important;min-height:44px;}
 html body #app .scores input {width:44px;height:44px;min-width:44px;}
 html body #app button,html body .lp-button,html body .auth-card .auth-forgot a {min-height:44px;}
 html body .auth-card .auth-forgot a {display:inline-flex;align-items:center;}
 html body .home-hero .watch-link {min-height:44px;}
 html body #app .table-scroll {scrollbar-width:thin;}
 html body #app .table-scroll::-webkit-scrollbar {display:block;height:6px;}
 html body #app .filters label,html body #app .toolbar label {min-width:0;}
 html body #app .filters select {width:100%;}
}
@media (max-width: 1000px) {
 body.design-admin .design-sidebar {max-width:calc(100vw - 44px);padding-bottom:max(14px,env(safe-area-inset-bottom));overscroll-behavior:contain;}
 body.design-admin .design-nav-section > summary,body.design-admin .design-nav-group a,body.design-admin .design-nav-footer > a,body.design-admin .design-nav-close {min-height:44px;}
 body.design-admin .design-nav-group a,body.design-admin .design-nav-footer > a {font-size:14px;}
 body.design-admin .design-workspace :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]),select,textarea) {font-size:16px!important;min-height:44px;}
 body.design-admin .design-top-actions {flex-shrink:0;}
 body.design-admin .design-heading {min-width:0;}
 body.design-admin .design-heading h1 {overflow-wrap:anywhere;}
}

@media (max-width:650px) {
 html body.admin-auth-page .fp117-header{gap:8px;}
 html body.admin-auth-page .admin-auth-nav{height:auto;flex:none;}
 html body.admin-auth-page .admin-auth-nav>span{display:none;}
 html body.admin-auth-page .admin-auth-nav>a{min-height:44px;}
 html body.admin-auth-page .fp117-header .home-brand{gap:8px;}
 html body.admin-auth-page .fp117-header .home-brand>span,
 html body.admin-auth-page .fp117-header .home-brand>span>.brand-green{font-size:20px!important;}
 html body.admin-auth-page .fp117-header .home-brand :is(svg,img){width:34px!important;height:34px!important;flex-basis:34px;}
 html body.admin-auth-page .fp117-header .home-brand small{font-size:6px!important;letter-spacing:2px;}
 html body.admin-auth-page .password-toggle{width:44px;height:44px;flex:none;align-items:center;justify-content:center;}
}

/* Keep the native country picker with evenly inset globe and chevron. */
html body:not(.fp-preview) .fp-contact-form #contact-country {
 appearance:none;-webkit-appearance:none;padding-left:46px;padding-right:46px;
 background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23425d73%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M3%2012h18M12%203c5%205%205%2013%200%2018M12%203c-5%205-5%2013%200%2018%22/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23425d73%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%209%206%206%206-6%22/%3E%3C/svg%3E");
 background-position:left 16px center,right 16px center;
 background-size:20px 20px,18px 18px;background-repeat:no-repeat;
}
@media(forced-colors:active){html body:not(.fp-preview) .fp-contact-form #contact-country{appearance:auto;background-image:none;padding-left:12px;}}

/* Shared links between country settings and player payments. */
.funds-page a.record-button {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;border:1px solid #d5e2ee;border-radius:7px;background:#f1f6fc;color:#365b7d;font-weight:600;text-decoration:none;box-sizing:border-box;}
@media(max-width:750px){
 .funds-page .currency-heading{flex-wrap:wrap;gap:14px;}
 .funds-page .currency-heading>div{min-width:0;}
 .funds-page .currency-panel,.funds-page .record-field{min-width:0;}
 .funds-page .currency-checks{gap:8px 16px;}
 .funds-page .currency-checks label{display:inline-flex;align-items:center;min-height:44px;gap:8px;}
 .funds-page .currency-checks input[type=checkbox]{width:20px;height:20px;flex:none;}
 .funds-page .currency-new,.funds-page .country-row,.funds-page .record-button{min-height:44px;}
 .funds-page .currency-new{display:inline-flex;align-items:center;}
}

/* Match the public site's right-hand mobile navigation trigger. */
@media(max-width:1000px){
 body.design-admin .design-topbar{position:relative;padding-right:80px;flex-wrap:wrap;}
 body.design-admin .design-menu{position:absolute;top:16px;right:16px;width:44px;height:44px;align-items:center;justify-content:center;}
 body.design-admin .design-heading{flex:1 1 220px;}
 body.design-admin .design-heading>div{min-width:0;}
}
.funds-page .currency-grid > *{min-width:0;}
.funds-page .record-table-wrap{max-width:100%;overscroll-behavior-x:contain;}
@media(max-width:1000px){
 body.design-admin .design-menu>ion-icon{display:none;}
 body.design-admin .design-menu::before{content:"";display:block;width:20px;height:14px;border-top:2px solid currentColor;border-bottom:2px solid currentColor;background:linear-gradient(currentColor,currentColor) center/100% 2px no-repeat;box-sizing:border-box;}
 body.design-admin .design-top-actions>a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;}
}

/* Give each audit history the full panel width, including empty histories. */
.countries-page .currency-audit > .currency-grid{grid-template-columns:minmax(0,1fr);gap:20px;}
.countries-page .currency-audit > .currency-grid > div + div{border-top:1px solid var(--admin-border);padding-top:16px;}
.countries-page .currency-audit .directory-table{width:100%;}

/* Hide mobile scrollbars without changing overflow or touch scrolling. */
@media(max-width:1000px){
 html,html body,html body *{scrollbar-width:none!important;}
 html::-webkit-scrollbar,html body::-webkit-scrollbar,html body *::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
}

/* Public mobile actions occupy a full row; navigation and icon controls stay compact. */
@media(max-width:750px){
 html body:not(.design-admin) #app :is(.entry-tools,.toolbar,.submitbar){flex-direction:column;align-items:stretch;}
 html body:not(.design-admin) #app :is(.entry-tools,.toolbar,.submitbar)>*{min-width:0;max-width:100%;}
 html body:not(.design-admin) #app :is(.entry-tools,.toolbar,.submitbar,.filters) button{width:100%;max-width:100%;box-sizing:border-box;white-space:normal;}
 html body:not(.design-admin) #app .filters button{grid-column:1 / -1;}
 html body:not(.design-admin) :is(.hero-actions,.fp-player-actions>div){width:100%;flex-direction:column;align-items:stretch;}
 html body:not(.design-admin) :is(.hero-actions,.fp-player-actions>div)>a{width:100%;justify-content:center;box-sizing:border-box;}
 html body:not(.design-admin) .promo>div{width:100%;max-width:none;}
 html body:not(.design-admin) :is(main,.hero,.promo) :is(a.button,.lp-button){width:100%;box-sizing:border-box;justify-content:center;white-space:normal;}
 html body:not(.design-admin) .auth-card :is(button[type=submit],input[type=submit],.auth-secondary){width:100%;box-sizing:border-box;}
}

/* My Predictions: two equal scope buttons, followed by a full-width row. */
@media(max-width:750px){
 html body #app .universal-history-scopes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;}
 html body #app .universal-history-scopes>a{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;box-sizing:border-box;text-align:center;white-space:normal;}
 html body #app .universal-history-scopes>a:last-child{grid-column:1 / -1;}
}

/* Account actions share one right edge and consistent dimensions. */
html body.fp-account-page:has(.fp-public-design) :is(.fp-account-summary,.fp-wallet-panel,.fp-profile-card){padding:24px;}
html body.fp-account-page:has(.fp-public-design) .fp-profile-card>header{padding-left:0;padding-right:0;}
html body.fp-account-page:has(.fp-public-design) :is(.fp-account-summary>.fp-public-button,.fp-wallet-panel>.fp-public-button,.fp-profile-card>header>.fp-primary-action){width:180px;min-height:44px;box-sizing:border-box;flex-shrink:0;margin:0;line-height:24px;padding:10px 18px;text-align:center;}
@media(max-width:750px){
 html body.fp-account-page:has(.fp-public-design) :is(.fp-account-summary,.fp-wallet-panel,.fp-profile-card>header){flex-direction:column;align-items:stretch;}
 html body.fp-account-page:has(.fp-public-design) :is(.fp-account-summary>.fp-public-button,.fp-wallet-panel>.fp-public-button,.fp-profile-card>header>.fp-primary-action){width:100%;}
}

/* Mobile preview: center the player crop while preserving the configured image. */
@media(max-width:750px){
 html body:not(.fp-preview):has(.fp117-header)::before{left:0!important;right:0!important;width:100%!important;background-size:0 0,cover!important;background-position:center,89% top!important;box-shadow:inset 0 0 0 100vmax rgba(7,30,43,.35);}
}

#app .history-columns-hint{margin:0;padding:10px 14px;background:#dcecf5;color:#244e70;border-bottom:1px solid #cbdfe9;text-align:center;font-size:13px;font-weight:650;line-height:1.5;}
