/* One palette per app, shared by landing, support, privacy, terms and errors.
   This is the final visual layer; layout and all app-specific content remain. */
html[data-theme="playful"] body,
html[data-theme="playful"] [data-palette] {
  --bg:#faf9fc;--bg-alt:#faf9fc;--surface:#fff;--text:#252331;--muted:#5e586d;
  --accent:#7040ac;--on-accent:#fff;--border:#e1dce8;--tint:#efe9f7;
}
html[data-theme="dark"] body,
html[data-theme="dark"] [data-palette] {
  --bg:#17151d;--bg-alt:#17151d;--surface:#211e29;--text:#f5f2fa;--muted:#c3bbcf;
  --accent:#c6a1f2;--on-accent:#17151d;--border:#3d354c;--tint:#30263f;
}
html[data-theme="playful"] body[data-app="gate-rush"],html[data-theme="playful"] [data-palette="gate-rush"] {
  --bg:#f1f8f6;--surface:#fcfffe;--text:#203b38;--muted:#506c67;--accent:#176b5d;--border:#d1e3dc;--tint:#deeee8;
}
html[data-theme="dark"] body[data-app="gate-rush"],html[data-theme="dark"] [data-palette="gate-rush"] {
  --bg:#111e1c;--surface:#192b27;--text:#eff9f5;--muted:#b2cbc1;--accent:#75d6b7;--border:#315046;--tint:#234439;
}
html[data-theme="playful"] body[data-app="hue-bounce"],html[data-theme="playful"] [data-palette="hue-bounce"] {
  --bg:#f7f3fc;--surface:#fffaff;--text:#342841;--muted:#6c5c7b;--accent:#7436ae;--border:#e1d5eb;--tint:#ebe0f5;
}
html[data-theme="dark"] body[data-app="hue-bounce"],html[data-theme="dark"] [data-palette="hue-bounce"] {
  --bg:#1c1625;--surface:#282033;--text:#f7efff;--muted:#cebddc;--accent:#cea2f1;--border:#4b375d;--tint:#38264b;
}
html[data-theme="playful"] body[data-app="glucolumi"],html[data-theme="playful"] [data-palette="glucolumi"] {
  --bg:#f0f7fa;--surface:#fbfdff;--text:#203d4b;--muted:#516c79;--accent:#136e84;--border:#ccdfe8;--tint:#dcecf3;
}
html[data-theme="dark"] body[data-app="glucolumi"],html[data-theme="dark"] [data-palette="glucolumi"] {
  --bg:#121e25;--surface:#1b2b34;--text:#edf8ff;--muted:#b4cbd8;--accent:#7ed4e8;--border:#315260;--tint:#203f4c;
}
html[data-theme="playful"] body[data-app="one-more"],html[data-theme="playful"] [data-palette="one-more"] {
  --bg:#f7f2e8;--surface:#fffdf8;--text:#29302b;--muted:#575e56;--accent:#b83219;--border:#dbd9ce;--tint:#efe8db;
}
html[data-theme="dark"] body[data-app="one-more"],html[data-theme="dark"] [data-palette="one-more"] {
  --bg:#191c19;--surface:#222822;--text:#f7f2e8;--muted:#c1c8bd;--accent:#ff9b79;--border:#485046;--tint:#2d352d;
}
html[data-theme] body[data-app],html[data-theme] [data-palette] {
  --bg-alt:var(--bg);--nav-bg:var(--bg);--chip:var(--tint);--chip-bg:var(--tint);
  --nav:var(--bg);--hero:var(--hero-bg);--maxw:1040px;
  --radius:20px;--radius-sm:14px;
  --shadow-sm:0 8px 24px -18px rgba(0,0,0,.16);--shadow:0 20px 44px -30px rgba(0,0,0,.25);
  --hero-bg:radial-gradient(ellipse at 70% 0%,var(--tint),transparent 72%);
  --gate-grad:linear-gradient(110deg,var(--text),var(--accent));
  color:var(--text);background-color:var(--bg);
}
/* A single quiet canvas, instead of alternating white/pink/teal strips. */
html[data-theme] body header,
html[data-theme] body .app-bar {background:var(--bg);border-color:var(--border);backdrop-filter:none;}
html[data-theme] body .hero {background:var(--hero-bg);border:0;}
html[data-theme] body.document-page .hero {background:none;}
html[data-theme] body .features-section,
html[data-theme] body .download-section,
html[data-theme] body .rewards,
html[data-theme] body footer {background:var(--bg);border-color:var(--border);}
html[data-theme] body .features-section {border-bottom:0;}
html[data-theme] body .feature,
html[data-theme] body .card,
html[data-theme] body .pack-card,
html[data-theme] body .download-card,
html[data-theme] body .value {background:var(--surface);border-color:var(--border);box-shadow:var(--shadow-sm);}
html[data-theme] body .eyebrow,
html[data-theme] body .feature .fic {color:var(--accent);}
html[data-theme] body .feature .fic {background:var(--tint);}
html[data-theme] body .feature .fic {display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;}
html[data-theme] body[data-app] .app-bar .app-tabs a[aria-current="page"],
html[data-theme] body .primary-button,
html[data-theme] body .btn-primary,
html[data-theme] body article .email,
html[data-theme] body .appswitch a[aria-current] {background:var(--accent);color:var(--on-accent);box-shadow:none;}
html[data-theme] body .support-button,
html[data-theme] body .btn-ghost,
html[data-theme] body .btn-beta {background:var(--surface);border:1px solid var(--border);color:var(--text);box-shadow:none;}
html[data-theme] body article a:not(.email):not(.appcard):not(.btn):not(.btn-primary):not(.primary-button):not(.support-button):not(.btn-ghost):not(.btn-beta) {color:var(--accent);}
html[data-theme] body[data-app] .hero .brand-text {background:var(--gate-grad);background-clip:text;-webkit-background-clip:text;}
html[data-theme] body .theme-toggle,
html[data-theme] body .lang-toggle {background:var(--surface);border-color:var(--border);box-shadow:var(--shadow-sm);color:var(--text);}
html[data-theme] body .theme-toggle,
html[data-theme] body .lang-toggle {min-width:44px;min-height:44px;bottom:max(16px,env(safe-area-inset-bottom));}
/* Neutral studio backdrop. App cards carry the same app palette as their pages. */
html[data-theme] body.studio-home #games,
html[data-theme] body.studio-home #apps,
html[data-theme] body.studio-home #about,
html[data-theme] body.studio-home #contact {background:transparent;border:0;}
html[data-theme] body .game-card[data-palette],
html[data-theme] body .appcard[data-palette] {background:var(--bg);color:var(--text);border-color:var(--border);box-shadow:none;}
html[data-theme] body .game-art {background:transparent;box-shadow:none;}
html[data-theme] body [data-palette] .genre {color:var(--accent);}
html[data-theme] body .feature-grid[data-palette] {background:transparent;}
html[data-theme] body.studio-home .hero .brand-text {background:var(--gate-grad);background-clip:text;-webkit-background-clip:text;}
html[data-theme] body.studio-home .cta-card {background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:none;}
html[data-theme] body.studio-home .cta-card p {color:var(--muted);opacity:1;}
html[data-theme] body .tag {background:var(--tint);color:var(--accent);}
/* Campaign UI belongs to Gate Rush, not an unrelated pink colour scheme. */
html[data-theme] body[data-app="gate-rush"] .download-guide {background:var(--tint);border-color:var(--border);}
html[data-theme] body[data-app="gate-rush"] .open-guide {background:var(--tint);border-color:var(--border);}
html[data-theme] body[data-app="gate-rush"] .download-arrow {background:var(--accent);color:var(--on-accent);}
html[data-theme] body[data-app="gate-rush"] .open-guide-arrow {background:var(--accent);color:var(--on-accent);}
html[data-theme] body[data-app="gate-rush"] .download-arrow::after {border-color:var(--accent);}
html[data-theme] body[data-app="gate-rush"] .open-guide-arrow::after {border-color:var(--accent);}
html[data-theme] body[data-app="gate-rush"] .reward {background:var(--surface);border-color:var(--border);}
html[data-theme] body[data-app="gate-rush"] .reward-icon,
html[data-theme] body[data-app="gate-rush"] .reward-icon.duo svg {background:var(--tint);color:var(--accent);}
html[data-theme] body[data-app="gate-rush"] .pack-badge {background:var(--tint);color:var(--accent);box-shadow:none;}
html[data-theme] body[data-app="gate-rush"] .source-chip {background:var(--surface);color:var(--text);border-color:var(--border);}
html[data-theme] body .hero-chip {background:var(--surface);color:var(--text);border-color:var(--border);}
html[data-theme] body footer {margin-top:0;}
html[data-theme] body .footer-links {display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px;}
html[data-theme] body footer {padding-bottom:100px;}
html[data-theme] body :focus-visible {outline-color:var(--accent);}
@media(max-width:760px){
  html[data-theme] body header {display:block;position:relative;}
  html[data-theme] body header nav {min-height:50px;gap:12px;}
  html[data-theme] body header .logo img {height:21px;max-width:100%;}
  html[data-theme] body header .back {display:inline-flex;align-items:center;min-height:44px;font-size:.78rem;}
  html[data-theme] body .app-bar .app-bar-inner {min-height:60px;padding-block:8px;}
}
@media(max-width:560px){
  html[data-theme] body .download-card>.primary-button,
  html[data-theme] body .download-card>.support-button {grid-column:1/-1;justify-self:stretch;text-align:center;}
}
