/* Player surfaces share a smoky violet tint. Use the edge highlight on
   artwork and the stronger reflection on controls that sit on black. */
:is(html.bh-refined-theme, html.bh-player-theme) {
  --xh-glass-sheen: linear-gradient(118deg, rgb(251 243 255 / 11%), transparent 25%, transparent 78%, rgb(221 201 255 / 4%));
  --xh-glass-surface: linear-gradient(150deg, rgb(70 60 81 / 82%), rgb(27 24 34 / 87%) 58%, rgb(34 29 42 / 82%));
  --xh-glass-control: linear-gradient(168deg, rgb(244 228 255 / 11%), transparent 46%), linear-gradient(125deg, rgb(66 56 79 / 84%), rgb(38 32 47 / 79%) 68%, rgb(54 43 64 / 81%));
  --xh-glass-selected: linear-gradient(159deg, rgb(255 235 255 / 23%), transparent 43%), linear-gradient(113deg, rgb(101 70 137 / 94%), rgb(76 52 105 / 91%) 64%, rgb(104 73 128 / 93%));
  --xh-glass-primary: linear-gradient(159deg, rgb(255 235 255 / 22%), transparent 46%), linear-gradient(115deg, rgb(112 72 165 / 97%), rgb(76 55 152 / 96%) 70%, rgb(93 64 150 / 96%));
  --xh-glass-border: rgb(213 191 236 / 29%);
  --xh-glass-shadow: inset 0 1px 0 rgb(255 245 255 / 20%), inset 0 -1px 0 rgb(199 174 223 / 8%), 0 3px 12px rgb(0 0 0 / 29%);
  --xh-glass-control-shadow: inset 0 1px 0 rgb(255 245 255 / 29%), inset 0 0 0 1px rgb(222 199 245 / 11%), 0 2px 5px rgb(0 0 0 / 22%);
  --xh-glass-blur: blur(12px) saturate(1.15);

  --glass-panel: var(--xh-glass-surface);
  --glass-control: var(--xh-glass-control);
  --glass-selected: var(--xh-glass-selected);
  --glass-gold: var(--xh-glass-primary);
  --glass-shadow: var(--xh-glass-shadow);
  --portal-action: var(--xh-glass-primary);
  --form-button: var(--xh-glass-primary);
}

/* The main site and standalone player pages also create controls on demand. */
:where(html.bh-refined-theme, html.bh-player-theme) :where(button, input[type="button"], input[type="submit"], a.button) {
  background: var(--xh-glass-control);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-control-shadow);
}

.bh-refined-theme body.bh-surface :is(.bh-status, .bh-dialog, #site-dialog, .backup-site-notice,
    .rp-modal, .platform-customer-head, .platform-app-download-banner, .bh-broadcast),
.bh-refined-theme body.bh-surface #page-home .xhrr-desktop-lead .welcome-bar,
.bh-refined-theme body.bh-surface #main #page-game #bh-search .search-field,
.bh-refined-theme body.bh-surface[data-variant] .site-header .xh-header-balance,
.bh-refined-theme body.bh-surface[data-variant] .mobile-shell .bottom-nav {
  background: var(--xh-glass-surface);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow);
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
}
.bh-refined-theme body.bh-surface #main :is(#page-home #categories, #page-game #bh-lobby-categories, #page-game #bh-game-platforms, #page-game .library-toolbar .pill-tabs) {
  --nav-glass: var(--xh-glass-control);
  --nav-selected: var(--xh-glass-selected);
  --nav-edge: var(--xh-glass-border);
  --nav-light: var(--xh-glass-control-shadow);
}

.bh-refined-theme body.bh-surface :is(.dialog-close, .rp-close, .rp-dismiss, .rp-navigation button, .platform-customer-close, .platform-customer-external, .backup-site-notice-close, .backup-site-notice-links a, .bh-floating-download, .bh-broadcast-controls button),
.bh-refined-theme body.bh-surface #page-my .xh-page-bar .xh-back,
.bh-refined-theme body.bh-surface .site-header :is(#platformFloatingBack, .bh-profile .quiet-button, .bh-profile .bh-user-label),
.bh-refined-theme body.bh-surface #main #page-home .xhrr-desktop-lead .quick-actions > :is(button, a),
.bh-refined-theme body.bh-surface #main #page-game .bh-center-actions button,
.bh-refined-theme body.bh-surface #main .bh-status button,
.bh-refined-theme body.bh-surface #main #page-home .section-heading .text-button {
  background: var(--xh-glass-control);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-control-shadow);
  color: #f6efff;
}
.bh-refined-theme body.bh-surface #main #page-home .section-heading .text-button {
  padding-inline: 9px;
  border-radius: 999px;
}

