/* GameHiHi v3.5.34 — final, comprehensive palette layer.
 * Loaded after every frontend module so no legacy green rules override presets.
 */
:root{
  --theme-primary-soft:var(--theme-background-alt);
  --theme-primary-soft:color-mix(in srgb,var(--theme-primary) 12%,var(--theme-surface));
  --theme-primary-soft-strong:color-mix(in srgb,var(--theme-primary) 20%,var(--theme-surface));
  --theme-primary-border:color-mix(in srgb,var(--theme-primary) 34%,var(--theme-surface));
  --theme-primary-shadow:rgba(var(--theme-primary-rgb),.24);
  --theme-accent-shadow:rgba(var(--theme-accent-rgb),.34);
  --theme-surface-soft:color-mix(in srgb,var(--theme-background) 62%,var(--theme-surface));
  --theme-overlay:rgba(var(--theme-footer-rgb),.72);
}
html,body{background:var(--theme-background);color:var(--theme-text)}
body>main,main{background:var(--theme-background);color:var(--theme-text)}
header{background:var(--theme-header)!important;border-color:var(--theme-border)!important;color:var(--theme-text)}
.sidebar{background:var(--theme-sidebar)!important;border-color:var(--theme-border)!important;color:var(--theme-text)}
.menu-btn,.search,.btn-ghost,.gamejoy-tool-button,.gamejoy-filter-removed-reset,.gamejoy-secondary-button{background:var(--theme-background-alt);color:var(--theme-text)}
.search:focus-within,.gamejoy-account-form input:focus,.gamejoy-account-form textarea:focus,.gamejoy-filter-removed input:focus,.gamejoy-filter-removed select:focus,.gamejoy-smart-select-button[aria-expanded=true]{background:var(--theme-surface)!important;border-color:var(--theme-primary)!important;box-shadow:0 0 0 3px rgba(var(--theme-primary-rgb),.13)}
.search input,.gamejoy-account-form input,.gamejoy-account-form textarea,.gamejoy-filter-removed input,.gamejoy-filter-removed select,.gamejoy-smart-select-button{color:var(--theme-text)}
.search input::placeholder,.gamejoy-account-form input::placeholder,.gamejoy-account-form textarea::placeholder{color:var(--theme-muted)}

/* All light surfaces */
.pagination .page-numbers,.ajax-search-results,.ad-slot-infeed,.pill,.detail-info,.art-card,.page-head,
.gamejoyh5-content-box,.gamejoy-standard-page .a-body,.gamejoyh5-collection-content,.gamejoy-blog-single .article-full,
.gamejoy-personal-empty,.gamejoy-filter-removed,.gamejoy-vote-box,.gamejoy-controls-guide,.gamejoy-report-dialog,
.gamejoy-account-sidebar,.gamejoy-account-content,.gamejoy-auth-shell,.gamejoy-auth-form-panel,.gamejoy-history-item,
.gamejoy-period-tabs a,.gamejoy-leaderboard-table-wrap,.gamejoy-keyword-group,.gamejoy-home-login-card,.gamejoy-home-rank-card,
.gamejoy-smart-select-panel,.gamejoy-account-pagination a,.gamejoy-sidebar-rank-card{background:var(--theme-surface)!important;border-color:var(--theme-border)!important;color:var(--theme-text)}
.gamejoy-control-card,.gamejoy-account-stats>div,.gamejoy-security-summary>div,.gamejoy-account-empty,
.gamejoy-history-thumb,.gamejoy-history-meta span,.gamejoy-keyword-chips a,.gamejoy-top-search-list a,.gamejoy-top-search-list button,
.gamejoy-smart-select-button,.gamejoy-filter-removed input,.gamejoy-filter-removed select,.gamejoy-account-form input,.gamejoy-account-form textarea{
  background:var(--theme-background-alt);border-color:var(--theme-border);color:var(--theme-text)
}

/* Primary interaction states */
.btn-primary,.pagination .page-numbers.current,.gamejoy-home-login-primary,.gamejoy-header-login,
.gamejoy-auth-tabs a.is-active,.gamejoy-period-tabs a.is-active,.gamejoy-account-pagination a.is-active,
.gamejoy-tool-primary,.gamejoy-play-friends,.gamejoy-save-current,.gf-minimize{
  background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary))!important;
  border-color:var(--theme-primary)!important;color:var(--theme-button-text)!important;
  box-shadow:0 8px 22px var(--theme-primary-shadow)!important
}
.btn-primary:hover,.gamejoy-home-login-primary:hover,.gamejoy-header-login:hover{
  background:linear-gradient(135deg,var(--theme-secondary),var(--theme-primary))!important;
  color:var(--theme-button-text)!important;box-shadow:0 11px 28px rgba(var(--theme-primary-rgb),.34)!important
}
.gamejoy-header-register,.gamejoy-home-login-secondary,.gamejoy-sidebar-auth-link.is-register{
  background:var(--theme-primary-soft)!important;color:var(--theme-secondary)!important;
  border:1px solid var(--theme-primary-border)!important;box-shadow:none!important
}
.gamejoy-header-register:hover,.gamejoy-home-login-secondary:hover,.gamejoy-sidebar-auth-link.is-register:hover{
  background:var(--theme-primary-soft-strong)!important;color:var(--theme-secondary)!important
}
.gamejoy-sidebar-auth-link.is-login{background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary))!important;color:var(--theme-button-text)!important}
.gamejoy-global-header-button.is-friends,.gamejoy-global-header-button.is-my-games{background:var(--theme-primary-soft)!important;color:var(--theme-secondary)!important}

