/* Zweierkette v24700 · consistent functional surfaces · no replacement of original JS or forms.
   Light reference is the default. The one v24690 theme controller is the only authority. */
:root{--zk247-radius:12px;--zk247-content:1120px;--zk247-focus:2px solid var(--zk90-accent)}
html,body.zk80-app{scroll-padding-top:84px}
body.zk80-app *{box-sizing:border-box}
body.zk80-app :is(button,input,textarea,select,a){font-family:inherit}
body.zk80-app :is(a,button,input,textarea,select):focus-visible{outline:var(--zk247-focus)!important;outline-offset:2px}
body.zk80-app .zk-sidebar,body.zk80-app .zk-globalheader,body.zk80-app .zk-bottomnav{box-shadow:none!important}
body.zk80-app main{min-width:0;overflow-wrap:break-word}
body.zk80-app main :is(img,video,svg,canvas,iframe){max-width:100%;height:auto}
body.zk80-app main :is(.content-shell,.zk29-native-app,.zk186-shell,.zk23129-root,.page,.shell,.wrap,.container){max-width:min(100%,var(--zk247-content));min-width:0;margin-left:auto;margin-right:auto}
body.zk80-app main :is(.section,.view,.zk29-native-app,.zk186-shell){max-width:100%}
body.zk80-app main :is(.zk29-native-app,.community-ratings-minihero-v75,.club-stats-hero-v124,.community-global-shell-v154,.zk23129-root){box-shadow:none!important}
body.zk80-app main :is(.card,.panel,.mode-button,.zksh-card,.zk23110-card,.tool-card,.result-card,.league-block,.zk80-card){border-radius:var(--zk247-radius);box-shadow:none!important}
body.zk80-app main :is(input:not([type=checkbox]):not([type=radio]),textarea,select){width:100%;max-width:100%;min-width:0}
body.zk80-app main :is(button,[role="button"]){max-width:100%;overflow-wrap:anywhere}
body.zk80-app main :is(.tabs,.toolbar,.filters,.category-ranking-tabs,.league-stat-tabs-v124,.club-subnav-v124,.mode-strip,.cp-mode-grid,.zk80-pillnav,.zk90-links){gap:8px;max-width:100%;flex-wrap:wrap}
body.zk80-app main :is(.grid,.card-grid,.cards,.cp-form-grid,.cp-mode-grid,.cp-steps)>*{min-width:0}
body.zk80-app main :is(.table-scroll,.table-container,.category-ranking-list,.club-stat-table-grid-v124){max-width:100%;min-width:0;overflow-x:auto}
/* Avoid the duplicated v24690 heading when native, more useful page heading exists. */
body.zk80-app[data-zk24700-native-title="true"] .zk90-pagehead{display:none!important}
body.zk80-app main .zk24700-section-title{font-size:clamp(19px,2.1vw,27px);line-height:1.2;letter-spacing:-.025em;margin:.65em 0;color:var(--zk90-ink)}
/* Reference light card system for genuinely legacy interactive modules. */
html[data-zk-theme="light"] body.zk90-legacy main :is(.zk29-native-app,.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124,.view,.panel,.card,.tool-card,.result-card){color:var(--zk90-ink);border-color:var(--zk90-line);box-shadow:none!important}
html[data-zk-theme="light"] body.zk90-legacy main :is(.zk29-native-app,.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124){background:var(--zk90-surface)!important}
html[data-zk-theme="light"] body.zk90-legacy main :is(.section.light,.section--light){background:var(--zk90-bg)!important;color:var(--zk90-ink)!important}
html[data-zk-theme="light"] body.zk90-legacy main :is(.category-ranking-head,.club-stats-note-v124,.club-stats-method-v124,.zk30-rankentry,.zk30-note,.zk30-facts,.zk30-ranklist,.zk29-native-app .card){background:var(--zk90-surface);color:var(--zk90-ink);border-color:var(--zk90-line)}
/* Dark mode is opt-in; old hard-coded white/card backgrounds must not remain glaring white. */
html[data-zk-theme="dark"] body.zk80-app main :is(.section.light,.section--light,.view,.card,.panel,.tool-card,.result-card,.category-ranking-head,.category-ranking-tabs,.club-stats-note-v124,.club-stats-method-v124,.mode-button,.zk90-profile-overview,.zk29-native-app,.zk30-rankentry,.zk30-note,.zk30-facts,.zk30-ranklist,.content-shell){color:var(--zk90-ink)!important;border-color:var(--zk90-line)!important}
html[data-zk-theme="dark"] body.zk90-legacy main :is(.section.light,.section--light){background:var(--zk90-bg)!important}
html[data-zk-theme="dark"] body.zk90-legacy main :is(.zk29-native-app,.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124,.mode-button,.card,.panel,.result-card,.tool-card,.category-ranking-head,.club-stats-note-v124,.club-stats-method-v124,.zk30-rankentry,.zk30-ranklist){background:var(--zk90-surface)!important;color:var(--zk90-ink)!important}
html[data-zk-theme="dark"] body.zk80-app main :is(input:not([type=checkbox]):not([type=radio]),textarea,select){background:var(--zk90-input)!important;color:var(--zk90-ink)!important;border:1px solid var(--zk90-line)!important}
html[data-zk-theme="dark"] body.zk80-app main :is(input,textarea)::placeholder{color:var(--zk90-muted);opacity:1}
html[data-zk-theme="dark"] body.zk80-app main :is(.zk29-native-app,.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124) :is(h1,h2,h3,h4,p,label,span,small){color:inherit}
/* Ensure dark navigation does not accidentally inherit a light text palette. */
body.zk80-app .zk-sidebar :is(a,button,span,small,strong){color:inherit}
/* Mobile-first: preserve real controls without sideways overflow, let users scroll wide data tables. */
@media(max-width:900px){
 body.zk80-app main{width:auto;max-width:100%;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
 body.zk80-app main :is(.content-shell,.zk29-native-app,.zk186-shell,.zk23129-root,.page,.shell,.wrap,.container){max-width:100%!important;min-width:0!important}
 body.zk80-app main :is(.cp-form-grid,.zk90-profile-links){grid-template-columns:repeat(2,minmax(0,1fr))}
 body.zk80-app main :is(table,.league-stat-table-v124){max-width:100%;overflow-x:auto}
}
@media(max-width:600px){
 body.zk80-app main{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 body.zk80-app .zk90-links{display:flex;gap:6px}
 body.zk80-app .zk90-links a{padding:8px 10px;font-size:11px}
 body.zk80-app main :is(.cp-form-grid,.cp-steps,.zk90-profile-links){grid-template-columns:1fr}
 body.zk80-app main :is(.category-ranking-tabs,.league-stat-tabs-v124,.zk80-pillnav){overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;max-width:100%;-webkit-overflow-scrolling:touch}
 body.zk80-app main :is(.category-ranking-tabs,.league-stat-tabs-v124,.zk80-pillnav)>*{flex-shrink:0}
 body.zk80-app main :is(.zk29-native-app,.community-global-shell-v154,.community-ratings-minihero-v75,.club-stats-hero-v124){padding:14px!important}
 body.zk80-app main :is(.card,.panel,.tool-card,.result-card){max-width:100%}
}
@media(prefers-reduced-motion:reduce){body.zk80-app *,body.zk80-app *:before,body.zk80-app *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* A real regression caught by v24700 viewport QA: the classic Kette page forces a dark
   body even when the canonical theme is light. Only the deliberate dark feature banners
   remain dark; the overall page follows the user's light theme selection. */
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk24700-group="kette"]{
 background-color:var(--zk90-bg)!important;background-image:none!important;color:var(--zk90-ink)!important;
}
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk24700-group="kette"] main{
 background:var(--zk90-bg)!important;color:var(--zk90-ink)!important;
}
html[data-zk-theme="light"] body.zk80-app.zk90-legacy[data-zk24700-group="kette"] main>.zk29-native-app{
 background:var(--zk90-surface)!important;color:var(--zk90-ink)!important;
}
/* Ticket-art is decorative; it must not enlarge the mobile document width. */
@media(max-width:600px){
 body.zk80-app[data-zk24700-group="tickets"] main .hero{overflow:hidden!important}
 body.zk80-app[data-zk24700-group="tickets"] main .ticket-art{max-width:48%;min-width:0}
}
/* These three historic :has() rules carry an ID/class selector that outranks
   ordinary page-body theme CSS. They were the source of the random dark screens
   in LIGHT mode even with one canonical theme switch. */
html[data-zk-theme="light"] body.zk80-app:has(#zk224-home),
html[data-zk-theme="light"] body.zk80-app:has(#zk401-tool),
html[data-zk-theme="light"] body.zk80-app:has(.zk38-games-hub){
 background:var(--zk90-bg)!important;color:var(--zk90-ink)!important;
}
/* Explicit contrast for the original Kette hero, whose subtitle was moved from h1
   to h2 during semantic heading cleanup. It remains white on a deep green banner. */
body.zk80-app[data-zk24700-group="kette"] .zk218-workspace-heading .zk24700-section-title{color:#f4fff6!important}