/* The title is a single frosted plaque. A second, lighter gradient runs
   through the glyphs; changed category titles inherit the same treatment. */
.bh-refined-theme body.bh-surface #main #page-home :is(#games-heading, #activities-heading) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  margin: 0;
  padding: 3px 11px 3px 8px;
  border: 1px solid var(--xh-glass-border);
  border-radius: 10px;
  background: var(--xh-glass-sheen), var(--xh-glass-surface);
  box-shadow: var(--xh-glass-shadow);
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
  color: #f5eefa;
  line-height: 1.2;
}
.bh-refined-theme body.bh-surface #main #page-home :is(#games-heading, #activities-heading) [data-icon] {
  flex: none;
  width: 17px;
  height: 17px;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .bh-refined-theme body.bh-surface #main #page-home :is(#games-title, .xh-section-label) {
    background: linear-gradient(178deg, #fff 8%, #faefff 36%, #caaddd 52%, #efdaff 77%, #fff8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
  }
}
@media (forced-colors: active) {
  .bh-refined-theme body.bh-surface #main #page-home :is(#games-title, .xh-section-label) {
    background: none;
    color: CanvasText;
  }
}
.bh-refined-theme body.bh-surface :is(.rp-claim, .platform-app-download-button, .backup-site-notice-confirm, .bh-dialog .gold-button),
.bh-refined-theme body.bh-surface .site-header .bh-profile .gold-button,
.bh-refined-theme body.bh-surface #main #page-game #bh-search button,
.bh-refined-theme body.bh-surface #main #page-home .quick-actions [data-action="recharge"] {
  background: var(--xh-glass-primary);
  border-color: #bc9cdd;
  box-shadow: var(--xh-glass-control-shadow);
  color: #fff;
}
.bh-refined-theme .mobile-shell #main #page-home .xhrr-home-actions {
  --shortcut-count: 5;
  --shortcut-gap: 3px;
  gap: var(--shortcut-gap);
  align-items: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-actions :is(.wallet-actions, #home-shortcuts) > button {
  flex: 1 0 calc((100% + var(--shortcut-gap)) / var(--shortcut-count) - var(--shortcut-gap));
  justify-content: center;
  gap: 3px;
  padding: 4px 0;
  border-radius: 12px;
  background: var(--xh-glass-control);
  box-shadow: inset 0 1px 0 rgb(255 245 255 / 24%), inset 0 -1px 0 rgb(216 192 236 / 9%);
}
.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-actions button:focus-visible {
  outline-offset: -3px;
}
.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-actions #home-shortcuts .bh-shortcut-icon {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-actions #home-shortcuts .bh-shortcut-icon > .artwork {
  object-fit: contain;
  border-radius: 0;
}
@media (max-width: 359px) {
  .bh-refined-theme .mobile-shell #main #page-home .xhrr-home-actions { --shortcut-count: 4; }
}
.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-actions :is(.wallet-actions, #home-shortcuts) > button[data-action="recharge"] {
  background: var(--xh-glass-primary);
}
.bh-refined-theme .mobile-shell #main #page-home #categories { margin-bottom: 0; }
.bh-refined-theme .mobile-shell #main #page-home :is(#games, #activities) { margin: 10px 0 0; }
.bh-refined-theme .mobile-shell #main #page-home #game-grid { padding-bottom: 0; }
.bh-refined-theme .mobile-shell #main #page-home :is(#games, #activities) .section-heading {
  margin: 0 0 4px;
}

/* The five destinations share one glass rail, with a brighter lens on the
   active destination. Keep their text and the complete hit area unobstructed. */