/* Sidebar, tabs, selected rows, chips */
.cat.active,.sidebar-menu .current-menu-item>a,.sidebar-menu .current_page_item>a,
.gamejoy-account-nav a:hover,.gamejoy-account-nav a.is-active,.gamejoy-vote-button:hover,.gamejoy-vote-button.is-active,
.gamejoy-smart-select-option:hover,.gamejoy-smart-select-option.is-selected,.gamejoy-keyword-chips a:hover{
  background:var(--theme-primary-soft)!important;color:var(--theme-secondary)!important
}
.cat.active::before,.sec-head .bar{background:var(--theme-primary)!important}
.gamejoyh5-menu-color .ico{background:var(--menu-color,var(--theme-primary))!important;color:var(--theme-button-text)!important}
.gamejoy-global-side-button .ico,.gamejoy-global-side-button.is-friends .ico{background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary))!important;color:var(--theme-button-text)!important}
.gamejoy-home-login-icon{background:var(--theme-primary-soft)!important}
.gamejoy-home-rank-head a,.gamejoy-home-rank-list em,.gamejoy-sidebar-rank-head a,.gamejoy-sidebar-rank-copy em,.sec-head .more,.side-foot a,.gamejoy-form-link,.gamejoy-account-section-head>a{color:var(--theme-primary)!important}

/* Hero, logo and accent elements */
.hero{background:linear-gradient(120deg,var(--theme-text) 0%,var(--theme-secondary) 55%,var(--theme-primary) 100%)!important}
.hero::after{background:radial-gradient(circle at 82% 22%,rgba(var(--theme-accent-rgb),.50),transparent 42%),radial-gradient(circle at 12% 88%,rgba(var(--theme-primary-rgb),.32),transparent 46%)!important}
.hero .play-now{background:linear-gradient(135deg,var(--theme-accent),var(--theme-accent-deep))!important;color:var(--theme-footer)!important;box-shadow:0 10px 24px var(--theme-accent-shadow)!important}
.hero .play-now svg{fill:var(--theme-footer)!important}
.logo .name .g{color:var(--theme-text)}.logo .name .j{color:var(--theme-primary)}.logo .name .h{color:var(--theme-accent)}

/* Member/account */
.gamejoy-welcome-card,.gamejoy-auth-qr{background:linear-gradient(135deg,var(--theme-text),var(--theme-primary))!important;color:var(--theme-button-text)!important}
.gamejoy-welcome-card .btn-primary{background:var(--theme-surface)!important;color:var(--theme-secondary)!important;box-shadow:none!important}
.gamejoy-auth-shell{background:linear-gradient(145deg,var(--theme-surface),var(--theme-surface-soft))!important;border-color:var(--theme-primary-border)!important}
.gamejoy-auth-tabs{background:var(--theme-primary-soft)!important;border-color:var(--theme-primary-border)!important}
.gamejoy-auth-form-panel .gamejoy-account-form input{background:var(--theme-surface-soft)!important;border-color:var(--theme-primary-border)!important}
.gamejoy-account-notice.is-success{background:color-mix(in srgb,var(--theme-success) 10%,var(--theme-surface))!important;color:var(--theme-success)!important;border-color:color-mix(in srgb,var(--theme-success) 38%,var(--theme-surface))!important}
.gamejoy-account-notice.is-error{background:color-mix(in srgb,var(--theme-danger) 9%,var(--theme-surface))!important;color:var(--theme-danger)!important;border-color:color-mix(in srgb,var(--theme-danger) 35%,var(--theme-surface))!important}
.gamejoy-history-meta span.is-saved{background:color-mix(in srgb,var(--theme-success) 10%,var(--theme-surface))!important;color:var(--theme-success)!important}
.gamejoy-danger-button{background:var(--theme-danger)!important;color:var(--theme-button-text)!important}

