/* ZK24710 · functional-first component design, applied to EVERY canonical page.
 * Maintains all original modules and handlers. Avoids destructive "reset all" rules. */
:root,html[data-zk-theme="light"]{--zk10-bg:#f5f7f5;--zk10-panel:#ffffff;--zk10-soft:#f0f5f1;--zk10-text:#182f22;--zk10-muted:#617668;--zk10-edge:#dce7df;--zk10-green:#176b4a;--zk10-contrast:#10251b}
html[data-zk-theme="dark"]{--zk10-bg:#111c15;--zk10-panel:#1c2b21;--zk10-soft:#24362b;--zk10-text:#edf7ef;--zk10-muted:#b8cdbc;--zk10-edge:#435a48;--zk10-green:#8bdeae;--zk10-contrast:#10251b}
html[data-zk-theme] body.zk80-app[data-zk10-version="24710"]{background:var(--zk10-bg)!important;color:var(--zk10-text)!important;background-image:none!important;min-height:100vh}
body.zk80-app[data-zk10-version="24710"] main{color:var(--zk10-text);min-width:0;max-width:100%;padding-top:10px}
body.zk80-app[data-zk10-version="24710"] .zk-sidebar{background:#10251b!important;color:#f8fff9!important}
body.zk80-app[data-zk10-version="24710"] .zk-globalheader,body.zk80-app[data-zk10-version="24710"] .zk-bottomnav{background:var(--zk10-panel)!important;color:var(--zk10-text)!important;border-color:var(--zk10-edge)!important}
body.zk80-app[data-zk10-version="24710"] :is(.zk-globalheader,.zk-sidebar,.zk-bottomnav,.zk90-pagehead){box-shadow:none!important}
body.zk80-app[data-zk10-version="24710"] main :is(h1,h2,h3){line-height:1.18;letter-spacing:-.025em;overflow-wrap:anywhere}
body.zk80-app[data-zk10-version="24710"] main h1{font-size:clamp(25px,3.1vw,36px)}
body.zk80-app[data-zk10-version="24710"] main h2{font-size:clamp(18px,2.25vw,25px)}
body.zk80-app[data-zk10-version="24710"] main p{line-height:1.55}
body.zk80-app[data-zk10-version="24710"] :is(.zk90-pagehead,.zk90-links,.zk10-contextnav,.zk90-profile-overview){max-width:1120px;margin-left:auto!important;margin-right:auto!important}
/* Canonical subnavigation: discoverability of rankings and tools, without another global navigation. */
.zk10-contextnav{display:flex;flex-wrap:wrap;gap:7px;margin:5px auto 16px!important;max-width:1120px;width:100%;padding:0 2px}
.zk10-contextnav a{border:1px solid var(--zk10-edge)!important;color:var(--zk10-text)!important;background:var(--zk10-panel)!important;text-decoration:none;font-size:12px;font-weight:700;line-height:1.2;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:9px;padding:9px 12px;min-height:36px;max-width:100%}
.zk10-contextnav a[aria-current="page"]{color:var(--zk10-green)!important;background:var(--zk10-soft)!important;border-color:var(--zk10-green)!important}
.zk10-contextnav a:hover{border-color:var(--zk10-green)!important}
/* Legacy panels get actual modern surfaces; do not replace their inner event-bound DOM. */
html[data-zk-theme] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.content-shell,.zk29-native-app,.zk186-shell,.page,.wrap,.container,.zk23129-root){min-width:0;max-width:1120px}
html[data-zk-theme] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.card,.panel,.tool-card,.result-card,.zksh-card,.zk23110-card,.zk29-native-app,.community-ratings-minihero-v75,.club-stats-hero-v124,.community-global-shell-v154,.zk30-ranklist,.zk30-facts,.zk30-note){border:1px solid var(--zk10-edge)!important;border-radius:12px!important;box-shadow:none!important}
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.card,.panel,.tool-card,.result-card,.zksh-card,.zk23110-card,.zk29-native-app,.community-ratings-minihero-v75,.club-stats-hero-v124,.community-global-shell-v154,.zk30-ranklist,.zk30-facts,.zk30-note){background:#fff!important;color:#182f22!important}
html[data-zk-theme="dark"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.card,.panel,.tool-card,.result-card,.zksh-card,.zk23110-card,.zk29-native-app,.community-ratings-minihero-v75,.club-stats-hero-v124,.community-global-shell-v154,.zk30-ranklist,.zk30-facts,.zk30-note){background:var(--zk10-panel)!important;color:var(--zk10-text)!important}
/* Retain purposeful deep-green banners but make formerly dark full-page wrappers follow theme. */
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.section.light,.section--light,.zk29-native-app,.zk186-shell,.content-shell){color:#182f22}
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.zk29-native-app,.zk186-shell,.club-stats-hero-v124) :is(h1,h2,h3,p,label){color:inherit}
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124,.category-ranking-head,.club-stats-note-v124,.club-stats-method-v124){background:#fff!important;color:#182f22!important}
html[data-zk-theme="dark"] body.zk80-app.zk90-legacy[data-zk10-version="24710"] main :is(.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124,.category-ranking-head,.club-stats-note-v124,.club-stats-method-v124){background:var(--zk10-panel)!important;color:var(--zk10-text)!important}
/* Interactive modules: unify form controls and call-to-action hierarchy. */
body.zk80-app[data-zk10-version="24710"] main :is(input:not([type=checkbox]):not([type=radio]),textarea,select){font-family:inherit!important;min-height:40px;max-width:100%;min-width:0;border-radius:9px!important;border:1px solid var(--zk10-edge)!important;background:var(--zk10-panel)!important;color:var(--zk10-text)!important;box-shadow:none!important}
body.zk80-app[data-zk10-version="24710"] main :is(input,textarea)::placeholder{color:var(--zk10-muted);opacity:1}
body.zk80-app[data-zk10-version="24710"] main :is(button,.btn,.button,[role="button"]){font-family:inherit!important;border-radius:9px;box-shadow:none!important;min-width:0;overflow-wrap:anywhere}
body.zk80-app[data-zk10-version="24710"] main :is(button,input,select,textarea,a):focus-visible{outline:2px solid var(--zk10-green)!important;outline-offset:3px}
body.zk80-app[data-zk10-version="24710"] main :is(.tabs,.toolbar,.filters,.club-subnav-v124,.discover-subnav-v143,.community-nav-v79,.category-ranking-tabs){max-width:100%;gap:8px}
body.zk80-app[data-zk10-version="24710"] main :is(.tabs,.toolbar,.filters,.club-subnav-v124,.discover-subnav-v143,.category-ranking-tabs){display:flex;flex-wrap:wrap}
body.zk80-app[data-zk10-version="24710"] main :is(.form-row,.form-grid,.field-row,.fields,.grid,.cards,.card-grid)>*{min-width:0}
body.zk80-app[data-zk10-version="24710"] main :is(table,.table-scroll,.table-container,.category-ranking-list,.club-stat-table-grid-v124){max-width:100%}
body.zk80-app[data-zk10-version="24710"] main :is(.table-scroll,.table-container,.club-stat-table-grid-v124){overflow-x:auto;-webkit-overflow-scrolling:touch}
/* Footer follows the chosen theme, not the historic global style. */
html[data-zk-theme] body.zk80-app[data-zk10-version="24710"] :is(.footer,.foot,.footer-inner){border-color:var(--zk10-edge)!important;color:var(--zk10-muted)}
html[data-zk-theme="light"] body.zk80-app[data-zk10-version="24710"] :is(.footer,.foot){background:#f5f7f5!important}
html[data-zk-theme="dark"] body.zk80-app[data-zk10-version="24710"] :is(.footer,.foot){background:#111c15!important}
/* The old native Kette selector used body:has() with forced dark background. */
html[data-zk-theme="light"] body.zk80-app[data-zk10-version="24710"]:has(#zk224-home),html[data-zk-theme="light"] body.zk80-app[data-zk10-version="24710"]:has(#zk401-tool),html[data-zk-theme="light"] body.zk80-app[data-zk10-version="24710"]:has(.zk38-games-hub){background-color:#f5f7f5!important;background-image:none!important;color:#182f22!important}
html[data-zk-theme="light"] body.zk80-app[data-zk10-version="24710"][data-zk24700-group="kette"] main{background-color:#f5f7f5!important;color:#182f22!important}
/* Do not re-colour intentional deep-green marketing banners. */
body.zk80-app[data-zk10-version="24710"] main :is(.hero,.zk70-pro,.zk218-workspace-heading,.zk320-hero){border-radius:12px;box-shadow:none!important}
body.zk80-app[data-zk10-version="24710"] main :is(.hero,.zk70-pro,.zk218-workspace-heading) :is(h1,h2,h3){text-wrap:balance}
/* Mandatory breakpoint-safe mobile UI, independent of function family. */
@media(max-width:900px){
 body.zk80-app[data-zk10-version="24710"] main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));min-width:0}
 body.zk80-app[data-zk10-version="24710"] main :is(.zk29-native-app,.zk186-shell,.page,.wrap,.container,.content-shell,.zk23129-root){width:100%;max-width:100%!important;min-width:0!important}
 body.zk80-app[data-zk10-version="24710"] main :is(.form-row,.fields,.form-grid){flex-wrap:wrap}
 body.zk80-app[data-zk10-version="24710"] main :is(img,iframe,video,canvas,svg){max-width:100%}
}
@media(max-width:600px){
 body.zk80-app[data-zk10-version="24710"] main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
 body.zk80-app[data-zk10-version="24710"] main h1{font-size:clamp(24px,7vw,30px)}
 body.zk80-app[data-zk10-version="24710"] main h2{font-size:clamp(18px,5.3vw,24px)}
 .zk10-contextnav{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 .zk10-contextnav a{white-space:nowrap;flex-shrink:0;font-size:11px;padding:8px 10px}
 body.zk80-app[data-zk10-version="24710"] main :is(.form-row,.form-grid,.cp-form-grid,.zk90-profile-links){grid-template-columns:minmax(0,1fr)!important}
 body.zk80-app[data-zk10-version="24710"] main :is(.category-ranking-tabs,.club-subnav-v124,.discover-subnav-v143,.community-nav-v79){overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}
 body.zk80-app[data-zk10-version="24710"] main :is(.category-ranking-tabs,.club-subnav-v124,.discover-subnav-v143,.community-nav-v79)>*{flex-shrink:0}
 body.zk80-app[data-zk10-version="24710"] main :is(.card,.panel,.tool-card,.result-card,.zk29-native-app,.club-stats-hero-v124){max-width:100%;padding-left:min(14px,4vw);padding-right:min(14px,4vw)}
}
@media(prefers-reduced-motion:reduce){body.zk80-app[data-zk10-version="24710"] *,body.zk80-app[data-zk10-version="24710"] *:before,body.zk80-app[data-zk10-version="24710"] *:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Real mobile overflow regression: three old modules did not constrain the shared logo.
   Natural 512px artwork must never control navbar width on an iPhone. */
body.zk80-app[data-zk10-version="24710"] :is(.zk-sidebar .zk-brand,.zk-globalheader .zk-topbrand){min-width:0;max-width:100%;display:inline-flex;align-items:center;gap:8px}
body.zk80-app[data-zk10-version="24710"] :is(.zk-sidebar .zk-brand img,.zk-globalheader .zk-topbrand img){display:block;width:34px!important;height:34px!important;min-width:34px;max-width:34px!important;object-fit:contain;flex:0 0 34px}
@media(max-width:600px){body.zk80-app[data-zk10-version="24710"] :is(.community-global-nav-v154,.community-nav-v79){max-width:100%!important;min-width:0!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}body.zk80-app[data-zk10-version="24710"] :is(.community-global-nav-v154,.community-nav-v79) a{min-width:0;flex-shrink:0}}