.bh-refined-theme body.bh-surface[data-variant] :is(.mobile-shell .bottom-nav, .site-header .main-nav) a.is-active[aria-current="page"] {
  background: var(--xh-glass-selected);
  box-shadow: var(--xh-glass-control-shadow);
  color: #fff;
}
.bh-refined-theme body.bh-surface .site-header .bh-profile .xh-header-balance {
  border-color: var(--xh-glass-border);
}
.bh-refined-theme body.bh-surface :is(.site-header .bh-profile .xh-header-balance, #page-my .xh-member-balance) .xh-balance-refresh {
  background: var(--xh-glass-control);
  box-shadow: var(--xh-glass-control-shadow);
}
.bh-refined-theme body.bh-surface #main #page-game #bh-search button:disabled,
.bh-refined-theme body.bh-surface #main #page-game .bh-center-actions button:disabled {
  opacity: .58;
}
@media (hover: hover) and (pointer: fine) {
  .bh-refined-theme .xhrr-home-actions button:hover,
  .bh-refined-theme .quick-actions :is(a, button):hover,
  .bh-refined-theme .bh-profile button:not(:disabled):hover {
    filter: brightness(1.1);
  }
}
@media (prefers-reduced-transparency: reduce) {
  :is(html.bh-refined-theme, html.bh-player-theme) {
    --xh-glass-blur: none;
    --xh-glass-surface: linear-gradient(140deg, #37303e, #201c28 70%);
    --xh-glass-control: linear-gradient(145deg, #443b50, #2e2737);
    --xh-glass-primary: linear-gradient(135deg, #7549a2, #523a91);
    --xh-glass-selected: linear-gradient(135deg, #714f91, #563d69);
  }
}

/* The glass is confined to the frame, caption and controls. The artwork stays
   on its own layer, including when the full poster is a link or button. */
.bh-refined-theme body.bh-surface #main #page-home :is(.xhrr-home-poster .carousel-viewport, .xhrr-desktop-lead [data-carousel]) {
  outline: 1px solid var(--xh-glass-border);
  outline-offset: -1px;
  background: var(--xh-glass-surface);
  box-shadow: var(--xh-glass-shadow);
}

.bh-refined-theme body.bh-surface #main #page-home .xhrr-home-poster {
  background: transparent;
  outline: none;
  box-shadow: none;
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .game-card {
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--xh-glass-surface);
  box-shadow: 0 3px 12px rgb(0 0 0 / 29%);
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card .game-art {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card .game-art > .artwork {
  display: block;
  border-radius: 0;
}

/* The original 200px PG tiles have a white rim and transparent rounded
   corners. Match the verified file hashes, which also survive thumbnail URLs.
   Other covers, including the newer full-bleed PG art, keep their framing. */
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-art > img.artwork:is(
    [src*="-0161c702c15097e4b055."], [src*="-01cefa34dcc4e4e87b0e."], [src*="-039adab88ce7acbbcaaf."],
    [src*="-0593b07f89431eac1107."], [src*="-063d5b726ab4fa471f86."], [src*="-069bc9e1bd743207cf04."],
    [src*="-09b0de73ce74c71519a9."], [src*="-0a08f495d7dc74c0a927."], [src*="-142ba6b6cf752ace7f17."],
    [src*="-1746afc5cb3db2889f6b."], [src*="-1810088c9cbaec359568."], [src*="-1859d1adbdd7cb68b5d2."],
    [src*="-1a7268e4ef05e12675bb."], [src*="-1a9488d07ea0ff0fc4a6."], [src*="-1b99bf55d4fa88417d50."],
    [src*="-1c76d94f19c42696aaa5."], [src*="-1cb8494ed11eb243b2cd."], [src*="-1d69172c985114609410."],
    [src*="-1fc88412b5bbd27f9c80."], [src*="-1fd5598f7c0501e60dcf."], [src*="-20411b3a9d6cad7ca2ca."],
    [src*="-25321891256ff1ec19bf."], [src*="-25ca07e00c9bebf49eac."], [src*="-2a105676cb0d5abd59bf."],
    [src*="-2aeb7a4539703e21a3b3."], [src*="-2d10b95deb0e4891def1."], [src*="-2d1a91e6cbb4478f010b."],
    [src*="-2eb1ce2d6d4f0817230b."], [src*="-2ef7f6d5d098e2ec58b3."], [src*="-30912ff308f9de9144a7."],
    [src*="-364e40578452efdeda45."], [src*="-36f7108ad089e5691f99."], [src*="-37cbbd757943e641bd78."],
    [src*="-3825ce56506af19e6666."], [src*="-382c7f0ae92184f4a9fe."], [src*="-399d5358550b925aebbe."],
    [src*="-3dc22d0180ef3c84767d."], [src*="-3e51c46e8aedb8bebe8b."], [src*="-445bdb6c418d4f66d7a7."],
    [src*="-448160267eaea49a3caa."], [src*="-46f5a078f1fe25f8dccd."], [src*="-481347264d9cf03eec47."],
    [src*="-48ffae13ed7fd4cda569."], [src*="-5304f8caaac29d1ed46a."], [src*="-5324b6fe935b2fdfd625."],
    [src*="-5620c4b2cda6c338ead8."], [src*="-595dfc3e65f600fa1d7d."], [src*="-5c11dddf68a5aad4b719."],
    [src*="-5dfbcb1d5684233fd6ea."], [src*="-611a73ac34bcee7661dd."], [src*="-62b772617797eaf1e836."],
    [src*="-64e3e5253d5a6b4f8545."], [src*="-650c262813119ad42b7f."], [src*="-68ac0f395b2a076217cb."],
    [src*="-6adbad9913cdc457481e."], [src*="-6d38d5fd1c0d5926195a."], [src*="-6def9f1c2f58709cb416."],
    [src*="-6e4a935363721dd6c705."], [src*="-6f0020f9247eea831e6b."], [src*="-6f03d2196a6cee3e79e9."],
    [src*="-7001b6507f9c7d328b40."], [src*="-718b6bf524e61bcb3886."], [src*="-749360699f3656263ebb."],
    [src*="-75a8318417ef2e97c256."], [src*="-79b34cfd272bed1c64a1."], [src*="-7ce4c038559233369b33."],
    [src*="-7d4bfbfd100e9f42f86b."], [src*="-7e1525e455d1f2cbf7f2."], [src*="-7e59f26dd62f331652a9."],
    [src*="-7ec726f284652a1f18e1."], [src*="-7f883e412f45d0ed0793."], [src*="-801e5bdbcd7d3ebc7b5a."],
    [src*="-80800e5862fada6fc2c0."], [src*="-849131bbfb27184a5024."], [src*="-88bd487bce20bf216315."],
    [src*="-8a83e736a3d31a600936."], [src*="-8a9ce7e30174782edfce."], [src*="-8c84ca165d7eac79d19b."],
    [src*="-90a80823c22cd27ba239."], [src*="-91dc5380ac356b1c7571."], [src*="-92ed10730d2ddba1c266."],
    [src*="-937a613bbd8c99fb0201."], [src*="-9584754b988e845e23f5."], [src*="-95df8f075095c92bd08d."],
    [src*="-9f8cc2660fd4f7b79e54."], [src*="-a011f5467116e81f8f8e."], [src*="-a05f6b900337e361ac6a."],
    [src*="-a10d3971c0f4115300da."], [src*="-a13b06ca2ca9ff94bdf7."], [src*="-a1981282caebbd798c58."],
    [src*="-a39164be845554a5d504."], [src*="-a4a891184490119d4982."], [src*="-a57215d2a6446ed640c1."],
    [src*="-a586ed3f50ac92737729."], [src*="-a599a581161e95322bf8."], [src*="-a60557ecbaf8e4891271."],
    [src*="-a779b871d7bd94d75fa3."], [src*="-a7a729f99a688b5b15d4."], [src*="-ae12b34b34da64e320e6."],
    [src*="-aea4795be11dc31942c5."], [src*="-b199e8d63d0d3b22dd42."], [src*="-b28fd0b79b0a0ae4f1e6."],
    [src*="-b4f20e11762ce84bd4d0."], [src*="-b7c0c2d2c6910471541c."], [src*="-b89052d974aaf45a8696."],
    [src*="-b9207bad92f9f9959a51."], [src*="-bb031b83eaaef5b4fe8e."], [src*="-bc7aefa94f8cfd874148."],
    [src*="-bdc9ac6fa8150b3a5a36."], [src*="-bf5e17dac809f2633df9."], [src*="-c9cd06cb08642f3f9f54."],
    [src*="-d153e4d0dc0b93d35bbf."], [src*="-d218241e57b8578504d6."], [src*="-d35f72a865affe16722a."],
    [src*="-d649130c3a776f0fc7c8."], [src*="-dcc254c08e501ab3d5d8."], [src*="-df4573f47b51a41d4638."],
    [src*="-e0d8c0c3d64aeb4b8e02."], [src*="-e15b9da7a8af723574c4."], [src*="-e5f7c7515afc617ebed4."],
    [src*="-ee80489510923d4a6e05."], [src*="-ef6f9aa4866ae527bb57."], [src*="-efda5051cc3f6f0dc024."],
    [src*="-f18ed2fa8d15f89963ad."], [src*="-f2a38713d65551c3a711."], [src*="-f2bbb1d1227d5c8ad396."],
    [src*="-f3c84b49e2e2c3e04f07."], [src*="-f4ca03fd9c630c3c3d8f."], [src*="-f59368bf613d55d7179f."],
    [src*="-f7650a425b4ea7eff1f7."], [src*="-f7859f48eca565d9f0ec."], [src*="-f93b94c730ebe2027116."],
    [src*="-fd158e193293dc5c48ce."], [src*="-fef6d07d2c8991f28fbe."], [src*="-ff3ffb3a75c46f5ec8d9."]
  ) {
  transform: scale(1.18);
}

.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card .game-meta {
  background: var(--xh-glass-surface);
  box-shadow: inset 0 1px 0 var(--xh-glass-border);
}
.bh-refined-theme body.bh-surface[data-variant="desktop"] #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card .game-meta {
  padding: 5px 7px 6px;
  /* Only the caption strip darkens the cover; no blur is applied to the art. */
  background: var(--xh-glass-sheen), linear-gradient(#16121ce0, #120e18ef);
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card .game-meta h3 {
  color: #fbf7ff;
}

.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button,
.bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-arrow {
  border: 0;
  background: var(--xh-glass-surface);
  box-shadow: inset 0 0 0 1px var(--xh-glass-border);
  color: #f0e5f9;
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button {
  border-radius: 999px;
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .favorite-button[aria-pressed="true"] {
  background: var(--xh-glass-selected);
  box-shadow: inset 0 0 0 1px #d6aafa91;
}
/* The mobile hit target is a full 29 × 30 px. Its glass disc occupies only the
   center, keeping a gap between the heart and the outer edge of the card. */
.bh-refined-theme body.bh-surface[data-variant="mobile"] #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button {
  border: 4px solid transparent;
  background-clip: padding-box;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.bh-refined-theme body.bh-surface[data-variant="mobile"] #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--xh-glass-border);
  border-radius: inherit;
  pointer-events: none;
}
.bh-refined-theme body.bh-surface[data-variant="mobile"] #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button[aria-pressed="true"]::before {
  border-color: #d6aafa91;
}

.bh-refined-theme body.bh-surface[data-variant="desktop"] #main #page-home [data-carousel] .carousel-pagination {
  background: var(--xh-glass-surface);
  box-shadow: inset 0 0 0 1px var(--xh-glass-border);
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
}
.bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-pagination button[data-slide] span {
  background: var(--xh-glass-sheen), #74697d;
  box-shadow: inset 0 1px 0 #f2ddff46;
}
.bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-pagination button[data-slide][aria-current="true"] span {
  background: var(--xh-glass-sheen), #dab6f4;
  box-shadow: inset 0 1px 0 #fff9;
}
.bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-pagination [data-pause] {
  color: #e6d6ef;
}

@media (hover: hover) and (pointer: fine) {
  .bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .game-card:hover,
  .bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-arrow:hover {
    outline: 1px solid #d2b5e4;
    outline-offset: -1px;
  }
  .bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) .bh-game-wrap > .favorite-button:hover {
    color: #fff;
    box-shadow: inset 0 0 0 1px #cfb2e7c4;
  }
  .bh-refined-theme body.bh-surface #main #page-home [data-carousel] .carousel-pagination [data-slide]:hover span {
    background: var(--xh-glass-sheen), #e2caff;
  }
}
.bh-refined-theme body.bh-surface #main :is(#game-grid, #bh-game-list, #bh-account-favorites) :is(.game-card, .favorite-button):focus-visible,
.bh-refined-theme body.bh-surface #main #page-home [data-carousel] button:focus-visible {
  outline: 2px solid #e6c8ff;
  outline-offset: -2px;
}

/* The poster frame sits above the image. Its shine is confined to the rim,
   and its pseudo-element never intercepts a click on the activity. */
.bh-refined-theme body.bh-surface {
  --xh-poster-reflection: linear-gradient(137deg, rgb(255 248 255 / 9%), rgb(255 248 255 / 4%) 21px, transparent 23px 34px, rgb(255 249 255 / 13%) 35px, rgb(255 249 255 / 7%) 47px, transparent 65px),
    radial-gradient(ellipse 30% 12px at 14% 0, rgb(255 245 255 / 9%), transparent);
  --xh-poster-rim: inset 0 0 0 1px rgb(250 240 255 / 44%), inset 0 0 0 2px rgb(61 35 76 / 27%),
    inset 0 1px 0 1px rgb(255 255 255 / 23%);
}
.bh-refined-theme body.bh-surface[data-variant] :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .activity-card--image {
  position: relative;
  isolation: isolate;
  border-color: var(--xh-glass-border);
  border-radius: 12px;
  background: var(--xh-glass-surface);
  box-shadow: var(--xh-glass-shadow);
}
.bh-refined-theme body.bh-surface[data-variant] :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .activity-card--image::after,
.bh-refined-theme body.bh-surface #platformActivityModal .xh-activity-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--xh-poster-reflection);
  box-shadow: var(--xh-poster-rim);
  pointer-events: none;
}
.bh-refined-theme body.bh-surface #platformActivityModal .xh-activity-poster {
  position: relative;
  isolation: isolate;
}
.bh-refined-theme body.bh-surface[data-variant] :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .activity-image-fallback {
  background: var(--xh-glass-sheen), var(--xh-glass-surface);
  color: #eae5f2;
}
.bh-refined-theme body.bh-surface[data-variant] :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .activity-image-fallback > span {
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--xh-glass-control);
  box-shadow: var(--xh-glass-control-shadow);
  color: #f2eaff;
}

