/* FBRKH Master Brand v857 | 2026-10-09
   Official r843 homepage identity extended across public pages and playable games.
   Appearance only: don't touch stage sizing, drawing canvas or game state. */
html[data-fbrkh-master="r857"] {
  --fbrkh-master-purple:#7023c8;
  --fbrkh-master-purple-deep:#2e124e;
  --fbrkh-master-violet:#a35af2;
  --fbrkh-master-ink:#29183e;
  --fbrkh-master-cream:#fffaf5;
  --fbrkh-master-mist:#f5effb;
  --fbrkh-master-gold:#ffcb66;
  --fbrkh-master-on-dark:#fff9ff;
  --fbrkh-master-muted-dark:#e2d2f0;
  --fbrkh-master-line-dark:rgba(224,202,255,.22);
  --fbrkh-master-shadow:0 18px 48px rgba(17,6,41,.24);
  --fbrkh-master-radius:20px;
  --fbrkh-master-accent:#a35af2;
  --fbrkh-master-accent2:#7323c8;
  --fbrkh-master-accent-glow:rgba(163,90,242,.26);
  font-synthesis:none;
}
html[data-fbrkh-master="r857"] body[data-game-brand="fbrkha"] {
  --fbrkh-master-accent:#7924c8;--fbrkh-master-accent2:#54218b;--fbrkh-master-accent-glow:rgba(163,90,242,.28);
  --game-accent:#a35af2;--game-accent-2:#d17eff;--game-glow:rgba(163,90,242,.28);
}
html[data-fbrkh-master="r857"] body[data-game-brand="qadha"] {
  --fbrkh-master-accent:#ac5627;--fbrkh-master-accent2:#83391d;--fbrkh-master-accent-glow:rgba(239,155,66,.25);
  --game-accent:#ef9b42;--game-accent-2:#ffc76d;--game-glow:rgba(239,155,66,.24);
}
html[data-fbrkh-master="r857"] body[data-game-brand="khaltaha"] {
  --fbrkh-master-accent:#af2d73;--fbrkh-master-accent2:#792052;--fbrkh-master-accent-glow:rgba(237,92,156,.26);
  --game-accent:#ed5c9c;--game-accent-2:#ff95c4;--game-glow:rgba(237,92,156,.25);
}
html[data-fbrkh-master="r857"] body[data-game-brand="top10"] {
  --fbrkh-master-accent:#2469b9;--fbrkh-master-accent2:#223f8a;--fbrkh-master-accent-glow:rgba(71,153,233,.25);
  --game-accent:#4799e9;--game-accent-2:#78c7ff;--game-glow:rgba(71,153,233,.25);
}
html[data-fbrkh-master="r857"] body:not(.platform-home) {
  font-family:"Alexandria",Tahoma,"Segoe UI",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(button,input,select,textarea) {
  font-family:inherit;
}
html[data-fbrkh-master="r857"] body[data-game-brand] {
  background:
    radial-gradient(ellipse at 90% 0%,rgba(156,74,230,.22),transparent 36rem),
    radial-gradient(ellipse at 10% 70%,rgba(251,181,109,.07),transparent 35rem),
    linear-gradient(146deg,#1c0c35 0%,#110a26 52%,#090617 100%);
}
/* App shell components use the same violet spectrum as the homepage hero.
   Do not apply layout or visibility overrides to actual game stages. */
html[data-fbrkh-master="r857"] body.fbrkh-commerce-shell,
html[data-fbrkh-master="r857"] body.public-v2,
html[data-fbrkh-master="r857"] body.utility-payment-result,
html[data-fbrkh-master="r857"] body.utility-legal {
  background:
    radial-gradient(ellipse at 85% 0%,rgba(141,66,216,.18),transparent 35rem),
    radial-gradient(ellipse at 8% 85%,rgba(255,196,109,.065),transparent 31rem),
    linear-gradient(160deg,#1c1032,#100a22 57%,#0e081a)!important;
  background-attachment:fixed!important;
}
/* Identical frosted navigation surfaces. Keep every page's original
   grid/flex structure, stickiness, hit targets and event handlers. */
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .fbrkh-site-header,.topbar,.q-nav,.k-top,.t10-nav,.participant-top
) {
  background:linear-gradient(135deg,rgba(47,23,73,.96),rgba(25,13,44,.96))!important;
  border-color:rgba(221,195,248,.20)!important;
  box-shadow:0 12px 35px rgba(12,5,30,.23)!important;
  color:var(--fbrkh-master-on-dark)!important;
}

html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .topbar,.q-nav,.k-top,.t10-nav
) { border-radius:18px; }
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .fbrkh-site-nav a,.topbar nav a,.q-platform-home,.t10-nav .nav-home
) {
  color:var(--fbrkh-master-on-dark)!important;
  -webkit-text-fill-color:var(--fbrkh-master-on-dark)!important;
  text-decoration:none;
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .fbrkh-site-nav a:hover,.topbar nav a:hover,.t10-nav .nav-home:hover
) {
  color:#fff!important;
  background:rgba(181,119,250,.17)!important;
}
/* Approved brand mark: no synthesized or re-drawn logos. */
html[data-fbrkh-master="r857"] .fbrkh-master-wordmark {
  display:block;
  width:clamp(80px,11vw,124px);
  height:56px;
  object-fit:contain;
  filter:drop-shadow(0 3px 7px rgba(7,2,19,.30));
}
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .q-brand img.game-brand-logo,.t10-brand img.game-brand-logo,
  .participant-top img.game-brand-logo
) { object-fit:contain; }
html[data-fbrkh-master="r857"] body[data-game-brand] .fbrkh-master-home-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:flex-start;
  width:max-content;
  max-width:100%;
  text-decoration:none;
  border-radius:12px;
  padding:0 5px;
}
html[data-fbrkh-master="r857"] body[data-game-brand] .fbrkh-master-home-link:focus-visible {
  outline:3px solid #ffcb66;
  outline-offset:3px;
}
/* Cards are from one family, with each game's one distinct accent. */
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .setup-card,.section-card,.k-card,.center-card,
  .home-action,.home-features > div,.mode-toggle,.answer-card
) {
  border-radius:var(--fbrkh-master-radius);
  border-color:var(--fbrkh-master-line-dark);
  box-shadow:0 12px 34px rgba(8,3,24,.18);
}
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .setup-card,.section-card,.k-card,.home-action,.mode-toggle
):focus-within {
  border-color:color-mix(in srgb,var(--fbrkh-master-accent) 58%,white 9%)!important;
}
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .setup-hero,.k-hero,.brand-hero,.hero-q
) {
  background-image:
    radial-gradient(ellipse at 90% 12%,color-mix(in srgb,var(--fbrkh-master-accent) 23%,transparent),transparent 46%),
    linear-gradient(137deg,rgba(60,25,91,.48),rgba(16,9,36,.20));
  border-radius:clamp(20px,3vw,30px);
}
/* Consistent game primary buttons. Preserve each built-in disabled state. */
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .btn.primary,.btn-primary,.t10-btn.primary,
  .k-btn:not(.ghost):not(.gold):not(.danger),
  .home-action-create:not([role="note"])
) {
  background:linear-gradient(135deg,var(--fbrkh-master-accent),var(--fbrkh-master-accent2))!important;
  box-shadow:0 10px 26px var(--fbrkh-master-accent-glow);
  border-radius:15px;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .btn.primary,.btn-primary,.t10-btn.primary,.k-btn,.home-action
):not(:disabled):hover {
  filter:brightness(1.065);
}
html[data-fbrkh-master="r857"] body[data-game-brand] :is(
  .btn.primary,.btn-primary,.t10-btn.primary,.k-btn,.home-action
):disabled {
  filter:none;
  box-shadow:none!important;
}
/* One input treatment across sessions. Never change input width/layout. */
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,textarea
):focus-visible {
  outline:2px solid var(--fbrkh-master-accent,#a35af2);
  outline-offset:2px;
}
/* Secondary pages: matching frosted cards with purple/amber highlight. */
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .store-featured-section,.store-promo-card,.support-card,.checkout-card,
  .legal-section,.legal-hero,.games-library-head,.account-value-center,
  .library-toolbar,.library-notice,.store-pass-comparison
) {
  border-radius:var(--fbrkh-master-radius);
  border-color:rgba(221,195,248,.17)!important;
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .store-hero > span,.store-heading > div > span,.legal-hero > span,
  .section-heading > span,.checkout-trust
) {
  color:#ffcf82!important;
  -webkit-text-fill-color:#ffcf82!important;
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .store-hero h1,.legal-hero h1,.games-library-head h2,
  .checkout-card h1
) {
  color:#fff9ff!important;
  -webkit-text-fill-color:#fff9ff!important;
  text-shadow:0 4px 17px rgba(11,2,29,.2);
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .store-hero p,.legal-hero p,.games-library-head p
) {
  color:#e5d8f1!important;
  -webkit-text-fill-color:#e5d8f1!important;
}
html[data-fbrkh-master="r857"] body:not(.platform-home) :is(
  .fbrkh-site-nav a,.topbar nav a,.t10-nav a,.q-nav a
):focus-visible {
  outline:3px solid var(--fbrkh-master-gold);
  outline-offset:3px;
}
/* Official platform mark in existing navigation surfaces. Don't hide the
   individual game brand or replace game-specific logos in a scoreboard. */