/* Player, toolbar and modal */
.player .bar,.gamejoy-player-toolbar{background:var(--theme-footer)!important;color:var(--theme-footer-text)!important}
.player .bar .tools button,.gamejoy-player-toolbar .gamejoy-toolbar-tool{color:var(--theme-footer-text)!important}
.gamejoy-loading-card,.gamejoy-error-card{background:rgba(var(--theme-footer-rgb),.94)!important;color:var(--theme-footer-text)!important}
.gamejoy-loading-card p,.gamejoy-error-card p{color:var(--theme-footer-muted)!important}
.game-fullscreen-header{background:var(--theme-header)!important;border-top-color:var(--theme-accent)!important}
.gf-left strong{color:var(--theme-text)!important}.gf-left img{background:var(--theme-primary-soft)!important}
.gamejoy-player-modal{background:var(--theme-overlay)!important}
.gamejoy-player-modal-dialog,.gamejoy-report-dialog{background:var(--theme-dark-surface)!important;color:var(--theme-dark-text)!important;border-top-color:var(--theme-primary)!important}
.gamejoy-friend-search,.gamejoy-report-form textarea{background:var(--theme-dark-surface-alt)!important;color:var(--theme-dark-text)!important}

/* Footer */
footer{background:var(--theme-footer)!important;color:var(--theme-footer-text)!important}
.foot-grid h4{color:var(--theme-accent)!important}
.foot-grid a,.foot-links a,.foot-about p,.foot-bottom{color:var(--theme-footer-muted)!important}
.foot-grid a:hover,.foot-links a:hover{color:var(--theme-footer-text)!important}
.foot-about .logo .name .g{color:var(--theme-footer-text)!important}
.foot-social svg{fill:var(--theme-footer-text)!important}
.foot-social a:hover{background:var(--theme-primary)!important}

/* Ads, scrollbars and overlays */
::-webkit-scrollbar-thumb{background:var(--theme-primary)!important}
::-webkit-scrollbar-thumb:hover{background:var(--theme-secondary)!important}
.home .pills,.front-page .pills,body.home .pills{scrollbar-color:var(--theme-primary) var(--theme-background-alt)!important}
.home .pills::-webkit-scrollbar-track,.front-page .pills::-webkit-scrollbar-track,body.home .pills::-webkit-scrollbar-track{background:var(--theme-background-alt)!important}
.home .pills::-webkit-scrollbar-thumb,.front-page .pills::-webkit-scrollbar-thumb,body.home .pills::-webkit-scrollbar-thumb{background:var(--theme-primary)!important;border-color:var(--theme-background-alt)!important}
.ad,.ad-anchor{background:repeating-linear-gradient(45deg,var(--theme-background),var(--theme-background) 12px,var(--theme-background-alt) 12px,var(--theme-background-alt) 24px)!important;border-color:var(--theme-primary-border)!important;color:var(--theme-muted)!important}
.overlay-mask{background:rgba(var(--theme-footer-rgb),.50)!important}

/* Google button remains neutral but follows managed surface/text/border values. */
.gamejoy-google-login{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;box-shadow:var(--shadow)!important}
.gamejoy-google-login:hover{background:var(--theme-background-alt)!important;color:var(--theme-text)!important;border-color:var(--theme-primary-border)!important}
.gamejoy-social-divider{color:var(--theme-muted)!important}.gamejoy-social-divider:before,.gamejoy-social-divider:after{background:var(--theme-border)!important}

/* Keep status and destructive semantics manageable too. */
.gamejoy-password-meter.is-good,.gamejoy-sync-status[data-state=saved]{color:var(--theme-success)!important}
.gamejoy-sync-status[data-state=saved]::before{background:var(--theme-success)!important}
.gamejoy-sync-status[data-state=error]::before{background:var(--theme-danger)!important}.gamejoy-password-meter.is-weak{color:var(--theme-danger)!important}
.gamejoy-sync-status[data-state=saving]::before{background:var(--theme-warning)!important}

/* v3.5.36 — vote controls must blend with the dark player toolbar. */
.gamejoy-player-toolbar .gamejoy-vote-box,
.gamejoy-player-toolbar .gamejoy-vote-toolbar{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.gamejoy-player-toolbar .gamejoy-vote-button{
  background:color-mix(in srgb,var(--theme-footer-text) 12%,var(--theme-footer))!important;
  color:var(--theme-footer-text)!important;
  border:1px solid color-mix(in srgb,var(--theme-footer-text) 18%,transparent)!important;
  box-shadow:none!important;
}
.gamejoy-player-toolbar .gamejoy-vote-button:hover,
.gamejoy-player-toolbar .gamejoy-vote-button.is-active{
  background:var(--theme-primary)!important;
  color:var(--theme-button-text)!important;
  border-color:var(--theme-primary)!important;
}
.gamejoy-player-toolbar .gamejoy-vote-button[data-vote-value="-1"].is-active{
  background:var(--theme-danger)!important;
  color:var(--theme-button-text)!important;
  border-color:var(--theme-danger)!important;
}