/* Leave publisher-supplied poster pixels, rich-text colors and tables alone.
   The detail's frame, sticky heading and contact bar carry the glass effect. */
.bh-refined-theme body.bh-surface #platformActivityModal .platform-activity-box {
  background: var(--xh-glass-surface), #17141b;
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow), 0 24px 70px #0009;
}
.bh-refined-theme body.bh-surface #platformActivityModal .platform-activity-box > .platform-head,
.bh-refined-theme body.bh-surface #platformActivityModal #platformActivityContact:not([hidden]) {
  background: var(--xh-glass-sheen), var(--xh-glass-surface), rgb(20 17 25 / 86%);
  border-color: var(--xh-glass-border);
  box-shadow: inset 0 1px 0 rgb(242 230 255 / 19%), 0 1px 0 rgb(239 221 255 / 10%);
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
}
.bh-refined-theme body.bh-surface #platformActivityModal .platform-activity-meta {
  background: linear-gradient(110deg, rgb(225 203 250 / 7%), transparent 58%);
  color: #c5bdcf;
}
.bh-refined-theme body.bh-surface #platformActivityModal :is(.platform-activity-cover, .xh-activity-poster) {
  outline: 1px solid rgb(232 218 249 / 21%);
  outline-offset: -1px;
}

.bh-refined-theme body.bh-surface #page-offers .ot-card {
  background: var(--xh-glass-sheen), var(--xh-glass-surface),
    #1a171d url("./xhrr-art/task-card.webp") center / cover no-repeat;
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow);
}
.bh-refined-theme body.bh-surface #page-offers .ot-card.ot-ready {
  border-color: #aa8ec9;
  box-shadow: var(--xh-glass-shadow), 0 0 12px rgb(177 124 238 / 10%);
}
.bh-refined-theme body.bh-surface #page-offers .ot-empty,
.bh-refined-theme body.bh-surface :is(#page-home #activity-grid, #page-activity .xh-poster-feed) > .bh-status {
  background: var(--xh-glass-sheen), var(--xh-glass-surface);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow);
  color: #dfd8e9;
}
.bh-refined-theme body.bh-surface #page-offers .ot-time { color: #d6cddd; }
.bh-refined-theme body.bh-surface #page-offers .ot-state {
  box-shadow: inset 0 1px rgb(255 255 255 / 13%), inset 0 0 0 1px rgb(229 211 246 / 10%);
}
.bh-refined-theme body.bh-surface #page-offers progress::-webkit-progress-bar {
  background: #48414e;
  box-shadow: inset 0 1px 2px #0006;
}
.bh-refined-theme body.bh-surface #page-offers progress::-webkit-progress-value {
  background: linear-gradient(#8ff5d3, #28dca4 63%, #1cc38f);
}
.bh-refined-theme body.bh-surface #page-offers progress::-moz-progress-bar {
  background: linear-gradient(#8ff5d3, #28dca4 63%, #1cc38f);
}

