/* FBRKH r858 — sitewide, homepage-derived design language.
   Applied after r857. Appearance only. Never override game stages, canvas,
   answer correctness, boards, QR, payments, session controls or approved home media.
   The approved home itself stays the exact visual source of truth. */
html[data-fbrkh-identity="r858"] {
  --fui-purple:#7023c8;
  --fui-deep:#2e124e;
  --fui-ink:#29183e;
  --fui-gold:#ffcb66;
  --fui-cream:#fffaf5;
  --fui-mist:#f5effb;
  --fui-contrast:#fff9ff;
  --fui-muted:#e5d8f1;
  --fui-stroke:rgba(223,197,251,.23);
  --fui-card-radius:20px;
  --fui-shadow:0 14px 36px rgba(16,6,38,.16);
  font-synthesis:none;
}
html[data-fbrkh-identity="r858"]:not([data-fbrkh-ui="home"]) body {
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
html[data-fbrkh-identity="r858"]:not([data-fbrkh-ui="home"]) :is(button,input,select,textarea) {
  font-family:inherit;
}
html[data-fbrkh-identity="r858"]:not([data-fbrkh-ui="home"]) :is(a,button,input,select,textarea,[tabindex]):focus-visible {
  outline:3px solid var(--fui-gold);
  outline-offset:3px;
}
/* One deliberate official logo for all site-branded links. Game logos inside
   game screens remain distinct; never touch stage and media artwork. */
html[data-fbrkh-identity="r858"] :is(
  .fbrkh-site-header .brand,.fbrkh-site-header .fbrkh-brand,
  .topbar > .brand,.topbar .brand,.k-site-home,.q-platform-home,
  .t10-nav .nav-home,.participant-top > a,.party-shell .brand
) img[src*="/assets/brand-r843/fbrkh-logo-light.webp"] {
  object-fit:contain;
  object-position:center;
  max-width:min(180px,36vw);
  height:auto;
  vertical-align:middle;
}
/* Stable corners, surfaces and navigation across the four distinct game brands.
   Colors continue to come from the individual game's r857 accent variables.
   Do NOT select .answer, .correct, .wrong, .board, .cell, canvas or video. */
html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
  .setup-card,.section-card,.center-card,.k-card,.home-action,
  .home-features > div,.mode-toggle,.answer-card,.join-card,
  .game-status-surface
) {
  border-radius:var(--fui-card-radius);
}
html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
  .setup-card,.section-card,.center-card,.k-card,.join-card
) {
  box-shadow:var(--fui-shadow);
}
html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
  .topbar,.q-nav,.k-top,.t10-nav,.participant-top
) {
  border-color:var(--fui-stroke);
  -webkit-backdrop-filter:saturate(125%);
  backdrop-filter:saturate(125%);
}
/* Move less and feel faster. Optical affordances only, no delays to gameplay. */
html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
  .btn,.btn-primary,.k-btn,.t10-btn,.home-action
):not(:disabled) {
  transition:filter 120ms ease,border-color 120ms ease,box-shadow 120ms ease;
}
@media(hover:hover) {
  html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
    .btn,.btn-primary,.k-btn,.t10-btn,.home-action
  ):not(:disabled):hover {
    filter:brightness(1.065);
  }
}
html[data-fbrkh-ui="game"][data-fbrkh-identity="r858"] body :is(
  .btn,.btn-primary,.k-btn,.t10-btn,.home-action
):disabled {
  box-shadow:none!important;
}
/* Shared public-page aesthetic derived from the warm off-white home,
   violet navigation and sparingly used gold. No new layouts are imposed. */