html[data-fbrkh-master="r857"] body[data-game-brand="fbrkha"] .brand-hero > .fbrkh-master-home-link {
  margin-inline:0 auto;
  margin-block:-2px 10px;
}
html[data-fbrkh-master="r857"] body[data-game-brand="fbrkha"] .brand-hero > .fbrkh-master-home-link .fbrkh-master-wordmark {
  width:116px;height:54px;
}
@media(max-width:760px) {
  html[data-fbrkh-master="r857"] body[data-game-brand] :is(
    .setup-card,.section-card,.k-card,.center-card,.home-action
  ){border-radius:16px;}
  html[data-fbrkh-master="r857"] body[data-game-brand="fbrkha"] .brand-hero > .fbrkh-master-home-link {
    margin-inline:0 auto;
    margin-block:0 5px;
  }
  html[data-fbrkh-master="r857"] body[data-game-brand="fbrkha"] .brand-hero > .fbrkh-master-home-link .fbrkh-master-wordmark {
    width:90px;height:42px;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[data-fbrkh-master="r857"] body[data-game-brand] :is(.btn,.k-btn,.t10-btn,.home-action) {
    transition:none!important;
  }
}
/* Accessibility: respect the existing light-mode selector, without forcing
   dark hero gradients below dark text in user-selected light mode. */
html[data-fbrkh-master="r857"][data-theme="light"] body[data-game-brand] {
  background:
    radial-gradient(circle at 90% 0%,rgba(168,105,229,.10),transparent 28rem),
    linear-gradient(165deg,#fffaf5,#f4effb 72%,#f9f5ff)!important;
}
html[data-fbrkh-master="r857"][data-theme="light"] body[data-game-brand] :is(.setup-hero,.k-hero,.brand-hero,.hero-q) {
  background-image:linear-gradient(130deg,rgba(196,150,236,.15),rgba(255,246,233,.45))!important;
}
html[data-fbrkh-master="r857"][data-theme="light"] body:not(.platform-home):is(
  .fbrkh-commerce-shell,.public-v2,.utility-payment-result,.utility-legal
) {
  background:linear-gradient(155deg,#fffaf5,#f4eefb)!important;
  color:#29183e!important;
}
html[data-fbrkh-master="r857"][data-theme="light"] body:not(.platform-home) :is(
  .store-hero h1,.legal-hero h1,.games-library-head h2,.checkout-card h1
) {
  color:#29183e!important;-webkit-text-fill-color:#29183e!important;
}
html[data-fbrkh-master="r857"][data-theme="light"] body:not(.platform-home) :is(
  .store-hero p,.legal-hero p,.games-library-head p
) {
  color:#5e4c70!important;-webkit-text-fill-color:#5e4c70!important;
}
html[data-fbrkh-master="r857"][data-theme="light"] body:not(.platform-home) :is(
  .store-hero > span,.store-heading > div > span,.legal-hero > span,.section-heading > span
) {
  color:#6d23ba!important;-webkit-text-fill-color:#6d23ba!important;
}