.bh-refined-theme body.bh-surface :is(#page-activity, #page-offers) .xh-page-bar :is(.xh-back, .xh-refresh),
.bh-refined-theme body.bh-surface #platformActivityModal .platform-activity-box > .platform-head .platform-close,
.bh-refined-theme body.bh-surface #page-offers :is(.soft-button, .ot-tabs button),
.bh-refined-theme body.bh-surface :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .bh-status button {
  background: var(--xh-glass-control);
  border-color: var(--xh-glass-border);
  color: #eee9f5;
  box-shadow: var(--xh-glass-control-shadow);
}
.bh-refined-theme body.bh-surface #page-offers .ot-tabs button {
  border-radius: 8px;
  border-bottom-color: transparent;
}
.bh-refined-theme body.bh-surface #page-offers .ot-tabs button[aria-pressed="true"] {
  background: var(--xh-glass-selected);
  border-bottom-color: #c3a3ec;
  color: #fff;
}
.bh-refined-theme body.bh-surface #page-offers .ot-multi summary {
  border-radius: 5px;
  padding-inline: 6px;
  background: var(--xh-glass-control);
  box-shadow: var(--xh-glass-control-shadow);
}
.bh-refined-theme body.bh-surface #platformActivityModal .activity-contact-button,
.bh-refined-theme body.bh-surface #page-offers .ot-cta:not(:disabled) {
  background: var(--xh-glass-primary);
  border-color: #b89ae0;
  box-shadow: var(--xh-glass-control-shadow);
  color: #fff;
}
.bh-refined-theme body.bh-surface #page-offers :is(.ot-cta, .soft-button, .xh-refresh):disabled {
  color: #bdb7c5;
  background: linear-gradient(145deg, #3b3840, #28262d);
  border-color: #514c59;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%);
}
.bh-refined-theme body.bh-surface #page-offers .ot-multi summary:focus-visible,
.bh-refined-theme body.bh-surface #platformActivityModal :is(.activity-contact-button, .platform-close):focus-visible {
  outline: 2px solid #e5caff;
  outline-offset: 2px;
}
@media (hover: hover) {
  .bh-refined-theme body.bh-surface[data-variant] :is(#page-home #activity-grid, #page-activity .xh-poster-feed) .activity-card--image:hover::after {
    box-shadow: var(--xh-poster-rim), inset 0 0 0 1px rgb(235 219 252 / 62%);
  }
  .bh-refined-theme body.bh-surface #page-offers :is(.ot-cta, .soft-button, .ot-tabs button):enabled:hover,
  .bh-refined-theme body.bh-surface #platformActivityModal .activity-contact-button:hover {
    box-shadow: var(--xh-glass-control-shadow), 0 0 0 1px rgb(238 218 255 / 34%);
  }
}

