/* WIND GAME light theme for game pages (group 1, item 12, 2026-10-20).
   Loaded last on each game page; active only under html.gl[data-theme="light"].
   - page background, top bar, titles, footer and the stake bar get light theme tokens;
   - the playing field (canvas, 3D race, rocket space, card table, coin scene, number boards)
     keeps its night art in a light frame;
   - side panels / cards / rule blocks of pages without their own light rules are normalised to
     the dark design and then shown light with invert(1)+hue-rotate(180deg): text, buttons and
     status colours (win/error) keep their relative contrast; images are inverted back.
   Pages with native light rules (Duel: html.gl-native) skip the inversion. */
html[data-theme="light"]{
  --gl-bg:var(--wg-pale);--gl-bg-2:var(--wg-pale);--gl-surface:#ffffff;--gl-line:var(--wg-pale-2);
  --gl-text:var(--wg-s2);--gl-muted:var(--wg-accent-lo);--gl-accent:var(--wg-accent-lo);--gl-accent-2:var(--wg-accent-lo);--gl-green:var(--wg-accent-lo);
  color-scheme:light;background:var(--gl-bg)
}
html.gl[data-theme="light"] body{background:linear-gradient(180deg,var(--gl-bg-2),var(--gl-bg) 60%)!important;color:var(--gl-text)}
html.gl[data-theme="light"] body .tz3-scene{display:none!important}
/* Top bar of the game shell. */
html.gl[data-theme="light"] body header.wg-shell-header{background:linear-gradient(180deg,#ffffff,var(--wg-pale))!important;border-color:var(--gl-line)!important;box-shadow:0 6px 18px color-mix(in srgb,var(--wg-s4) 7.8%,transparent)!important}
html.gl[data-theme="light"] body header.wg-shell-header :is(a,span,strong,.brand,.back),html.gl[data-theme="light"] body>header :is(.brand,.back),html.gl[data-theme="light"] body .topbar nav a{color:var(--gl-text)!important;-webkit-text-fill-color:currentColor;text-shadow:none!important}
html.gl[data-theme="light"] body header.wg-shell-header :is(.brand b,.brand span,.demo-tag,.accent),html.gl[data-theme="light"] body>header .brand :is(b,span){color:var(--gl-green)!important}
html.gl[data-theme="light"] body .demo-tag{border-color:var(--wg-accent-hi)!important}
/* Titles and intro text (the tz3 night-scene rules kept them light). */
html.gl[data-theme="light"] body :is(.intro,.topbar,.page-head,.hero-copy,.hilo-hero,.th-hero-copy,main>header,.title,.head,.game-head,section.hero) h1{color:var(--gl-text)!important;-webkit-text-fill-color:currentColor!important;text-shadow:none!important;background:none!important}
html.gl[data-theme="light"] body :is(.intro,.topbar,.page-head,.hero-copy,.hilo-hero,.th-hero-copy,main>header,.title,.head,.game-head,section.hero) h1 :is(em,span,b,i,.accent){color:var(--gl-accent)!important;-webkit-text-fill-color:currentColor!important;background:none!important;text-shadow:none!important}
html.gl[data-theme="light"] body :is(.intro,.page-head,.hero-copy,.hilo-hero,.th-hero-copy,main>header,.title,.head,.game-head,section.hero) :is(p:not(.eyebrow),.hero-lead,.back){color:var(--gl-muted)!important;text-shadow:none!important}
html.gl[data-theme="light"] body :is(.intro,.topbar,.page-head,.hero-copy,.hilo-hero,.th-hero-copy,main>header,.title,.head,.game-head,section.hero) .eyebrow,html.gl[data-theme="light"] body .hilo-kicker{color:var(--gl-green)!important}
html.gl[data-theme="light"] body section.hero:not(.wg-home-hero),html.gl[data-theme="light"] body section.th-hero{background:radial-gradient(circle at 80% 40%,var(--wg-pale-2),transparent 45%),linear-gradient(135deg,#ffffff,var(--wg-pale))!important;border-color:var(--gl-line)!important;box-shadow:0 12px 30px color-mix(in srgb,var(--wg-s4) 7.8%,transparent)!important}
html.gl[data-theme="light"] body footer{color:var(--gl-muted)!important}
html.gl[data-theme="light"] body footer a{color:var(--gl-green)!important}
html.gl[data-theme="light"] body .wg-guest-play small{color:var(--gl-muted)!important}
html.gl[data-theme="light"] body :is(#status,p.status){color:var(--gl-accent-2)!important}
/* Stake bar (assets/stake-bar.css) through its own tokens. */
html[data-theme="light"] .sbar{--sb-bg:var(--wg-pale);--sb-bg2:#ffffff;--sb-line:var(--wg-accent-hi);--sb-text:var(--wg-s2);--sb-muted:var(--wg-accent-lo);--sb-cyan:var(--wg-accent);--sb-gold:#9a6400;--sb-lime:var(--wg-accent-lo);box-shadow:0 8px 22px color-mix(in srgb,var(--wg-s4) 10.2%,transparent)}
html[data-theme="light"] .sbar .sbar-amount{background:#ffffff}
html[data-theme="light"] .sbar .sbar-step{background:radial-gradient(circle at 35% 30%,#ffffff,var(--wg-pale));color:var(--wg-accent-lo);border-color:var(--wg-accent-hi)}
html[data-theme="light"] .sbar .sbar-quick button{background:#ffffff;color:var(--wg-s2);border-color:var(--wg-accent-hi)}
html[data-theme="light"] .sbar .sbar-value{text-decoration-color:#9a640080}
/* Side panels and cards: normalise to the dark design, then invert to light. */
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls){background-color:var(--wg-s2)!important;background-image:linear-gradient(160deg,var(--wg-s3),var(--wg-s2))!important;color:var(--wg-text-tint);border-color:var(--wg-accent-lo)!important;filter:invert(1) hue-rotate(180deg) brightness(1.05);box-shadow:none!important}
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) :is(h2,h3,h4,.eyebrow,summary,label){color:var(--wg-text-tint)!important;-webkit-text-fill-color:currentColor}
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) :is(p,small,.fine,.message,.notice,.panel-intro,.risk-caption,.mode-label,.hint):not(.error):not(.bad):not(.good):not(.win){color:var(--wg-text-tint)!important}
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) .wg-guest-play small{color:var(--wg-text-tint)!important}
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) :is(img,picture,video,canvas,.sbar){filter:invert(1) hue-rotate(180deg)}
/* Keno / Limbo boards (dark fields): own counters stay light. */
html.gl[data-theme="light"] body :is(section.stage,section.race-stage,section.table,.hilo-table,.rs-stage,.mines-field){box-shadow:0 14px 34px color-mix(in srgb,var(--wg-s4) 14.9%,transparent);border-color:var(--gl-line)}
html.gl[data-theme="light"] body :is(section.race-stage,section.stage,section.table,.hilo-table,.rs-stage) :is(h2,h3,.eyebrow,strong,em,.paytable-head span){color:var(--wg-text-tint)!important;-webkit-text-fill-color:currentColor}
html.gl[data-theme="light"] body :is(section.tz3-stage-host,section.table.tz3-stage-host){background:radial-gradient(120% 90% at 50% 0%,var(--wg-s5),var(--wg-s2) 70%)!important}
html.gl[data-theme="light"] body .topbar-right span{color:var(--gl-muted)!important}
/* Small leftovers found by the contrast check. */
html.gl[data-theme="light"] body :is(.topbar,header.top,header.wg-shell-header) nav a{background:#ffffff!important;border-color:var(--wg-accent-hi)!important;color:var(--gl-text)!important}
html.gl[data-theme="light"] body .sbar .sbar-note:not(.is-error){color:var(--wg-accent-lo)!important}
html.gl[data-theme="light"] body :is(.status-chip,.w-chip,.pill,.mode-pill){background:var(--wg-pale)!important;color:var(--wg-accent-lo)!important;border-color:var(--wg-accent-hi)!important;text-shadow:none!important}
html.gl[data-theme="light"] body :is(.th-kicker,.stake-overview span){color:var(--gl-green)!important}
html.gl[data-theme="light"] body .stake-overview strong{background:#ffffff!important;color:var(--gl-text)!important;border-color:var(--wg-accent-hi)!important}
html.gl[data-theme="light"] body :is(p.footnote,.how b,.steps b){color:var(--gl-muted)!important}
html.gl[data-theme="light"] body header.top{border-color:var(--gl-line)!important}
html.gl[data-theme="light"] body header.top .brand{color:var(--gl-text)!important}
html.gl[data-theme="light"] body header.top .brand b{color:var(--gl-green)!important}
/* A listed block inside another listed block must not be inverted twice. */
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls){filter:none!important;background-image:none!important;background-color:transparent!important}
/* Guest "sign in and play" call to action keeps its lime button colours inside inverted panels. */
html.gl:not(.gl-native)[data-theme="light"] body :is(aside.control-panel,aside.bet-panel,aside.controls,aside.wallet,aside.panel,section.panel,div.controls,.hilo-panel,.info-card,details.proof,details.rules,details.fairness,section.proof,section.rk-players,section.odds-box,.stake-block,.feedback,section.gate,.th-card,.balance-chip,.mh-tile,.sg-controls) .wg-guest-play :is(a,button){filter:invert(1) hue-rotate(180deg)}
/* Sound button, game tabs, rooms flow and status line. */
html.gl[data-theme="light"] body .wg-sfx-btn{background:#ffffff!important;color:var(--wg-accent-lo)!important;border-color:var(--wg-accent-hi)!important}
html.gl[data-theme="light"] body .wg-sfx-btn[aria-pressed="false"]{color:var(--wg-accent-hi)!important}
html.gl[data-theme="light"] body .game-tabs a{background:#ffffff!important;color:var(--gl-text)!important;border-color:var(--wg-accent-hi)!important;box-shadow:none!important}
html.gl[data-theme="light"] body .game-tabs a:is([aria-current],.active,[aria-selected="true"]){background:linear-gradient(135deg,var(--wg-accent),var(--wg-accent))!important;color:#fff!important;border-color:var(--wg-accent)!important}
html.gl[data-theme="light"] body .flow b{color:#9a6400!important}
html.gl[data-theme="light"] body .flow span{color:var(--gl-muted)!important}
html.gl[data-theme="light"] body .flow>div{border-color:var(--wg-pale-2)!important}
html.gl[data-theme="light"] body p#status.status{background:#ffffff!important;border-color:var(--gl-line)!important;color:var(--gl-accent-2)!important}
html.gl[data-theme="light"] body .sbar .sbar-value{color:var(--sb-gold)!important}