html[data-fbrkh-ui="secondary"][data-fbrkh-identity="r858"] body :is(
  .topbar,.fbrkh-site-header
) {
  border:1px solid var(--fui-stroke);
  border-radius:18px;
  box-shadow:0 12px 30px rgba(12,4,32,.18);
}
html[data-fbrkh-ui="secondary"][data-fbrkh-identity="r858"] body :is(
  .support-card,.checkout-card,.legal-section,.legal-hero,
  .store-featured-section,.store-promo-card,.store-pass-comparison,
  .library-toolbar,.library-notice,.games-library-head,
  .account-value-center,.faq-item,.info-card,.status-card
) {
  border-radius:var(--fui-card-radius);
  border-color:var(--fui-stroke);
  box-shadow:var(--fui-shadow);
}
html[data-fbrkh-ui="secondary"][data-fbrkh-identity="r858"] body :is(
  .topbar a,.fbrkh-site-nav a
):focus-visible {border-radius:8px;}
/* Internal administration: preserve protected auth and role logic, charts,
   table geometry and status severity indicators. Only shell/call-to-action
   treatments change. Keep admin pages noindex and never link them publicly. */
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body {
  --fbrkh-master-accent:var(--fui-purple);
  font-family:"Alexandria",Tahoma,"Segoe UI",Arial,sans-serif;
}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .login-card,.system-card,.game-card,.stat-card,.section-card,
  .panel,.tab-panel,.card,.summary-card,.admin-card
) {
  border-radius:var(--fui-card-radius);
  border-color:var(--fui-stroke);
}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .login-card,.system-card,.game-card,.admin-card
) {box-shadow:var(--fui-shadow);}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .topbar,.tabs
) {
  border-color:var(--fui-stroke);
}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .button.primary,button.btn-primary,a.btn-primary,button.primary
):not(:disabled) {
  background:linear-gradient(135deg,#8535d4,#56209a);
  color:#fff;
  border-color:rgba(228,198,255,.27);
  border-radius:14px;
}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .login-card > img,.brand > img
)[src*="/assets/brand-r843/"] {
  object-fit:contain;
  max-width:min(185px,56vw);
  height:auto;
}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  .eyebrow,.section-head .eyebrow
) {letter-spacing:0;color:var(--fui-gold);}
html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
  input:not([type="checkbox"]):not([type="radio"]),select,textarea
):focus-visible {border-color:#a35af2;outline:2px solid var(--fui-gold);}
/* Party / TV: same brand, but do NOT interfere with presenter fullscreen
   picture, display scaling, QR code, player names or responsive scoreboards. */
html[data-fbrkh-ui="party"][data-fbrkh-identity="r858"] body :is(
  .topbar,.party-card,.round-card,.game-card,.skeleton
),
html[data-fbrkh-ui="presenter"][data-fbrkh-identity="r858"] body .presenter-entry {
  border-radius:var(--fui-card-radius);
  border-color:var(--fui-stroke);
}
html[data-fbrkh-ui="party"][data-fbrkh-identity="r858"] body .topbar {
  background:linear-gradient(130deg,rgba(47,23,73,.96),rgba(25,13,44,.96));
  box-shadow:0 12px 36px rgba(15,7,37,.22);
}
html[data-fbrkh-ui="presenter"][data-fbrkh-identity="r858"] body .presenter-entry > img[src*="/assets/brand-r843/"] {
  object-fit:contain;
  max-width:min(230px,50vw);
  height:auto;
}
@media(max-width:600px) {
  html[data-fbrkh-identity="r858"] {--fui-card-radius:16px;}
  html[data-fbrkh-ui="secondary"][data-fbrkh-identity="r858"] body :is(.topbar,.fbrkh-site-header) {
    border-radius:14px;
  }
  html[data-fbrkh-ui="admin"][data-fbrkh-identity="r858"] body :is(
    .top-actions > button,.top-actions > a,.tabs > .tab
  ) {touch-action:manipulation;}
}
@media(prefers-reduced-motion:reduce) {
  html[data-fbrkh-identity="r858"] body :is(.btn,.btn-primary,.k-btn,.t10-btn,.home-action,.button) {
    transition:none!important;
  }
}