/* Account surfaces. The profile watermark and the authentication artwork live on
   their existing pseudo-elements and do not need additional overlays. */
html.bh-refined-theme body.bh-surface #page-my :is(.xh-member-identity, .xh-member-shortcuts, .xh-member-rows, .xh-member-breakdown),
html.bh-refined-theme body.bh-surface dialog#authModal:has(.xhr-auth-body),
html.bh-refined-theme body.bh-surface #platformModal:not(.bh-account-inline) > .platform-box,
html.bh-player-theme .xhr-deposit .main > :is(.balance, .section),
html.bh-player-theme .xhr-deposit .success-card,
html.bh-player-theme .xhr-cashier .main > .card,
html.bh-player-theme .xhr-profile .page-main :is(.hero, .surface),
html.bh-player-theme[data-player-page="agent"] .xhr-agent :is(.login-box, .shell > .card),
html.bh-player-theme .xhr-game-shell #error:not([hidden]) {
  background: var(--xh-glass-surface);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow);
  -webkit-backdrop-filter: var(--xh-glass-blur);
  backdrop-filter: var(--xh-glass-blur);
}

html.bh-refined-theme #page-my :is(.xh-member-rows, .xh-member-breakdown) {
  border: 1px solid var(--xh-glass-border);
  border-radius: 13px;
  padding: 4px 8px;
}
html.bh-refined-theme #page-my .xh-member-rows { margin-top: 8px; }
html.bh-refined-theme #page-my .xh-member-rows > button:last-child { border-bottom: 0; }
html.bh-refined-theme #page-my :is(.xh-member-shortcuts, .xh-member-rows) > button {
  background: linear-gradient(125deg, rgb(243 229 255 / 5%), rgb(185 165 214 / 1%));
  box-shadow: inset 0 1px 0 rgb(255 246 255 / 8%);
  border-radius: 9px;
}
html.bh-refined-theme #page-my .xh-member-shortcuts { column-gap: 4px; padding-inline: 6px; }
html.bh-refined-theme #page-my .xh-member-rows { gap: 4px; }
html.bh-refined-theme body.bh-surface #page-my .xh-member-vip {
  background: var(--xh-glass-sheen),
    linear-gradient(105deg, #251c33ee, #201829bc),
    url("./xhrr-art/member-vip.webp") center / cover;
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-shadow);
}
html.bh-refined-theme body.bh-surface #authModal .xhr-auth-body,
html.bh-player-theme[data-player-page="agent"] .xhr-agent .xhr-agent-fields {
  background: linear-gradient(145deg, rgb(54 43 68 / 36%), rgb(15 13 19 / 78%));
}
html.bh-player-theme .xhr-cashier .xhr-receipt-head {
  background: var(--xh-glass-sheen), linear-gradient(110deg, #2d213dd9, #37214bb3 70%, #201829bf);
}

/* Detail tiles sit on an already blurred parent. Keep QR codes, upload previews,
   statement colors, provider artwork and embedded payment frames unfiltered. */
html.bh-refined-theme body.bh-surface #platformModal :is(.platform-card, .platform-row, .platform-vip, .platform-message:not(.unread)),
html.bh-refined-theme body.bh-surface #platformModal #walletSummary .platform-card:first-child,
html.bh-refined-theme #page-my .xh-member-data > .xh-member-balance,
html.bh-refined-theme #page-my .xh-member-shortcuts button > :is([data-icon], img),
html.bh-player-theme .xhr-profile .surface .account-card,
html.bh-player-theme .xhr-agent .shell :is(.card.metric, .report-metric, .level-rate-item) {
  background: var(--xh-glass-sheen), var(--xh-glass-control);
  border-color: var(--xh-glass-border);
  box-shadow: var(--xh-glass-control-shadow);
}

/* Controls retain their native size, form submission, keyboard and busy state. */
html.bh-refined-theme body.bh-surface #page-my :is(.xh-member-inbox, .xh-member-money-actions button, .xh-member-logout),
html.bh-refined-theme body.bh-surface #page-my .xh-member-balance .xh-balance-refresh,
html.bh-refined-theme body.bh-surface #authModal :is(.dialog-close, .platform-captcha-refresh, .xhr-auth-switch button),
html.bh-refined-theme body.bh-surface #platformModal :is(.platform-close, .platform-tab, .platform-method, .platform-recipient-mode, .platform-order-check, .platform-message-read),
html.bh-player-theme .xhr-deposit #backButton,
html.bh-player-theme .xhr-deposit :is(.channel, .payment-section, .quick button),
html.bh-player-theme .xhr-cashier :is(.actions button, .copy, .txid button, .head button, .payment .button),
html.bh-player-theme .xhr-profile :is(.method-tab, .text-button, .add-button),
html.bh-player-theme[data-player-page="agent"] .xhr-agent :is(.button.secondary, .captcha-row button, .global-back) {
  background: var(--xh-glass-control);
  border: 1px solid var(--xh-glass-border);
  color: #f5efff;
  box-shadow: var(--xh-glass-control-shadow);
}
html.bh-refined-theme body.bh-surface #authModal .xhr-auth-switch button {
  border-radius: 8px;
  min-height: 30px;
  padding-inline: 7px;
  color: #a7dfff;
}
html.bh-refined-theme #page-my .xh-member-logout { border-radius: 999px; }

