/* Secondary screens share the same quiet graphite surfaces as the case catalogue.
   Semantic game colours, rarity artwork and live state classes remain page-owned. */
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page,.news-page,.news-article-page,.slot-game-page) {
  background: #111110;
  color: #f4f3ef;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page,.news-page,.news-article-page,.slot-game-page)::before {
  opacity: .12;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .page-shell {
  max-width: 1360px;
  padding: 30px 28px 64px;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero,.double-hero,.jackpot-hero,.race-hero) {
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid #30302c;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero,.double-hero,.jackpot-hero,.race-hero)::after {
  display: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -.04em;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-subtitle,.double-subtitle,.jackpot-subtitle,.race-subtitle) {
  font-size: 14px;
  line-height: 1.6;
  max-width: 580px;
  color: #a5a49b;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) .section-kicker {
  color: #97978c;
  letter-spacing: .06em;
  font-size: 10px;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav {
  padding: 4px;
  gap: 3px;
  border: 1px solid #30302c;
  border-radius: 12px;
  background: #191917;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: #aaa99f;
  font-size: 12px;
  font-weight: 600;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav a:is(:hover,.is-active) {
  background: #2a2d20;
  color: var(--gb-accent);
  box-shadow: none;
  transform: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-stage,.crash-sidebar__panel,.crash-pool,.double-stage,.double-sidebar__panel,.double-pool,
  .jackpot-stage,.jackpot-sidebar__panel,.jackpot-panel,.room-rail,.race-stage,.race-sidebar__panel,.race-panel,
  .profile-hero,.inventory-surface,.jackpot-modal__dialog,.race-modal__dialog) {
  background: #1c1c19;
  border: 1px solid #30302c;
  border-radius: 16px;
  box-shadow: 0 8px 24px #00000012;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-stat,.double-stat,.jackpot-stat,.race-stat,.profile-stat,.economy-card,.summary-card,
  .round-badge,.profile-card,.showcase-summary__card,.fairness-card) {
  background: #22221e;
  border: 1px solid #31312c;
  border-radius: 12px;
  box-shadow: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat,.double-stat,.jackpot-stat,.race-stat) {
  padding: 14px 16px;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-stat__label,.double-stat__label,.jackpot-stat__label,.race-stat__label,.profile-stat__label,
  .economy-card__label,.summary-card > span,.profile-note,.rules-list,.profile-identity__subtitle) {
  color: #a5a49b;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat__value,.double-stat__value,.jackpot-stat__value,.race-stat__value) {
  color: #f3f2ec;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(
  .multiplier-screen,.risk-screen,.growth-chart,.crash-result,.double-result,.control-summary) {
  background: #171715;
  border-color: #30302c;
  border-radius: 12px;
  box-shadow: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-button,.double-button,.jackpot-button,.race-button,.profile-action,.profile-action-link) {
  min-height: 46px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-button--primary,.double-button--primary,.jackpot-button--primary,.race-button--primary,.profile-action--primary) {
  background: var(--gb-accent);
  color: #141a07;
  border: 1px solid var(--gb-accent);
  box-shadow: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-button--primary,.double-button--primary,.jackpot-button--primary,.race-button--primary,.profile-action--primary):hover:not(:disabled) {
  background: color-mix(in srgb,var(--gb-accent) 85%,white);
  border-color: color-mix(in srgb,var(--gb-accent) 85%,white);
  box-shadow: 0 4px 18px color-mix(in srgb,var(--gb-accent) 8.63%,transparent);
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-button--secondary,.double-button--secondary,.jackpot-button--ghost,.race-button--ghost,.profile-action-link) {
  background: #292925;
  border-color: #383830;
  color: #e3e2d9;
  box-shadow: none;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.pool-item,.room-card,.history-card) {
  border-radius: 12px;
}
body:is(.jackpot-page,.case-race-page) .room-card {
  background: #23231f;
  border-color: #34342e;
  box-shadow: none;
}
body:is(.jackpot-page,.case-race-page) .room-card.is-active {
  background: #292f1b;
  border-color: #6e882d;
}
body:is(.jackpot-page,.case-race-page) :is(.jackpot-mobile-cta,.race-mobile-cta) {
  background: #1c1c19f5;
  border-color: #30302c;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(button,a,input,select):focus-visible {
  outline: 2px solid var(--gb-accent);
  outline-offset: 3px;
}
body.profile-page .profile-hero { padding: 22px; gap: 16px; }
body.profile-page .profile-card { padding: 20px; }
body.profile-page .profile-identity__meta h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
body.profile-page :is(.status-filters,.summary-chip,.inventory-count,.sort-select__trigger,.search-control input) {
  background: #242420;
  border-color: #363630;
  border-radius: 10px;
}
body.profile-page :is(.status-filter,.inventory-card__action) { border-radius: 8px; }
body.profile-page .status-filter.is-active { background: #343e20; color: var(--gb-accent); box-shadow: none; }
body.profile-page :is(.sort-select__menu,.empty-state) { background: #20201c; border-color: #34342e; border-radius: 12px; }
body.profile-page .inventory-card { background: #21211d; border-color: #32322d; border-radius: 12px; }
body.profile-page :is(.inventory-card__price,.showcase-item__price) { color: var(--gb-accent); }
body:is(.news-page,.news-article-page) :is(.seo-content,.seo-news-teaser,.seo-article,.seo-faq,.site-footer) {
  background: #1c1c19;
  border-color: #30302c;
  border-radius: 16px;
  box-shadow: none;
}
body:is(.news-page,.news-article-page) :is(.seo-content__card,.seo-news-card,.seo-faq__item,.seo-article__takeaways) {
  background: #23231f;
  border-color: #33332d;
  border-radius: 12px;
  box-shadow: none;
}
body:is(.news-page,.news-article-page) :is(.seo-content__head > span,.seo-faq__head > span,.seo-news-teaser > div > span,.seo-feed-link,.seo-breadcrumbs a[aria-current=page],.seo-article__hero > span) { color: var(--gb-accent); }
body:is(.news-page,.news-article-page) :is(.seo-content__head p,.seo-content__card p,.seo-news-card p,.seo-faq__answer p,.seo-article p,.seo-news-teaser p,.site-footer p) { color: #aaa99f; line-height: 1.7; }
body.news-article-page .seo-article__body { max-width: 760px; }
body.news-article-page .seo-article__body p { font-size: 16px; }
body.news-article-page .seo-article__hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.15; }
body.slot-game-page { --panel: #1c1c19; --panel-strong: #242420; --line: #30302c; --accent: var(--gb-accent); --accent-2: var(--gb-accent); --muted: #aaa99f; }
body.slot-game-page :is(.slot-copy,.slot-board,.slot-controls,.slot-frame) { border-radius: 16px; box-shadow: none; }
body.slot-game-page .slot-copy { background: transparent; border: 0; }
body.slot-game-page .slot-copy h1 { font-size: clamp(32px,4vw,48px); line-height: 1.1; }
body.slot-game-page .spin-button { background: var(--gb-accent); color: #172006; border-radius: 10px; box-shadow: none; }
body.slot-game-page #mode-select { background: #22221e; border-color: #363630; border-radius: 10px; }
@media (max-width: 1000px) {
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero,.double-hero,.jackpot-hero,.race-hero) { grid-template-columns: minmax(0,1fr); }
  body.profile-page .profile-hero { grid-template-columns: minmax(0,1fr); }
  body.slot-game-page .slot-shell { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .page-shell { padding: 18px 12px 90px; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav a { flex-shrink: 0; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero__copy,.double-hero__copy,.jackpot-hero__copy,.race-hero__copy) { min-width: 0; }
  body.profile-page :is(.profile-hero,.profile-card,.inventory-surface) { padding: 16px; }
  body.profile-page .profile-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  body:is(.news-page,.news-article-page) :is(.seo-content,.seo-news-teaser,.seo-article) { padding: 18px; }
}
body.news-article-page .seo-article__hero { background: #22221d; }
body.news-article-page .seo-article__takeaways strong { color: var(--gb-accent); }
body.news-article-page .seo-article__takeaways ul { color: #c0bfb5; }
body.double-page .double-button--ghost { background: #242420; border-color: #363630; color: #bab9af; }
/* These scoped declarations supersede the legacy theme's !important surface rules. */
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero,.double-hero,.jackpot-hero,.race-hero) {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #30302c !important;
}
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav a { border-radius: 8px !important; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) :is(
  .crash-stage,.crash-sidebar__panel,.crash-pool,.double-stage,.double-sidebar__panel,.double-pool,
  .jackpot-stage,.jackpot-sidebar__panel,.jackpot-panel,.room-rail,.race-stage,.race-panel,
  .profile-hero,.jackpot-modal__dialog) {
  background: #1c1c19 !important;
  border: 1px solid #30302c !important;
}
body:is(.crash-page,.double-page,.jackpot-page) :is(.crash-stat,.double-stat,.jackpot-stat,.economy-card,.round-badge) {
  background: #22221e !important;
  border: 1px solid #31312c !important;
}
body:is(.crash-page,.double-page,.jackpot-page) :is(.crash-stat__value,.double-stat__value,.jackpot-stat__value) { color: #f3f2ec !important; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.slot-game-page) :is(
  .crash-button,.double-button,.jackpot-button,.race-button,.spin-button) { border-radius: 10px !important; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.slot-game-page) :is(
  .crash-button--primary,.double-button--primary,.jackpot-button--primary,.race-button--primary,.spin-button):hover:not(:disabled) {
  background: color-mix(in srgb,var(--gb-accent) 85%,white) !important;
}
body.slot-game-page .slot-shell { background: transparent !important; border: 0 !important; }
body.slot-game-page .slot-board { background: #1c1c19 !important; border: 1px solid #30302c !important; }
/* Refinements from the desktop and phone visual review. */
body:is(.crash-page,.double-page) .round-history__item {
  background: #242420;
  border-color: #34342e;
  border-radius: 12px;
}
body.crash-page :is(.case-visual,.case-visual__drop) { background: #20221b; border-color: #35382c; border-radius: 14px; }
body.crash-page .case-visual__icon { background: #343e20; color: var(--gb-accent); border-radius: 14px; }
body.crash-page .case-visual__drop-media { background: #282a22; }
body:is(.crash-page,.double-page) :is(.multiplier-screen__status,.risk-screen__status,.case-visual__subtitle,.round-history__round) { color: #aaa99f; }
body.double-page .risk-screen__timer { background: #22221e; border-color: #33332e; }
body.case-race-page .race-lobby { background: #1c1c19; border: 1px solid #30302c; border-radius: 16px; box-shadow: none; }
body:is(.jackpot-page,.case-race-page) .room-card { text-align: left; }
body:is(.jackpot-page,.case-race-page) .room-card::before { opacity: .28; }
body:is(.jackpot-page,.case-race-page) .room-card__copy p { color: #aaa99f; }
body.case-race-page .race-hero__stats { align-content: start; }
body.profile-page .profile-hero { align-items: start; }
body.profile-page .showcase-grid { height: auto; grid-template-rows: auto auto; gap: 12px; }
body.profile-page .showcase-item {
  grid-template-columns: minmax(0,1.1fr) minmax(130px,.9fr);
  gap: 12px;
  min-height: 230px;
  padding: 18px;
  border-radius: 12px;
  background: radial-gradient(ellipse at 90% 35%,var(--showcase-glow),transparent 60%),#20211b;
  box-shadow: none;
}
body.profile-page .showcase-item::before { display: none; }
body.profile-page .showcase-item__meta { align-self: center; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
body.profile-page .showcase-item__title { font-size: 19px; line-height: 1.35; }
body.profile-page .showcase-item__hint { font-size: 12px; line-height: 1.55; color: #a5a49b; }
body.profile-page .showcase-item__visual { min-height: 160px; }
body.profile-page .showcase-item__visual img { max-height: 190px; }
body.profile-page .showcase-summary__value { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
body.profile-page .profile-note__pill { background: #2a2c23; color: #bdbfb0; font-size: 11px; min-height: 30px; border-radius: 8px; }
body.profile-page .profile-identity__caption { color: #999b8e; font-size: 10px; }
body:is(.news-page,.news-article-page) :is(.seo-news-card__category,.seo-news-card > span,.seo-article__meta span) { color: var(--gb-accent); }
body:is(.news-page,.news-article-page) .seo-feed-link { background: #303a20; color: var(--gb-accent); border-radius: 8px; }
@media (max-width:640px) {
  body.profile-page .profile-identity__header { flex-direction: row; align-items: center; gap: 12px; }
  body.profile-page .profile-identity__avatar { width: 58px; height: 58px; border-radius: 14px; }
  body.profile-page .profile-identity__meta h1 { font-size: 25px !important; margin-top: 5px; }
  body.profile-page .profile-identity__subtitle { font-size: 13px; line-height: 1.6; margin-top: 14px; }
  body.profile-page .profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  body.profile-page .profile-action--primary { grid-column: 1 / -1; }
  body.profile-page .profile-action-link { padding: 0 8px; font-size: 11px; }
  body.profile-page .profile-note { gap: 6px; margin-top: 14px; }
  body.profile-page .profile-note__pill { min-height: 26px; padding: 0 8px; font-size: 10px; }
  body.profile-page .showcase-item { grid-template-columns: minmax(0,1fr); }
  body.profile-page .showcase-item__visual { order: -1; min-height: 140px; }
}
/* Live room lists replace their cards on each tick; entrance delays must not hide them. */
body:is(.jackpot-page,.case-race-page) .room-card.motion-reveal {
  animation: none;
  opacity: 1;
  transform: none;
}
@media (max-width:640px) {
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-hero__stats,.double-hero__stats,.jackpot-hero__stats,.race-hero__stats) {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px;
  }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat,.double-stat,.jackpot-stat,.race-stat) { padding: 12px; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat__value,.double-stat__value,.jackpot-stat__value,.race-stat__value) { font-size: 18px; overflow-wrap: anywhere; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) .mode-nav a { flex: 0 0 auto; min-width: 0; }
  body.slot-game-page .slot-copy { padding: 16px 8px; }
  body.slot-game-page .slot-copy h1 { font-size: 30px !important; line-height: 1.15; }
  body.slot-game-page .slot-shell { gap: 16px; min-height: 0; }
}

/* Inventory follows the same item hierarchy as cases and upgrades. */
body.profile-page .inventory-card { padding: 14px; gap: 10px; }
body.profile-page .inventory-card__media { background: radial-gradient(ellipse,#ffffff08,transparent 75%); border-radius: 9px; height: 130px; }
body.profile-page .inventory-card__name { font-size: 13px; font-weight: 600; line-height: 1.5; min-height: 39px; overflow-wrap: break-word; }
body.profile-page .inventory-card__price { white-space: nowrap; font-size: 16px; font-variant-numeric: tabular-nums; }
body.profile-page .inventory-card__meta { flex-wrap: wrap; gap: 7px; }
body.profile-page .inventory-card__date { font-size: 10px; color: #99998e; }
body.profile-page .inventory-card__action { min-height: 38px; background: #2b3022; border-color: #3e4730; color: var(--gb-accent); }
body.profile-page .inventory-card__action:hover:not(:disabled) { border-color: var(--gb-accent); background: #343b26; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat__value,.double-stat__value,.jackpot-stat__value,.race-stat__value) { white-space: nowrap; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-button,.double-button,.jackpot-button,.race-button):disabled { cursor: not-allowed; box-shadow: none; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.pool-item,.history-card) { background-color: #22221e; border-color: #34342e; }
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) input:not([type=range]):not([type=checkbox]):not([type=radio]),
body:is(.crash-page,.double-page,.jackpot-page,.case-race-page,.profile-page) select { border-radius: 9px; border-color: #3a3a32; background-color: #161613; color: #e8e8df; min-height: 42px; }
@media (max-width:640px) {
  body.profile-page .inventory-card { padding: 10px; }
  body.profile-page .inventory-card__media { height: 106px; }
  body.profile-page .inventory-card__name { font-size: 12px; }
  body.profile-page .inventory-card__price { font-size: 14px; }
  body:is(.crash-page,.double-page,.jackpot-page,.case-race-page) :is(.crash-stat__value,.double-stat__value,.jackpot-stat__value,.race-stat__value) { font-size: clamp(14px,4.2vw,18px); }
}
body.profile-page .inventory-card__media { aspect-ratio: auto; }
body.profile-page .inventory-card__media img { height: 128px; padding: 8px; }
@media(max-width:640px) { body.profile-page .inventory-card__media img { height: 104px; } }