html.bh-refined-theme body.bh-surface #page-my :is(.xh-member-money-actions > button:first-child, .xh-member-auth .gold-button),
html.bh-refined-theme body.bh-surface #authModal .gold-button[type="submit"],
html.bh-refined-theme body.bh-surface #platformModal .platform-submit,
html.bh-player-theme .xhr-deposit :is(#submitButton, .success-card button),
html.bh-player-theme .xhr-cashier :is(.actions .primary, .payment .primary, .txid #verifyTxid),
html.bh-player-theme .xhr-profile .button.primary,
html.bh-player-theme[data-player-page="agent"] .xhr-agent :is(.shell, #loginView .login-box) .button:not(.secondary),
html.bh-player-theme .xhr-game-shell #backButton {
  background: var(--xh-glass-primary);
  border: 1px solid #ba99efb8;
  box-shadow: var(--xh-glass-control-shadow);
  color: #fff;
}
html.bh-refined-theme body.bh-surface #platformModal :is(.platform-method.active, .platform-tab.active, .platform-recipient-mode.active, .platform-message.unread),
html.bh-player-theme .xhr-deposit :is(.channel.active, .payment-section.active),
html.bh-player-theme .xhr-profile .method-tabs .method-tab.selected,
html.bh-player-theme[data-player-page="agent"] .xhr-agent .report-tabs .button[aria-selected="true"] {
  background: var(--xh-glass-selected);
  border-color: #c8a7f1;
  color: #fff;
  box-shadow: inset 0 0 0 1px #c6a1f15c, var(--xh-glass-control-shadow);
}
