/* Generated from public/desktop-css modules. */
@layer desktop {
/* Source section: 07-tablet-and-interactions.css */
/* Web shell. Mobile keeps its existing bottom navigation and game presentation. */
[data-web-intro-toggle="1"] {
  display: none;
}
[data-case-category-filter="1"] {
  width: 100%;
}

/* Keep the two secondary amounts aligned regardless of the icon's native size. */
html[data-standalone="1"] [data-topbar-secondary-balances="1"] [data-topbar-balance-segment] {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
}

html[data-standalone="1"] [data-topbar-secondary-icon="1"] {
  display: flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}

html[data-standalone="1"] [data-topbar-secondary-balances="1"] [data-topbar-secondary-icon="1"] > * {
  width: 100%;
  height: 100%;
  transform: none;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-actions="1"] {
  gap: 6px;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance="1"] {
  gap: 0;
  height: 40px;
  overflow: visible;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-breakdown="1"] {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-block: 0;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-secondary-balances="1"] {
  display: grid;
  min-width: 0;
  height: 36px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 2px;
}

html[data-standalone="1"][data-desktop-layout="0"]
  [data-topbar-secondary-balances="1"]
  [data-topbar-balance-segment] {
  height: 17px;
  padding-inline: 3px;
  font-size: 10.5px;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-segment] {
  width: auto;
  min-width: 0;
  height: 36px;
  gap: 4px;
  justify-content: flex-start;
  padding-inline: 4px;
  border-radius: var(--ui-radius-control-sm);
  color: var(--ui-text-secondary);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-segment="paid"] {
  order: 3;
  color: var(--ui-text-primary);
  padding-inline: 7px;
  background: rgb(var(--ui-accent-rgb) / 0.09);
  box-shadow: inset 0 0 0 1px rgb(var(--ui-accent-rgb) / 0.12);
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-segment="free"] {
  order: 1;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-segment="tickets"] {
  order: 2;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-copy="1"] {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  line-height: 1;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-segment] svg {
  width: 12px;
  height: 12px;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-icon="1"] {
  display: inline-flex;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-label="1"] {
  display: none;
}

html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-balance-divider="1"] {
  display: none;
}

@media (max-width: 599px) {
  html[data-standalone="1"][data-desktop-layout="0"] {
    --app-topbar-content-gap: 10px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-live-win-strip="1"] {
    min-height: 52px;
    padding-block: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-live-win-card="reference-rail"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-live-win-card="reference-rail"] > div,
  html[data-standalone="1"][data-desktop-layout="0"] [data-live-win-skeleton="1"] {
    height: 52px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-leading="1"] {
    min-width: 0;
    align-items: center;
    gap: 8px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-topbar-root="1"][data-topbar-has-context="1"]
    [data-topbar-home-logo="1"] {
    display: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-home-logo="1"] {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: transparent;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-home-logo-picture="1"] {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-home-logo-image="1"] {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-topup="1"] {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding-inline: 0;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-topup="1"] > span {
    display: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-topbar-profile="1"][aria-haspopup="menu"] {
    width: 40px;
    height: 40px;
  }
}
/* A browser has no Telegram title/safe-area bar: keep the heading in normal flow. */
@media (max-width: 599px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-root="1"] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 8px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-leading="1"] {
    display: contents;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-actions="1"] {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-title-stack="1"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-title="1"] {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
  }
}

/* Browser tablets use the available width without changing Telegram's mobile shell. */
@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] {
    --app-shell-width: min(calc(100vw - 32px), 860px);
    --app-topbar-content-gap: 18px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-app-shell="1"] {
    width: var(--app-shell-width);
    max-width: 860px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-leading="1"] {
    display: flex;
    align-items: center;
    min-width: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-topbar-home-logo="1"] {
    display: inline-flex;
    width: 132px;
    height: 38px;
    padding-block: 4px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-case-category-filter="1"] {
    max-width: none;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-cases-fallback-banner="1"] {
    min-height: var(--ui-control-height);
    padding: 0 14px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-cases-grid="1"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-games-catalog-layout="tablet"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 236px;
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-card-variant="desktop"] {
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface-base);
    box-shadow: none;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"]
    > * {
    width: 128px;
    height: 128px;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-game-card-variant="desktop"]
    .game-card-badge {
    height: 22px;
    padding-inline: 7px;
    border-radius: var(--ui-radius-badge);
    color: var(--ui-text-muted);
    background: var(--ui-surface-interactive);
    font-size: 10px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-games-feature-grid="1"] {
    height: clamp(280px, 44vw, 340px);
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-nav-shell="1"] {
    max-width: min(calc(var(--app-shell-width) - 32px), 520px);
    width: min(calc(var(--app-shell-width) - 32px), 520px);
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-page] {
    width: min(100%, 640px);
    max-width: 640px;
    margin-inline: auto;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-game-fixed-bar="pvp"],
      [data-game-fixed-bar="rocket"],
      [data-game-fixed-bar="roulette"],
      [data-game-fixed-bar="upgrade"]
    ) {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    z-index: 1;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-game-fixed-bar="pvp"],
      [data-game-fixed-bar="rocket"],
      [data-game-fixed-bar="roulette"],
      [data-game-fixed-bar="upgrade"]
    )
    [data-game-fixed-bar-inner="1"] {
    width: 100%;
    max-width: none;
    padding-inline: 0;
    padding-bottom: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-fixed-bar="upgrade"] > div {
    width: 100%;
    left: auto;
    transform: none;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-game-fixed-bar="pvp"] .pvp-opaque-control-surface,
      [data-game-fixed-bar="roulette"] [data-roulette-controls]
    ) {
    border-radius: var(--ui-radius-card);
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-pvp-layout="1"] {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-pvp-layout="1"] > * {
    margin-top: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-pvp-layout="1"]
    [data-game-fixed-bar="pvp"] {
    order: 3;
    max-width: 520px;
    margin-inline: auto;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-pvp-players="1"] {
    order: 4;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-pvp-about="1"] {
    order: 5;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-page="rocket"] {
    padding-bottom: 24px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-rocket-content="1"] {
    display: flex;
    flex-direction: column;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-rocket-side-panel="1"] {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-fixed-bar="rocket"] {
    order: 1;
    max-width: 520px;
    margin-inline: auto;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-rocket-live-bets="1"] {
    order: 2;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-rocket-live-bets="1"] > div:last-child {
    max-height: none;
    overflow-y: visible;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-page="roulette"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-roulette-content="1"] {
    height: auto;
    overflow: visible;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-roulette-content="1"] {
    flex: none;
    padding-bottom: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-fixed-bar="roulette"] {
    max-width: 520px;
    margin: 16px auto 24px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-fixed-bar="upgrade"] {
    max-width: 520px;
    margin: 16px auto 24px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-upgrade-live-content="1"] {
    padding-bottom: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-details-page="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding-bottom: 24px;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-reel-stage="1"] {
    position: relative;
    inset: auto;
    transform: none;
    grid-column: 1;
    grid-row: 1;
    height: 300px;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: visible;
    clip-path: inset(-70px 0);
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-action-cluster="1"] {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 12px;
    width: 100%;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-desktop-actions="1"] {
    position: static;
    flex: 1 1 340px;
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-bottom-bar="1"] {
    position: static;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-bottom-bar-inner="1"] {
    width: 100%;
    padding: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-action-layout="1"] {
    display: block;
    padding-bottom: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-action-layout="1"]
    > :first-child,
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-bottom-secondary-actions="1"] {
    margin-top: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-bottom-bar="1"]
    button {
    height: 44px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 13px;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-case-quick-settings="1"] {
    flex: 0 1 auto;
    justify-content: center;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-web-case-prizes="1"] {
    grid-column: 1;
    grid-row: 4;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-web-case-prizes="1"]
    [data-web-inline-panel="1"] {
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-prizes-page-grid="1"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-prizes-page-grid="1"]
    > div {
    min-width: 0;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-prizes-page-grid="1"]
    :is([data-cs-skin-editorial-card="grid"], [data-prize-editorial-frame="grid"]) {
    aspect-ratio: 5 / 6;
  }
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="case"]
    [data-prizes-page-grid="1"]
    .case-prize-card-media {
    top: 25%;
    height: 52%;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-tasks-section] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-tasks-section] > :first-child {
    grid-column: 1 / -1;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-positioner="1"] {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-motion="1"] {
    width: min(620px, 100%);
    max-width: 620px;
  }
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-panel="1"] {
    max-height: calc(100dvh - 48px);
  }
}

/* Wide browser/tablet Upgrade has enough horizontal room to keep the utility
   actions beside the wheel. Removing their dedicated row also lets the full
   game and its CTA fit without manufacturing a short vertical scroll. */
@media (min-width: 700px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="upgrade"]
    [data-upgrade-live-content="1"] {
    position: relative;
  }

  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="upgrade"]
    [data-upgrade-top-actions="1"] {
    position: absolute;
    inset: 0 0 auto;
  }

  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="upgrade"]
    [data-game-fixed-bar="upgrade"] {
    margin: 6px auto;
  }
}

@media (min-width: 720px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-cases-toolbar="1"] {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-cases-banner="1"] {
    --cases-banner-aspect: 16 / 9;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-cases-filter-row="1"] {
    justify-content: flex-end;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-case-category-filter="1"] {
    max-width: 280px;
  }
}

/* Banner cards must not enlarge the cases grid track. */
html[data-standalone="1"] [data-cases-toolbar="1"],
html[data-standalone="1"] [data-cases-banner="1"],
html[data-standalone="1"] [data-cases-banner="1"] [data-banner-strip="1"] {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

html[data-standalone="1"] [data-cases-toolbar="1"] {
  grid-template-columns: minmax(0, 1fr);
}

/* Predictable desktop interaction feedback without decorative glow effects. */
@media screen and (hover: hover) {
  html[data-desktop-layout="1"]
    :is(
      .ui-button,
      .ui-button-primary,
      [data-ui-select-trigger="1"],
      [data-ui-select-option="1"],
      [data-settings-page="1"] button,
      [data-referrals-level-grid="1"] button,
      [data-task-card="1"] button
    ) {
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      opacity var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"]
    :is(
      .ui-button--secondary,
      [data-ui-select-trigger="1"],
      [data-settings-page="1"] button,
      [data-referrals-level-grid="1"] button
    ):not(:disabled):hover {
    background-color: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"] [data-ui-select-option="1"]:hover {
    color: var(--web-text-primary);
    background: var(--ui-surface-soft);
  }

  html[data-desktop-layout="1"] :is(button, [role="button"]):disabled {
    cursor: not-allowed;
  }
}

@media (min-width: 600px) and (max-width: 679px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-tasks-section] {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (min-width: 740px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-profile-dashboard="1"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-referrals-dashboard="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  html[data-standalone="1"][data-desktop-layout="0"] [data-referrals-dashboard="1"] > * {
    margin-top: 0;
  }
}

/* Roulette must never derive its wheel size from an auto-height tablet stage.
   Wide tablets use the web two-column workspace; narrower tablets keep a large
   wheel above the controls and let the main document scroll naturally. */
@media (min-width: 600px) and (max-width: 899px) {
  html[data-standalone="1"][data-desktop-layout="0"][data-desktop-focus="roulette"]
    [data-app-main="1"] {
    overflow-y: auto;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-game-page="roulette"] {
    min-height: 100%;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-roulette-content="1"] {
    height: clamp(460px, calc(100dvh - 120px), 620px);
    min-height: 460px;
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-page="roulette"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    column-gap: 16px;
    width: 100%;
    max-width: 860px;
    height: 100%;
    overflow: hidden;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-roulette-content="1"] {
    grid-column: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-game-fixed-bar="roulette"] {
    grid-column: 2;
    width: 300px;
    max-width: 300px;
    margin: var(--app-topbar-content-gap, 18px) 0 24px;
  }
}

/* Source section: 08-shell-and-game-workspaces.css */
@media screen {
  html[data-desktop-layout="1"] [data-web-workspace-main="1"] {
    scroll-padding-top: var(--web-workspace-gap);
  }
  html[data-desktop-layout="1"] [data-content-section="1"] {
    min-width: 0;
  }
  html[data-desktop-layout="1"] [data-cases-toolbar="1"] {
    display: grid;
    align-items: start;
  }
  html[data-desktop-layout="1"] [data-cases-banner="1"] {
    min-width: 0;
    --cases-banner-aspect: 16 / 9;
  }
  html[data-desktop-layout="1"] [data-banner-image="1"] {
    object-position: center 20%;
  }
  html[data-desktop-layout="1"] [data-cases-filter-row="1"] {
    width: 100%;
  }
  html[data-desktop-layout="1"] [data-case-category-filter="1"] {
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    justify-self: stretch;
  }
  html[data-desktop-layout="1"][data-desktop-focus="upgrade"] [data-upgrade-live-content="1"] {
    grid-template-columns: minmax(0, 1fr) var(--web-game-panel-width, 320px);
    column-gap: 24px;
  }
  html[data-desktop-layout="1"][data-desktop-focus="rocket"] [data-rocket-content="1"] {
    grid-template-columns: minmax(0, 1fr) var(--web-game-panel-width, 320px);
    column-gap: 24px;
  }
  html[data-desktop-layout="1"][data-desktop-focus="plinko"] [data-game-page="plinko"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--web-game-panel-width, 320px);
    grid-template-rows: auto;
    align-content: start;
    gap: 20px 24px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  html[data-desktop-layout="1"] [data-plinko-board-shell="1"] {
    grid-column: 1;
    grid-row: 1;
  }
  html[data-desktop-layout="1"] [data-plinko-board-shell="1"] > div {
    height: calc(100% - 31px);
  }
  html[data-desktop-layout="1"] [data-plinko-desktop-stack="1"] {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-width: 0;
  }
  html[data-desktop-layout="1"] [data-plinko-desktop-controls="1"] {
    overflow-y: auto;
    padding: var(--web-game-panel-padding, 14px);
    border: 1px solid var(--web-workspace-border);
    border-radius: var(--web-game-panel-radius, 16px);
  }
  html[data-desktop-layout="1"] [data-plinko-desktop-controls="1"] button {
    border-radius: var(--ui-radius-control-sm);
    font-size: 13px;
  }
  html[data-desktop-layout="1"]
    [data-plinko-desktop-controls="1"]
    [data-plinko-settings-section]
    > div
    + div {
    margin-top: 8px;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="rocket"],
  html[data-desktop-layout="1"] [data-game-fixed-bar="pvp"] {
    position: static;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    grid-column: 2;
    align-self: start;
  }
  html[data-desktop-layout="1"][data-desktop-focus="pvp"] [data-pvp-layout="1"] {
    grid-template-areas: "main rail" "about about";
    grid-template-rows: auto auto;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="pvp"] {
    grid-area: controls;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="pvp"] .pvp-opaque-control-surface {
    padding-bottom: 12px;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="pvp"] button,
  html[data-desktop-layout="1"] [data-game-fixed-bar="rocket"] button {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"][data-desktop-focus="rocket"] [data-game-page="rocket"] {
    padding-bottom: 0;
  }
  html[data-desktop-layout="1"][data-desktop-focus="rocket"] [data-rocket-content="1"] {
    min-height: 500px;
    height: min(690px, calc(100dvh - 174px));
    grid-template-rows: minmax(0, 1fr) 34px;
    padding-bottom: 0;
  }
  html[data-desktop-layout="1"][data-desktop-focus="rocket"] [data-rocket-hero-host="1"] {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  html[data-desktop-layout="1"][data-desktop-focus="rocket"] [data-rocket-live-bets="1"] {
    height: auto;
    max-height: none;
    min-height: 0;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="rocket"] button {
    height: var(--web-game-primary-height, 44px);
  }
  html[data-desktop-layout="1"][data-desktop-focus="upgrade"] [data-game-page="upgrade"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--web-game-panel-width, 320px);
    grid-template-areas: "chance stake" "chance target" "chance controls" "chance actions";
    gap: 18px 24px;
    align-items: start;
  }
  html[data-desktop-layout="1"][data-desktop-focus="upgrade"] [data-upgrade-web-frame="1"],
  html[data-desktop-layout="1"][data-desktop-focus="upgrade"] [data-upgrade-live-content="1"] {
    display: contents;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="upgrade"] {
    grid-area: controls;
    position: static;
    inset: auto;
    width: 100%;
    transform: none;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="upgrade"] > div {
    width: 100%;
    transform: none;
  }
  html[data-desktop-layout="1"][data-desktop-focus="roulette"] [data-game-page="roulette"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--web-game-panel-width, 320px);
    gap: 24px;
  }
  html[data-desktop-layout="1"][data-desktop-focus="roulette"] [data-roulette-content="1"] {
    width: 100%;
    min-width: 0;
  }
  html[data-desktop-layout="1"] [data-game-fixed-bar="roulette"] {
    grid-column: 2;
    position: static;
    inset: auto;
    width: 100%;
    transform: none;
    align-self: start;
    min-width: 0;
  }
  html[data-desktop-layout="1"] [data-roulette-controls] {
    border-radius: var(--ui-radius-control);
  }
}

/* Source section: 09-workspace-foundation.css */
/* Source section: 09-account-and-data-pages.css */
/* Account and data pages share a compact, flat desktop surface hierarchy. */
[data-case-category-tabs="1"] {
  display: none;
}
html[data-desktop-layout="0"][data-standalone="1"] [data-case-category-tabs="1"][data-ui-underline-tabs="1"] {
  display: none;
}
[data-case-category-dropdown="1"] {
  width: 100%;
}

@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --web-item-card-title-size: clamp(11px, calc(11px * var(--ui-scale)), 14px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-page="1"] {
    container-name: tournament-page;
    container-type: inline-size;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero="1"] {
    container-name: tournament-hero;
    container-type: inline-size;
  }

  html[data-desktop-layout="1"] :is([data-tournament-hero], [data-tournament-my-standing]) {
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
    box-shadow: none;
    background: var(--ui-surface-muted);
  }
  html[data-desktop-layout="1"] [data-profile-dashboard="1"] {
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
  }
  html[data-desktop-layout="1"] [data-profile-card="compact"] {
    padding: 2px 16px 2px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-profile-status-column="1"] {
    justify-content: center;
    gap: 0;
    padding-left: 14px;
    border-left: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"] [data-profile-status-column="1"] > [data-profile-level-card] {
    min-height: 94px;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-profile-status-column="1"] > [data-steam-trade-link-card] {
    min-height: 58px;
    margin-top: 0;
    padding-block: 8px;
    border: 0;
    border-top: 1px solid var(--ui-border-subtle);
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-referrals-tabs="1"] {
    display: flex;
    justify-content: flex-start;
    border-radius: 0;
    border-bottom: 1px solid var(--ui-border-strong);
    background: transparent;
    padding: 0;
    gap: 20px;
  }
  html[data-desktop-layout="1"] [data-referrals-tabs="1"] > button {
    width: auto;
    min-width: 120px;
    padding-inline: 12px;
    border-radius: 0;
    background: transparent;
    font-size: 14px;
  }
  html[data-desktop-layout="1"] [data-referrals-tabs="1"] > button[aria-pressed="true"] {
    color: rgb(var(--ui-accent-rgb));
    border-bottom: 2px solid rgb(var(--ui-accent-rgb));
  }
  html[data-desktop-layout="1"] [data-inventory-tabs="1"],
  html[data-desktop-layout="1"] [data-bonuses-tabs="1"] {
    display: none;
  }
  html[data-desktop-layout="1"] [data-inventory-browse-controls="1"] {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px);
    justify-content: space-between;
    padding-block: 8px;
  }
  html[data-desktop-layout="1"] [data-inventory-browse-controls="1"] button {
    border-radius: var(--ui-radius-control-sm);
    min-height: 40px;
  }
  html[data-desktop-layout="1"] [data-referrals-dashboard="1"] {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
  }
  html[data-desktop-layout="1"] [data-referrals-page="1"] {
    max-width: none;
    margin-inline: 0;
  }
  html[data-desktop-layout="1"]
    :is([data-referrals-summary-card], [data-referrals-invite-card], [data-referrals-levels-card])
    > div {
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface-muted);
    padding: 20px;
  }
  html[data-desktop-layout="1"]
    :is([data-referrals-summary-card], [data-referrals-invite-card])
    > div {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 18px;
  }
  html[data-desktop-layout="1"] [data-referrals-invite-card="1"] {
    border-left: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"] [data-referrals-invite-card="1"] > div {
    display: flex;
    flex-direction: column;
  }
  html[data-desktop-layout="1"] [data-referrals-share-actions="1"] {
    margin-top: auto;
    padding-top: 16px;
  }
  html[data-desktop-layout="1"] [data-referrals-edit-action="1"] {
    margin-top: 8px;
  }
  html[data-desktop-layout="1"] [data-referrals-edit-action="1"] button {
    background: transparent;
    text-decoration: underline;
    height: 32px;
  }
  html[data-desktop-layout="1"] [data-referrals-dashboard="1"] button {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-referrals-metrics="1"] {
    gap: 0;
    overflow: hidden;
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-referrals-metrics="1"] > div {
    min-height: 68px;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-referrals-metrics="1"] > div + div {
    border-left: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"] [data-referrals-metrics="1"] > div:first-child > div {
    min-height: 68px;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-referrals-claim-action="1"] {
    height: 40px;
  }
  html[data-desktop-layout="1"] [data-referrals-level-grid="1"] button {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-referrals-stats-table="1"] {
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
    overflow: hidden;
  }
  html[data-desktop-layout="1"] [data-referrals-stats-table="1"] > div {
    border-radius: 0;
    margin-top: 0;
    border-bottom: 1px solid var(--ui-border-subtle);
    padding-block: 12px;
  }
  html[data-desktop-layout="1"] [data-referrals-stats-header="1"],
  html[data-desktop-layout="1"] [data-referrals-stats-row="1"] {
    grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) 80px minmax(120px, 1fr);
  }
  html[data-desktop-layout="1"] [data-tournament-hero-layout="1"] {
    grid-template-areas: "copy countdown" "toggle toggle" "body body" "aside aside";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    min-height: 0;
    gap: 12px 24px;
  }
  html[data-desktop-layout="1"] [data-tournament-hero-title="1"] span {
    display: inline;
    white-space: normal;
  }
  html[data-desktop-layout="1"] [data-tournament-hero-title="1"] span + span::before {
    content: " ";
  }
  html[data-desktop-layout="1"] [data-web-intro-toggle="1"] {
    display: flex;
    grid-area: toggle;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--ui-border-subtle);
    text-align: left;
    font-size: 13px;
    color: var(--ui-text-muted);
  }
  html[data-desktop-layout="1"]
    [data-tournament-hero="1"][data-web-intro-expanded="0"]
    :is([data-tournament-hero-body], [data-tournament-hero-aside]) {
    display: none;
  }
  html[data-desktop-layout="1"]
    [data-tournament-hero="1"][data-web-intro-expanded="0"]
    [data-tournament-hero-layout="1"] {
    grid-template-areas: "copy countdown" "toggle toggle";
  }
  html[data-desktop-layout="1"]
    [data-tournament-hero="1"][data-web-intro-expanded="1"]
    [data-tournament-rule-grid="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-desktop-layout="1"] [data-tournament-countdown="1"] {
    box-shadow: none;
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-tournament-table="1"] {
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
    overflow: hidden;
  }
  html[data-desktop-layout="1"] [data-tournament-table="1"] > div {
    margin-top: 0;
  }
  html[data-desktop-layout="1"] [data-tournament-table-head="1"] {
    padding-block: 12px;
    background: var(--ui-surface-muted);
  }
  html[data-desktop-layout="1"] [data-tournament-leaderboard-row="1"] {
    border-radius: 0;
    border-top: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"] [data-tournament-row-rank="1"] {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-games-page="1"] [data-game-card] {
    box-shadow: none;
    background-color: var(--ui-surface-muted);
  }
  html[data-desktop-layout="1"] [data-tasks-summary="1"] {
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
  }
  html[data-desktop-layout="1"] [data-task-card="1"] {
    display: flex;
    border-radius: var(--ui-radius-control);
    box-shadow: none;
    border: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"] [data-task-card="1"] > div:last-child {
    display: flex;
    min-width: 0;
    width: 100%;
    flex: 1;
    flex-direction: column;
  }
  html[data-desktop-layout="1"] [data-task-card="1"] > div:last-child > div:last-child {
    margin-top: auto;
    padding-top: 12px;
  }
  html[data-desktop-layout="1"] [data-raffle-card="1"][data-raffle-card-variant="active"] {
    min-height: 184px;
    border-radius: var(--ui-radius-control);
    box-shadow: none;
  }
  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-visual="1"] {
    min-height: 148px;
  }
  html[data-desktop-layout="1"] [data-raffle-card="1"] [data-raffle-card-stats="1"] {
    gap: 0;
    overflow: hidden;
    border-radius: var(--ui-radius-control-sm);
    background: var(--ui-surface-muted);
  }
  html[data-desktop-layout="1"] [data-raffle-card="1"] [data-raffle-stat="1"] {
    min-height: 64px;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"]
    [data-raffle-card="1"]
    [data-raffle-stat="1"]
    + [data-raffle-stat="1"] {
    border-left: 1px solid var(--ui-border-subtle);
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] {
    --web-case-actions-width: 300px;
    --web-case-left: calc(var(--desktop-edge) + var(--desktop-rail-width) + var(--desktop-gutter));
  }
  html[data-desktop-layout="1"] [data-case-bottom-bar="1"] {
    position: static;
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-bottom-bar-inner="1"] {
    width: 100%;
    padding: 0;
  }
  html[data-desktop-layout="1"] [data-case-bottom-bar="1"] button {
    border-radius: var(--ui-radius-control-sm);
    height: 44px;
    font-size: 13px;
  }
  html[data-desktop-layout="1"] [data-bottom-sheet-panel="1"] {
    border-radius: var(--ui-radius-card);
  }
}

@media screen and (hover: hover) {
  html[data-desktop-layout="1"] [data-games-page="1"] [data-game-card] {
    transition:
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard),
      border-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }
  html[data-desktop-layout="1"] [data-games-page="1"] [data-game-card]:hover {
    background-color: var(--ui-surface-hover);
  }
}

/* Source section: 10-type-and-density.css */
/* Professional information density: desktop type has a small, repeatable scale. */
@media screen {
  html[data-desktop-layout="1"] [data-web-workspace-main="1"] {
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"]
    :is(
      [data-cases-page="1"],
      [data-tasks-page="1"],
      [data-referrals-page="1"],
      [data-tournament-page="1"],
      [data-raffle-details-page="1"],
      [data-inventory-page-content="1"]
    ) {
    letter-spacing: -0.008em;
  }

  /* Tasks: section labels and cards share one compact rhythm. */
  html[data-desktop-layout="1"] [data-tasks-page="1"] {
    display: grid;
    gap: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-tasks-page="1"] > *,
  html[data-desktop-layout="1"] [data-tasks-section] > * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"] [data-tasks-summary="1"] {
    padding: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-tasks-summary-label="1"],
  html[data-desktop-layout="1"] [data-referrals-summary-label="1"],
  html[data-desktop-layout="1"] [data-referrals-promo-label="1"],
  html[data-desktop-layout="1"] [data-tournament-leaderboard-eyebrow="1"] {
    color: var(--web-text-tertiary);
    font-size: var(--web-type-caption);
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.1em;
  }

  html[data-desktop-layout="1"] [data-tasks-summary-value="1"] {
    margin-top: var(--web-space-2);
  }

  html[data-desktop-layout="1"] [data-tasks-summary-value="1"] > span:first-child {
    font-size: var(--web-type-display);
    font-weight: 700;
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"] [data-tasks-section] {
    gap: 10px;
  }

  html[data-desktop-layout="1"] [data-tasks-section-title="1"] {
    grid-column: 1 / -1;
    min-height: 24px;
    color: var(--web-text-primary);
    font-size: var(--web-type-section);
    font-weight: var(--ui-font-weight-semibold);
    line-height: var(--web-leading-tight);
  }

  html[data-desktop-layout="1"] [data-task-card="1"] {
    min-height: 132px;
    padding: 12px;
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-task-card="1"] .text-sm {
    font-size: var(--web-type-body);
  }

  html[data-desktop-layout="1"] [data-task-card="1"] .text-xs {
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"] [data-task-card="1"] button {
    height: 36px;
    border-radius: var(--ui-radius-control);
  }

  /* Profile and referral dashboards use the same restrained type hierarchy. */
  html[data-desktop-layout="1"] [data-profile-dashboard="1"] {
    padding: var(--web-space-3);
  }

  html[data-desktop-layout="1"] [data-profile-card="compact"] {
    min-height: 146px;
  }

  html[data-desktop-layout="1"] [data-profile-display-name="1"] {
    font-size: 16px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.02em;
  }

  html[data-desktop-layout="1"] [data-profile-user-id="1"] {
    margin-top: 7px;
    color: var(--web-text-tertiary);
    font-size: 12px;
  }

  html[data-desktop-layout="1"]
    :is([data-referrals-summary-card="1"], [data-referrals-invite-card="1"])
    > div {
    padding: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-referrals-summary-value="1"] {
    margin-top: var(--web-space-2);
  }

  html[data-desktop-layout="1"] [data-referrals-summary-value="1"] > span:first-child {
    font-size: var(--web-type-display);
    font-weight: 700;
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"]
    :is([data-referrals-summary-description="1"], [data-referrals-promo-description="1"]) {
    margin-top: var(--web-space-2);
    color: var(--web-text-secondary);
    font-size: var(--web-type-body);
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"] [data-referrals-promo-code="1"] {
    font-size: 24px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.08em;
  }

  html[data-desktop-layout="1"] [data-referrals-tabs="1"] {
    height: 42px;
  }

  html[data-desktop-layout="1"] [data-referrals-overview="1"] {
    margin-top: 0;
  }

  /* Tournament hierarchy no longer mixes oversized mobile display text with data UI. */
  html[data-desktop-layout="1"] [data-tournament-page="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--web-space-4);
    padding-bottom: var(--web-space-5);
  }

  html[data-desktop-layout="1"] [data-tournament-page="1"] > * {
    min-width: 0;
    margin-top: 0;
  }

  html[data-desktop-layout="1"] [data-tournament-hero="1"] {
    padding: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-tournament-hero-eyebrow="1"] {
    margin-top: 0;
    font-size: var(--web-type-caption);
    font-weight: 700;
    letter-spacing: 0.11em;
  }

  html[data-desktop-layout="1"] [data-tournament-hero-title="1"] {
    margin-top: 6px;
    font-size: var(--web-type-page);
    font-weight: 700;
    line-height: var(--web-leading-tight);
    letter-spacing: -0.03em;
  }

  html[data-desktop-layout="1"] [data-tournament-hero-body="1"] {
    margin-top: var(--web-space-3);
    max-width: 620px;
    color: var(--web-text-secondary);
    font-size: var(--web-type-body);
    font-weight: 500;
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"] [data-tournament-my-standing="1"] {
    padding: var(--web-space-3) var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-tournament-leaderboard-title="1"] {
    margin-top: 3px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  html[data-desktop-layout="1"] [data-tournament-participant-count="1"] {
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: var(--web-surface-raised);
    font-size: var(--web-type-caption);
  }

  /* Settings and inventory align with the same control density. */
  html[data-desktop-layout="1"] [data-settings-page="1"] {
    gap: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-settings-page="1"] section {
    border-radius: var(--web-radius-lg);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-settings-page="1"] section > button {
    min-height: 44px;
    padding-block: 10px;
  }

  html[data-desktop-layout="1"] [data-inventory-page-content="1"] {
    display: grid;
    gap: var(--web-space-3);
  }

  html[data-desktop-layout="1"] [data-inventory-page-content="1"] > * {
    margin-top: 0;
  }
}

/* Tablet receives the same hierarchy at a roomier touch density. */
@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-tasks-page="1"],
      [data-referrals-page="1"],
      [data-tournament-page="1"],
      [data-raffle-details-page="1"],
      [data-inventory-page-content="1"]
    ) {
    letter-spacing: -0.006em;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tasks-section-title="1"] {
    font-size: 15px;
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-tasks-summary-label="1"],
      [data-referrals-summary-label="1"],
      [data-referrals-promo-label="1"],
      [data-tournament-leaderboard-eyebrow="1"]
    ) {
    letter-spacing: 0.11em;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-title="1"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-raffle-details-title="1"] {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.035em;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-task-card="1"] {
    border-radius: var(--ui-radius-control);
  }
}

/* Source section: 11-inline-workflows.css */
/* Everyday desktop tasks stay in the document rather than locking it in a dialog. */
@media screen {
  html[data-desktop-layout="1"] [data-web-game-info] {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    min-width: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      grid-template-rows var(--ui-motion-slow) var(--ui-motion-ease-emphasized),
      opacity var(--ui-motion-normal) var(--ui-motion-ease-standard),
      visibility 0s linear var(--ui-motion-slow);
  }
  html[data-desktop-layout="1"] [data-web-game-info][data-web-game-info-open="1"] {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      grid-template-rows var(--ui-motion-slow) var(--ui-motion-ease-emphasized),
      opacity var(--ui-motion-normal) var(--ui-motion-ease-standard),
      visibility 0s linear 0s;
  }
  html[data-desktop-layout="1"] [data-web-game-info-reveal="1"] {
    min-height: 0;
    overflow: hidden;
  }
  html[data-desktop-layout="1"] [data-web-game-info] [data-web-inline-panel] {
    opacity: 0;
    transform: translateY(-8px);
    transform-origin: 50% 0;
    transition:
      opacity var(--ui-motion-normal) var(--ui-motion-ease-standard),
      transform var(--ui-motion-slow) var(--ui-motion-ease-emphasized);
  }
  html[data-desktop-layout="1"]
    [data-web-game-info][data-web-game-info-open="1"]
    [data-web-inline-panel] {
    opacity: 1;
    transform: translateY(0);
  }
  html[data-desktop-layout="1"] [data-web-game-info] [data-web-inline-panel] {
    margin-bottom: 24px;
    scroll-margin-top: 16px;
  }
  html[data-desktop-layout="1"]
    [data-web-game-info="about"]
    [data-web-inline-content]
    > [data-game-about-document] {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 0;
    align-items: start;
  }
  html[data-desktop-layout="1"] [data-game-about-document] > [data-game-about-summary="1"] {
    min-width: 0;
    padding-right: 24px;
  }
  html[data-desktop-layout="1"] [data-game-about-document] > [data-game-about-steps="1"] {
    min-width: 0;
    margin-top: 0;
    padding-left: 24px;
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid var(--web-border);
  }
  html[data-desktop-layout="1"] [data-web-game-info="history"] [data-web-inline-content] {
    max-height: none;
    overflow: visible;
  }
  html[data-desktop-layout="1"] [data-web-game-info="history"] [class*="min-h-[420px]"] {
    min-height: 160px;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] {
    min-width: 0;
    margin-top: 16px;
    padding: 16px;
    scroll-margin-top: 100px;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] > header h2 {
    font-size: 15px;
    font-weight: 600;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] > header button {
    width: 32px;
    height: 32px;
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface-muted);
    font-size: 22px;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] > footer {
    margin-top: 16px;
  }
  html[data-desktop-layout="1"] [data-web-inline-panel="1"] > footer button {
    max-width: 240px;
  }
  html[data-desktop-layout="1"] #pvp-notification-settings,
  html[data-desktop-layout="1"] #rank-help {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 24px;
  }
  html[data-desktop-layout="1"] #pvp-notification-settings > footer > div {
    justify-content: flex-end;
  }
  html[data-desktop-layout="1"] #pvp-notification-settings [data-web-inline-content] > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  html[data-desktop-layout="1"] #pvp-notification-settings [data-web-inline-content] > div > div {
    margin-top: 0;
  }
  html[data-desktop-layout="1"] #rank-help [data-web-inline-content] {
    max-width: none;
    margin-inline: 0;
  }
  html[data-desktop-layout="1"]
    [data-web-inline-panel="1"]
    [data-inventory-filter-sheet-layout="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  html[data-desktop-layout="1"]
    [data-web-inline-panel="1"]
    [data-inventory-filter-sheet-layout="1"]
    > * {
    margin-top: 0;
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-details-page="1"] {
    display: grid;
    gap: 18px 24px;
    align-items: start;
    padding-bottom: 24px;
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-reel-stage="1"] {
    position: relative;
    inset: auto;
    transform: none;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: visible;
    clip-path: inset(-80px 0);
  }
  html[data-desktop-layout="1"] [data-case-action-cluster="1"] {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-inline: auto;
    padding: 14px;
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-card);
  }
  html[data-desktop-layout="1"] [data-case-action-visual="1"] {
    display: var(--case-action-visual-display, flex);
    min-height: 0;
    height: clamp(128px, 18vh, 172px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  html[data-desktop-layout="1"] [data-case-action-visual="1"] img {
    display: block;
    width: min(92%, 220px);
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 26px rgb(0 0 0 / 0.3));
  }
  html[data-desktop-layout="1"] [data-case-desktop-actions="1"] {
    position: static;
    min-width: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-case-action-layout="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding-bottom: 0;
  }
  html[data-desktop-layout="1"] [data-case-action-layout="1"] > :first-child,
  html[data-desktop-layout="1"] [data-case-bottom-secondary-actions="1"] {
    margin-top: 0;
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-settings="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting] {
    min-width: 0;
    height: auto;
    border: 0;
  }
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting="coupon"] {
    grid-column: 1 / -1;
    max-width: none;
  }
  html[data-desktop-layout="1"] [data-web-case-prizes="1"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  html[data-desktop-layout="1"] [data-web-case-prizes="1"] [data-web-inline-content="1"] {
    max-height: none;
    overflow: visible;
  }
  html[data-desktop-layout="1"] [data-web-case-prizes="1"] [data-web-inline-panel="1"] {
    padding: 0;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-desktop-layout="1"] [data-prizes-page-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  html[data-desktop-layout="1"] [data-inventory-active-filters="1"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-block: 12px;
  }
  html[data-desktop-layout="1"] [data-inventory-active-filters="1"] .ui-button {
    min-width: 0;
    max-width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
  }
  html[data-desktop-layout="1"] [data-prizes-page-grid="1"] > div {
    min-width: 0;
  }
  html[data-desktop-layout="1"] [data-prizes-page-grid="1"] [data-cs-skin-editorial-card] {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"]
    [data-prizes-page-grid="1"]
    :is([data-cs-skin-editorial-card="grid"], [data-prize-editorial-frame="grid"]) {
    aspect-ratio: 5 / 6;
  }
  html[data-desktop-layout="1"] [data-inventory-grid-columns] {
    grid-template-columns: repeat(var(--inventory-columns, 5), minmax(0, 1fr));
    gap: 12px;
    justify-content: stretch;
  }
  html[data-desktop-layout="1"] [data-inventory-card-cell="1"],
  html[data-desktop-layout="1"] [data-inventory-card="1"] {
    max-width: none;
  }
  html[data-desktop-layout="1"] [data-inventory-cs-skin-card="editorial"] {
    border-radius: var(--ui-radius-control-sm);
  }
  html[data-desktop-layout="1"] [data-web-inventory-selection="1"] {
    position: sticky;
    bottom: 16px;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--web-border-strong);
    border-radius: var(--web-radius-md);
  }
  html[data-desktop-layout="1"] [data-web-inventory-selection="1"] > :nth-child(2) {
    margin-right: auto;
  }
}

/* Source section: 12-design-system.css */
/* Professional desktop foundation: one restrained system for spacing, type and surfaces. */
@media screen {
  html[data-desktop-layout="1"] {
    /* Desktop shell, workspace and type primitives have one owner. Feature
       layers may consume these tokens but must not redefine the base scale. */
    --desktop-shell-max: 1480px;
    --desktop-rail-width: 216px;
    --desktop-logo-width: 158px;
    --desktop-gutter: clamp(20px, 2vw, 32px);
    /* Persistent navigation must not shift when a route enables game focus. */
    --desktop-rail-edge: calc(var(--desktop-gutter) / 2);
    --desktop-content-offset: calc(var(--desktop-rail-width) + 2 * var(--desktop-gutter));
    --desktop-shell-half: calc(var(--desktop-shell-max) / 2);
    --desktop-header-track-half: var(--desktop-shell-half);
    --desktop-current-shell-half: var(--desktop-shell-half);
    --desktop-section-gap: 24px;
    --desktop-panel-gap: 16px;
    --desktop-edge: max(
      var(--desktop-gutter),
      calc(50vw - var(--desktop-shell-half) + var(--desktop-gutter))
    );
    --bottom-nav-space: 24px;
    --web-item-card-size: 204px;
    --web-item-card-gap: 14px;
    --inventory-card-max: var(--web-item-card-size);
    --web-workspace-panel: var(--ui-surface-muted);
    --web-workspace-border: var(--ui-border-subtle);
    --web-workspace-gap: 24px;
    --web-type-display: var(--ui-type-page);
    --web-type-page: var(--ui-type-heading);
    --web-type-section: var(--ui-type-emphasis);
    --web-type-body: var(--ui-type-small);
    --web-type-caption: var(--ui-type-caption);
    --web-leading-tight: var(--ui-leading-tight);
    --web-leading-body: var(--ui-leading-body);
    --web-space-1: 4px;
    --web-space-2: 8px;
    --web-space-3: 12px;
    --web-space-4: 16px;
    --web-space-5: 24px;
    --web-space-6: 32px;
    --web-radius-sm: var(--ui-radius-control-sm);
    --web-radius-md: var(--ui-radius-control);
    --web-radius-lg: var(--ui-radius-card);
    --web-border-hairline: var(--ui-border-hairline);
    --web-border: var(--ui-border-subtle);
    --web-border-strong: var(--ui-border-strong);
    --web-text-primary: var(--ui-text-primary);
    --web-text-secondary: var(--ui-text-muted);
    --web-text-muted: var(--web-text-secondary);
    --web-text-tertiary: var(--ui-text-tertiary);
    --web-shadow-raised: var(--ui-shadow-card-hover);
    --web-shadow-overlay: var(--ui-overlay-shadow);
    --web-surface-canvas: var(--ui-surface-canvas);
    --web-surface-sunken: var(--ui-surface-canvas);
    --web-surface-base: var(--ui-surface-base);
    --web-surface-raised: var(--ui-surface-raised);
    --web-surface-hover: var(--ui-surface-hover);
    --web-surface-overlay: var(--ui-surface-overlay);
    --web-surface-quiet: var(--ui-surface-quiet);
    --web-surface-muted: var(--ui-surface-muted);
    --web-surface-soft: var(--ui-surface-soft);
    --web-surface-interactive: var(--ui-surface-interactive);
    --web-surface-interactive-hover: var(--ui-surface-interactive-hover);
    --web-surface-disabled: var(--ui-surface-disabled);
    --web-highlight: var(--ui-highlight-soft);
    --web-highlight-strong: var(--ui-highlight-strong);
    --web-card-shadow: var(--ui-shadow-card);
    --web-card-shadow-hover: var(--ui-shadow-card-hover);
    --web-floating-shadow: var(--ui-shadow-floating);
    --web-page-max: 1280px;
    --web-page-gap: var(--web-space-5);
    --web-field-max: 560px;
    --web-dialog-gutter: 64px;
    --web-dialog-compact: 440px;
    --web-dialog-short: 480px;
    --web-dialog-default: 520px;
    --web-dialog-medium: 560px;
    --web-dialog-wide: 840px;
    --web-dialog-wide-large: 880px;
    --web-dialog-result: 640px;
    --web-drawer-width: 480px;
    --web-information-dialog-width: 560px;
    --web-game-panel-width: 320px;
    --web-selection-game-panel-width: clamp(340px, 28vw, 380px);
    --web-selection-game-panel-height: min(474px, calc(100dvh - 174px));
    --web-selection-game-panel-border: var(--web-border);
    --web-selection-game-panel-background: var(--ui-gradient-workflow-sheen), rgb(22 27 34 / 0.88);
    --web-selection-game-panel-shadow: var(--web-highlight), var(--web-card-shadow);
    --web-game-rail-height: 432px;
    --web-game-panel-padding: 16px;
    --web-game-footer-inset: 16px;
    --web-game-control-gap: 8px;
    --web-game-control-height: 40px;
    --web-game-primary-height: 44px;
    --web-game-control-radius: var(--ui-radius-control-sm);
    --web-game-panel-radius: var(--web-radius-lg);
    --ui-backdrop-blur: 4px;
    --ui-overlay-shadow: var(--ui-shadow-overlay);
    --web-dialog-radius: var(--web-radius-lg);
    --web-dialog-header-height: 60px;
    --web-dialog-pad-x: 20px;
    --ui-dialog-surface: var(--web-surface-base);
    --ui-dialog-section-surface: var(--web-surface-raised);
    --ui-dialog-hover-surface: var(--web-surface-hover);
    --ui-dialog-title: var(--web-text-primary);
    --ui-dialog-copy: var(--web-text-secondary);
    --ui-dialog-muted: var(--web-text-tertiary);
    --ui-dialog-separator: var(--web-border);
    --ui-dialog-title-size: var(--web-type-section);
    --ui-dialog-close-size: 34px;
    --ui-dialog-close-radius: var(--ui-radius-control-sm);
    --ui-control-height-sm: 34px;
    --ui-control-height: 40px;
    --ui-control-height-lg: 44px;
    --ui-control-radius: var(--ui-radius-control);
    --ui-control-surface: var(--ui-surface-interactive);
    --ui-control-surface-hover: var(--ui-surface-interactive-hover);
    --app-topbar-content-gap: var(--web-space-5);
    color: var(--web-text-primary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] {
    /* Desktop uses a restrained, rectilinear hierarchy. Larger mobile radii
       remain untouched; circles still belong to avatars, status dots and
       game mechanics rather than ordinary surfaces. */
    --ui-radius-control-sm: 6px;
    --ui-radius-control: 8px;
    --ui-radius-card: 10px;
    --ui-radius-panel: 12px;
    --ui-radius-dialog: 12px;
    --ui-dialog-radius-desktop: 12px;
    --ui-dialog-section-radius: 8px;
    --ui-dialog-close-radius: 6px;
    --web-type-display: var(--ui-type-web-display);
    --web-type-page: var(--ui-type-web-page);
    --web-type-section: var(--ui-type-web-section);
    --web-type-body: var(--ui-type-web-body);
    --web-type-caption: var(--ui-type-web-caption);
    --web-page-gap: 28px;
    --web-leading-copy: var(--ui-leading-body);
    --web-action-ease: var(--ui-motion-ease-standard);
    --web-action-fast: var(--ui-motion-fast);
    --web-action-normal: var(--ui-motion-normal);
    --release-content-gap: clamp(16px, 1.65vw, 24px);
    --release-panel-width: clamp(286px, 22vw, 320px);
    --release-card-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"] [data-web-surface] {
    min-width: 0;
    border: 0;
    border-radius: var(--web-radius-lg);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"] [data-web-surface="raised"] {
    background: var(--web-surface-raised);
    box-shadow: var(--web-highlight), var(--web-card-shadow);
  }

  html[data-desktop-layout="1"] [data-web-surface="sunken"] {
    background: var(--web-surface-sunken);
    box-shadow: var(--ui-shadow-sunken);
  }

  html[data-desktop-layout="1"] [data-web-surface="accent"] {
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
    box-shadow: var(--ui-accent-edge), var(--web-highlight);
  }

  html[data-desktop-layout="1"] [data-web-surface-interactive="1"] {
    transition:
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"] [data-web-surface-interactive="1"]:hover {
      background-color: var(--web-surface-hover);
      box-shadow: var(--web-highlight-strong), var(--web-card-shadow-hover);
      transform: translateY(-1px);
    }
  }

  html[data-desktop-layout="1"] [data-web-empty-state="1"] {
    display: grid;
    min-height: 156px;
    place-items: center;
    padding: 28px;
    text-align: center;
  }

  html[data-desktop-layout="1"] [data-web-empty-state-copy="1"] {
    width: min(100%, 520px);
  }

  html[data-desktop-layout="1"] [data-web-empty-state-title="1"] {
    color: var(--web-text-primary);
    font-size: var(--web-type-section);
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.018em;
  }

  html[data-desktop-layout="1"] [data-web-empty-state-description="1"] {
    margin-top: 6px;
    color: var(--web-text-secondary);
    font-size: var(--web-type-body);
    line-height: 1.6;
  }

  html[data-desktop-layout="1"] [data-web-empty-state-action="1"] {
    margin-top: 14px;
  }

  /* Forms share one desktop geometry even when their feature markup predates UiButton. */
  html[data-desktop-layout="1"]
    [data-app-main="1"]
    :where(
      input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
          [type="file"]
        ),
      select,
      textarea
    ) {
    min-height: var(--ui-control-height);
    border-radius: var(--ui-control-radius);
  }

  html[data-desktop-layout="1"] [data-app-main="1"] textarea {
    min-height: 88px;
  }

  /* LIVE is supporting context, not the visual headline of the catalog. */
  html[data-desktop-layout="1"] [data-live-win-strip="1"] {
    min-height: 64px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"] [data-live-win-layout="1"] {
    gap: 0;
  }

  html[data-desktop-layout="1"] [data-live-win-label="1"] {
    align-self: stretch;
    padding: 0 13px 0 2px;
    border-right: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"] [data-live-win-viewport="true"] {
    padding-left: 1px;
  }

  html[data-desktop-layout="1"] [data-live-win-track="1"] {
    gap: var(--web-space-1);
  }

  html[data-desktop-layout="1"] [data-live-win-card="reference-rail"] > div,
  html[data-desktop-layout="1"] [data-live-win-skeleton="1"] {
    border-radius: var(--ui-radius-indicator);
    background-color: var(--web-surface-soft);
  }

  /* Case catalog toolbar and sections follow a stable desktop rhythm. */
  html[data-desktop-layout="1"] [data-cases-page="1"] {
    gap: var(--web-space-5);
  }

  html[data-desktop-layout="1"] [data-cases-toolbar="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--web-space-2);
  }

  html[data-desktop-layout="1"] [data-cases-filter-row="1"] {
    min-width: 0;
    justify-content: flex-start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-category-tabs="1"][data-ui-underline-tabs="1"] {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    gap: 6px 18px;
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-category-tabs="1"] [data-case-category-tab="1"][data-ui-underline-tab="1"] {
    min-height: 42px;
    height: auto;
    max-width: 100%;
    padding: 8px 2px 11px;
    font-size: 13px;
    white-space: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-category-tabs="1"] [data-case-category-tab="1"] [data-ui-underline-tab-label="1"] {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[data-desktop-layout="1"] [data-case-category-dropdown="1"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-cases-fallback-banner="1"] {
    min-height: 44px;
    padding: 9px 14px;
    border: 0;
    border-radius: var(--web-radius-md);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-content-section-header="1"] {
    min-height: 34px;
    margin-bottom: var(--web-space-3);
    padding-bottom: var(--web-space-2);
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"] [data-content-section-header="1"] > :first-child {
    color: var(--web-text-primary);
    font-size: 16px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.015em;
  }

  html[data-desktop-layout="1"] [data-content-section-header="1"] > div[aria-hidden="true"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-content-section-toggle="1"] {
    min-height: 30px;
    margin-right: 0;
    border-radius: var(--web-radius-sm);
    color: var(--web-text-tertiary);
    font-size: 12px;
  }

  html[data-desktop-layout="1"] [data-cases-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--web-space-3);
  }

  html[data-desktop-layout="1"]
    :is(
      [data-cases-grid="1"],
      [data-inventory-grid-columns],
      [data-tasks-section],
      [data-achievements-grid="true"],
      [data-prizes-page-grid="1"]
    )
    > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"] [data-case-card="1"] {
    min-width: 0;
    height: 100%;
    padding: 12px 12px 13px;
    overflow: hidden;
    border: 0;
    border-radius: var(--web-radius-lg);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-case-card-visual="1"] {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
  }

  html[data-desktop-layout="1"] [data-case-card-media="1"] {
    aspect-ratio: 4 / 3;
    min-height: 132px;
    overflow: visible;
  }

  html[data-desktop-layout="1"] [data-case-card-media="1"] img {
    max-height: 170px;
    filter: drop-shadow(0 14px 18px rgb(0 0 0 / 0.24));
  }

  html[data-desktop-layout="1"] [data-case-card-body="1"] {
    margin-top: auto;
    padding: 10px 2px 0;
  }

  html[data-desktop-layout="1"] [data-case-card-meta="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--web-space-3);
  }

  html[data-desktop-layout="1"] [data-case-card-title="1"] {
    display: -webkit-box;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    color: var(--web-text-primary);
    font-size: 14px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.25;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html[data-desktop-layout="1"] [data-case-price="1"] {
    height: 30px;
    padding-inline: 9px;
    gap: 5px;
    border: 0;
    border-radius: var(--web-radius-sm);
    background: var(--web-surface-soft);
  }

  html[data-desktop-layout="1"] [data-case-price="1"] > span:last-child {
    font-size: 13px;
  }

  html[data-desktop-layout="1"] [data-case-free="1"] {
    min-height: 28px;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--web-radius-sm);
    color: var(--ui-positive-soft);
    background: rgb(74 222 128 / 0.07);
    font-size: 12px;
    line-height: 1;
  }

  html[data-desktop-layout="1"] [data-case-card-badge="1"] {
    min-height: 20px;
    border: 0;
    border-radius: var(--ui-radius-badge);
    box-shadow: none;
    font-size: 9px;
    letter-spacing: 0.035em;
  }

  /* The same surface language applies to existing page primitives. */
  html[data-desktop-layout="1"]
    :is(
      [data-games-page="1"] [data-game-card],
      [data-task-card="1"],
      [data-tasks-summary="1"],
      [data-tournament-hero],
      [data-tournament-my-standing],
      [data-raffle-card="1"]
    ) {
    border: 0;
    border-radius: var(--web-radius-lg);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-web-inline-panel="1"] {
    border: 0;
    border-radius: var(--web-radius-lg);
    background: var(--web-surface-base);
  }

  /* Most desktop hierarchy is tonal. Lines are reserved for separators and fields. */
  html[data-desktop-layout="1"]
    :is(
      [data-profile-dashboard="1"],
      [data-referrals-dashboard="1"],
      [data-referrals-levels-card="1"] > div,
      [data-referrals-stats-table="1"],
      [data-tournament-table="1"],
      [data-case-action-cluster="1"],
      [data-plinko-desktop-controls="1"],
      [data-web-inventory-selection="1"]
    ) {
    border: 0;
  }

  html[data-desktop-layout="1"] [data-profile-dashboard="1"],
  html[data-desktop-layout="1"] [data-referrals-dashboard="1"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-referrals-metrics="1"] {
    border: 0;
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] [data-tournament-table="1"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"]
    :is(
      [data-referrals-stats-header="1"],
      [data-referrals-stats-row="1"],
      [data-tournament-table-head="1"],
      [data-tournament-leaderboard-row="1"]
    ) {
    min-height: 48px;
    padding-block: var(--web-space-3);
  }

  html[data-desktop-layout="1"]
    :is([data-referrals-stats-row="1"], [data-tournament-leaderboard-row="1"]) {
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"] [data-case-action-cluster="1"],
  html[data-desktop-layout="1"] [data-plinko-desktop-controls="1"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-web-inventory-selection="1"] {
    background: var(--web-surface-raised);
    box-shadow: var(--web-floating-shadow);
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-panel="1"] {
    border: 0;
    background-color: var(--web-surface-base);
    background-image: none;
    box-shadow: var(--web-shadow-overlay);
  }

  /* Existing game cards keep their artwork, but use product-like tonal surfaces. */
  html[data-desktop-layout="1"] [data-games-page="1"] {
    --games-card-surface: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-games-desktop-grid="1"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(218px, calc((100dvh - 250px) / 2), 268px);
    gap: var(--web-space-3);
  }

  html[data-desktop-layout="1"] [data-game-card-variant="desktop"] {
    padding: var(--web-space-4);
    text-align: left;
  }

  html[data-desktop-layout="1"] [data-game-card-variant="desktop"] [data-game-card-artwork="1"] {
    padding-block: 0;
  }

  html[data-desktop-layout="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"]
    > * {
    width: var(--web-game-art-size, clamp(108px, 10vw, 144px));
    height: var(--web-game-art-size, clamp(108px, 10vw, 144px));
  }

  html[data-desktop-layout="1"] [data-game-card-variant="desktop"] .game-card-badge {
    height: 22px;
    padding-inline: 7px;
    border-radius: var(--ui-radius-badge);
    color: var(--web-text-secondary);
    background: var(--web-surface-interactive);
    font-size: 10px;
    letter-spacing: 0.025em;
  }

  html[data-desktop-layout="1"] [data-game-card-variant="desktop"] [data-game-card-arrow="1"] {
    color: var(--web-text-tertiary);
  }

  html[data-desktop-layout="1"] [data-games-page="1"] [data-game-card] {
    border: 0;
    border-radius: var(--web-radius-lg);
    background: var(--games-card-surface);
  }

  html[data-desktop-layout="1"] [data-game-card-title="1"] {
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.02em;
  }

  html[data-desktop-layout="1"] [data-game-card-description="1"] {
    color: var(--web-text-secondary);
    font-size: 12px;
    font-weight: 500;
  }

  html[data-desktop-layout="1"] [data-game-card-action="1"] {
    border-radius: var(--ui-radius-control-sm);
    color: var(--ui-primary-foreground);
  }

  html[data-desktop-layout="1"] .ui-button--secondary {
    border-color: transparent;
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] .ui-button--text {
    color: rgb(var(--ui-accent-rgb));
  }

  html[data-desktop-layout="1"] .ui-button-primary {
    border-radius: var(--ui-radius-control-sm);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] .ui-button--sm {
    min-height: var(--ui-control-height-sm);
    padding: 6px 10px;
    border-radius: var(--web-radius-sm);
  }

  html[data-desktop-layout="1"] .ui-button--md {
    min-height: 40px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"] .ui-button--lg {
    min-height: var(--ui-control-height-lg);
    padding: 10px 16px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 14px;
  }

  html[data-desktop-layout="1"] [data-ui-select-trigger="1"] {
    height: 40px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] [data-ui-select-menu="1"] {
    border-radius: var(--web-radius-md);
    background: var(--web-surface-raised);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: var(--web-shadow-raised);
  }

  html[data-desktop-layout="1"] [data-ui-select-option="1"] {
    height: 40px;
  }

  html[data-desktop-layout="1"] [data-tasks-summary="1"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"] [data-tasks-summary-decoration="1"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-tasks-summary-claim="1"] {
    padding: 0;
    border-radius: var(--ui-radius-control-sm);
    background: rgb(var(--ui-accent-rgb) / 0.92);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-tasks-summary-claim-content="1"] {
    min-height: 40px;
    border-radius: inherit;
    background: transparent;
    color: var(--ui-primary-foreground);
  }

  html[data-desktop-layout="1"] [data-tasks-summary-claim-content="1"] .rounded-full {
    color: inherit;
    background: rgb(0 0 0 / 0.09);
  }

  /* Game workspaces use flat side panels; overlays alone receive real elevation. */
  html[data-desktop-layout="1"]
    :is(
      [data-mines-desktop-panel="1"],
      [data-rocket-live-bets="1"],
      [data-game-fixed-bar="roulette"] [data-roulette-controls],
      [data-game-fixed-bar="pvp"] .pvp-opaque-control-surface
    ) {
    border: 0;
    border-radius: var(--web-radius-lg);
    background-color: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-game-fixed-bar="plinko"] button:first-child {
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-mines-stake-tabs="1"],
  html[data-desktop-layout="1"]
    [data-bottom-sheet-variant="plinko-settings"]
    [data-plinko-settings-section] {
    border: 0;
    border-radius: var(--web-radius-md);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] [data-plinko-stake-tabs="1"] {
    height: 40px;
    padding: 3px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] [data-plinko-stake-tabs="1"] > button {
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"] [data-plinko-stake-tabs="1"] > button[class*="bg-white/10"] {
    background: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"] [data-plinko-quick-stakes="1"] > button {
    height: 36px;
    border-radius: var(--web-radius-sm);
  }

  html[data-desktop-layout="1"] [data-plinko-stake-field="1"] {
    padding: 10px 12px;
    border-radius: var(--web-radius-md);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"] [data-plinko-desktop-controls="1"] [data-plinko-settings-section] {
    padding: 10px;
    border-radius: var(--web-radius-md);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"]
    [data-plinko-desktop-controls="1"]
    [data-plinko-settings-section]
    button {
    height: 40px;
    border-radius: var(--ui-radius-control);
  }

  /* Betting controls share one compact web geometry across every game. */
  html[data-desktop-layout="1"]
    :is(
      [data-mines-desktop-panel="1"],
      [data-plinko-desktop-controls="1"],
      [data-game-control-panel="pvp"],
      [data-game-control-panel="roulette"]
    ) {
    padding: var(--game-fixed-bar-padding, var(--web-game-footer-inset));
    border-radius: var(--web-game-panel-radius);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-plinko-desktop-controls="1"] {
    max-height: none;
    overflow: visible;
  }

  html[data-desktop-layout="1"] [data-game-controls="plinko"] {
    display: grid;
    gap: 10px;
    padding-bottom: 0;
  }

  html[data-desktop-layout="1"] [data-game-controls="plinko"] > * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"]
    :is(
      [data-mines-desktop-panel="1"],
      [data-plinko-desktop-controls="1"],
      [data-game-controls="pvp"]
    )
    button:not([data-game-primary-action="1"]) {
    min-height: var(--web-game-control-height);
    border-radius: var(--web-game-control-radius);
  }

  html[data-desktop-layout="1"]
    :is([data-mines-desktop-panel="1"], [data-plinko-desktop-controls="1"])
    :is(input, select) {
    min-height: var(--web-game-control-height);
  }

  html[data-desktop-layout="1"] [data-mines-desktop-panel="1"] > .mt-4 {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-mines-desktop-panel="1"] > .mt-5 {
    margin-top: 16px;
  }

  html[data-desktop-layout="1"] [data-mines-desktop-panel="1"] > :last-child {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-game-control-group="quick-stakes"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  html[data-desktop-layout="1"] [data-game-control-group="quick-stakes"] > button {
    min-width: 0;
    padding-inline: 4px;
    gap: 3px;
    font-size: 13px;
  }

  html[data-desktop-layout="1"] [data-game-control-group="reactions"] {
    margin-bottom: 10px;
  }

  html[data-desktop-layout="1"] [data-game-control-group="primary"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-game-primary-action="1"],
  html[data-desktop-layout="1"] [data-game-control-group="primary"] > button,
  html[data-desktop-layout="1"] [data-game-fixed-bar="upgrade"] button {
    height: var(--web-game-primary-height);
    min-height: var(--web-game-primary-height);
    border-radius: var(--web-radius-md);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-game-control-panel="pvp"] {
    padding-bottom: var(--web-game-footer-inset);
  }

  html[data-desktop-layout="1"]
    [data-game-control-panel="roulette"]
    [data-roulette-stake-selector] {
    border-radius: var(--web-radius-md);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-inventory-bulk-action-panel="1"] {
    border: 0;
    border-radius: var(--web-radius-lg);
    background: var(--web-surface-raised);
  }

  /* Content pages use tonal grouping; borders are reserved for row dividers
     and form focus instead of outlining every block. */
  html[data-desktop-layout="1"]
    :is(
      [data-profile-dashboard="1"],
      [data-referrals-dashboard="1"],
      [data-tasks-summary="1"],
      [data-task-card="1"],
      [data-raffle-card="1"],
      [data-tournament-hero="1"],
      [data-tournament-my-standing="1"],
      [data-tournament-table="1"]
    ) {
    border: 0;
    box-shadow: none;
  }

  html[data-desktop-layout="1"]
    :is([data-referrals-summary-card], [data-referrals-invite-card], [data-referrals-levels-card])
    > div {
    border: 0;
  }

  html[data-desktop-layout="1"] [data-raffle-card="1"] [data-raffle-card-stats="1"] {
    border: 0;
  }

  html[data-desktop-layout="1"]
    :is([data-task-card="1"], [data-raffle-card="1"], [data-tournament-my-standing="1"]) {
    background-color: var(--web-surface-base);
  }
}

@media screen and (max-width: 1199px) {
  html[data-desktop-layout="1"] {
    --desktop-rail-width: 192px;
    --desktop-logo-width: 152px;
    --desktop-gutter: 16px;
    --desktop-content-offset: calc(var(--desktop-rail-width) + 2 * var(--desktop-gutter));
  }
}

@media (min-width: 1440px) {
  html[data-desktop-layout="1"] {
    --desktop-rail-width: 224px;
    --desktop-logo-width: 166px;
  }
}

@media screen and (hover: hover) {
  html[data-desktop-layout="1"] :is([data-content-section-toggle="1"], [data-case-card="1"]) {
    transition:
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard),
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      border-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"] [data-content-section-toggle="1"]:hover {
    color: var(--web-text-primary);
    background: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"] [data-case-card="1"]:hover {
    transform: translateY(-2px);
    background: var(--web-surface-hover);
    filter: none;
    box-shadow: none;
  }

  html[data-desktop-layout="1"]
    [data-case-card="1"]:hover
    [data-case-card-visual="1"]
    .group-hover\:scale-110 {
    transform: scale(1.035);
  }

  html[data-desktop-layout="1"] [data-games-page="1"] [data-game-card]:hover {
    transform: translateY(-2px);
    border-color: transparent;
    background: var(--web-surface-overlay);
  }
}

/* Source section: 13-page-states.css */
/* Existing loading, empty and error paths share one quiet desktop treatment. */
@media screen {
  /* Route loading is part of the page on web. It must not cover the navigation
     and top bar like the legacy mobile overlay. Full-screen startup loading
     keeps its original fixed presentation. */
  html[data-desktop-layout="1"] [data-loading-overlay="1"]:not([data-loading-fullscreen="1"]) {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 160px;
  }

  html[data-desktop-layout="1"] [data-page-state="loading"] {
    min-height: 160px;
    padding-block: var(--web-space-6);
  }

  html[data-desktop-layout="1"] [data-page-state="loading"] svg {
    width: 30px;
    height: 30px;
  }

  html[data-desktop-layout="1"] :is([data-page-state="empty"], [data-page-state="error"]) {
    min-height: 160px;
    padding: var(--web-space-5);
    border: 0;
    border-radius: var(--web-radius-lg);
    color: var(--web-text-secondary);
    background: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-page-state="error"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  html[data-desktop-layout="1"] [data-page-state="empty"] {
    display: grid;
    place-items: center;
    text-align: center;
  }

  html[data-desktop-layout="1"]
    :is([data-page-state="empty"], [data-page-state="error"])[data-page-state-scope="section"] {
    min-height: 112px;
    padding: var(--web-space-4);
  }

  html[data-desktop-layout="1"] [data-page-state="empty"] > div {
    min-height: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"] :is([data-page-state="empty"], [data-page-state="error"]) button {
    min-height: 38px;
    border-radius: var(--ui-radius-control);
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"]
    [data-loading-overlay="1"]:not([data-loading-fullscreen="1"]) {
    position: static;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 180px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-game-primary-action="1"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-game-control-group="primary"] > button {
    height: 52px;
    min-height: 52px;
    border-radius: var(--ui-radius-control);
    font-size: 16px;
    box-shadow: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is([data-page-state="empty"], [data-page-state="error"]) {
    min-height: 180px;
    border-radius: var(--ui-radius-card);
  }
}

/* Source section: 14-product-system.css */
/* Source section: 14-premium-polish.css */
/* Final visual pass for the standalone web product.
   The hierarchy is tonal: borders describe data, elevation describes interaction. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-web-workspace-main="1"] {
    color: var(--web-text-primary);
  }

  /* Every ordinary page follows the same readable desktop measure. Games still
     use the full workspace supplied by their dedicated layouts. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-cases-page="1"],
      [data-case-details-page="1"],
      [data-games-page="1"],
      [data-tasks-page="1"],
      [data-referrals-page="1"],
      [data-profile-page="1"],
      [data-inventory-page-content="1"],
      [data-settings-page="1"],
      [data-raffles-page="1"],
      [data-raffle-details-page="1"],
      [data-tournament-page="1"]
    ) {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--web-page-max);
    margin-inline: auto;
  }

  /* Legacy feature forms inherit one field rhythm on web instead of keeping
     their former mobile-specific padding and corner geometry. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-app-main="1"], [data-bottom-sheet-content="1"], [data-action-sheet-body="1"])
    :where(
      input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
          [type="file"]
        ),
      select,
      textarea
    ) {
    box-sizing: border-box;
    min-height: var(--ui-control-height);
    padding-inline: 12px;
    border-radius: var(--ui-control-radius);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-bottom-sheet-panel="1"], [data-modal-content="1"], [data-action-sheet-panel="1"]) {
    color: var(--web-text-primary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-modal-content="1"] {
    border-color: var(--web-border);
    background: var(--web-surface-base);
  }

  /* Case catalog: clearer sections, compact product cards and one purposeful featured slot. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-cases-page="1"] {
    gap: 28px;
  }

  /* Legal footers share layout and typography regardless of page or action semantics. */
  html[data-standalone="1"] [data-legal-footer="1"] {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    margin: 0 auto 24px;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
    text-align: center;
  }

  html[data-standalone="1"] [data-legal-footer="1"] > [data-legal-footer-link] {
    display: inline-flex;
    min-height: 32px;
    max-width: 100%;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ui-text-tertiary);
    font-size: var(--ui-type-caption);
    font-weight: var(--ui-font-weight-regular);
    line-height: 16px;
    letter-spacing: 0;
    white-space: normal;
    text-decoration-line: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-standalone="1"] [data-legal-footer="1"] > [data-legal-footer-link]:is(:hover, :focus-visible) {
    color: var(--ui-text-muted);
    text-decoration-line: underline;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section="1"]
    [data-content-section-heading-copy="1"]::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgb(var(--case-scene-primary-rgb));
    box-shadow: 0 0 16px rgb(var(--case-scene-primary-rgb) / 0.72);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-header="1"] {
    border-bottom: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-content-section-header="1"]
    > :first-child {
    font-size: 15px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.018em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-divider="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-toggle-label="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-toggle="1"] {
    width: 30px;
    margin-right: 0;
    padding: 0;
    justify-content: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cases-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(var(--web-case-card-min, 184px), 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card="1"] {
    position: relative;
    min-height: 238px;
    padding: 14px;
    overflow: hidden;
    border-radius: var(--ui-radius-panel);
    background: var(--ui-gradient-case-card), var(--web-surface-quiet);
    box-shadow: var(--web-highlight), var(--web-card-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card="1"]::after {
    content: "";
    position: absolute;
    z-index: 20;
    top: -34%;
    bottom: -34%;
    left: -42%;
    width: 24%;
    pointer-events: none;
    background: var(--ui-gradient-card-glint);
    opacity: 0;
    transform: skewX(-18deg) translateX(-220%);
    transition:
      opacity var(--ui-motion-normal) var(--ui-motion-ease-standard),
      transform var(--ui-motion-progress) var(--ui-motion-ease-emphasized);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-media="1"] img {
    max-height: 176px;
    filter: drop-shadow(0 18px 24px rgb(0 0 0 / 0.3))
      drop-shadow(0 8px 22px rgb(var(--case-scene-primary-rgb) / 0.12));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-media="1"]::before {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 3%;
    height: 28%;
    pointer-events: none;
    border-radius: 50%;
    background: var(--ui-gradient-case-stage);
    filter: blur(11px);
    transform: scaleX(1.08);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-media="1"]::after {
    content: "";
    position: absolute;
    left: 22%;
    right: 22%;
    bottom: 8%;
    height: 1px;
    pointer-events: none;
    background: var(--ui-gradient-case-stage-edge);
    box-shadow: 0 0 14px rgb(var(--case-scene-primary-rgb) / 0.3);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-title="1"] {
    font-size: max(var(--web-case-title-size, 13.5px), var(--web-item-card-title-size));
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.3;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-price="1"] {
    background: var(--ui-gradient-case-price), var(--web-surface-interactive);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-cases-grid="1"] {
    grid-template-columns: minmax(min(100%, 440px), var(--web-featured-case-max, 620px));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card="1"] {
    min-height: 166px;
    padding: 13px 20px 13px 14px;
    background: var(--ui-gradient-case-featured), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-visual="1"] {
    display: grid;
    grid-template-columns: min(42%, 194px) minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-media="1"] {
    min-height: 140px;
    aspect-ratio: 4 / 3;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-body="1"] {
    margin-top: 0;
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-meta="1"] {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-title="1"] {
    font-size: 16px;
    line-height: 1.25;
  }

  /* Game catalog: editorial media wells and one stable rhythm across all six games. */

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-card-variant="desktop"] {
    isolation: isolate;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-card-variant="desktop"]::before {
    content: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"] {
    position: relative;
    z-index: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"]
    > * {
    width: var(--web-game-art-size, clamp(116px, 10vw, 148px));
    height: var(--web-game-art-size, clamp(116px, 10vw, 148px));
    filter: drop-shadow(0 18px 26px rgb(0 0 0 / 0.3));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-title="1"] {
    font-weight: var(--ui-font-weight-bold);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-description="1"] {
    min-height: 34px;
    margin-top: 2px;
  }

  /* Data-heavy pages reuse the same four surface levels instead of independent card styles. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-profile-dashboard="1"],
      [data-referrals-dashboard="1"],
      [data-tasks-summary="1"],
      [data-tournament-hero="1"],
      [data-tournament-my-standing="1"],
      [data-tournament-table="1"]
    ) {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-metrics="1"] {
    height: auto;
    grid-auto-rows: minmax(70px, auto);
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-metrics="1"] > div {
    height: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-metrics="1"], [data-task-card="1"], [data-raffle-card="1"]) {
    border: 0;
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-tasks-summary-label="1"],
      [data-referrals-summary-label="1"],
      [data-referrals-promo-label="1"],
      [data-tournament-leaderboard-eyebrow="1"]
    ) {
    text-transform: none;
    letter-spacing: 0.025em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-empty="1"] {
    min-height: 64px;
    padding: 22px 16px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card="1"] {
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-history-trigger="1"] {
    padding-inline: 14px;
    color: var(--web-text-secondary);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant^="topup-"]
    [data-bottom-sheet-panel="1"] {
    border-radius: var(--web-dialog-radius);
    background-color: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-header="1"] {
    padding: 12px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-content="1"] {
    padding-inline: var(--web-dialog-pad-x);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-footer="1"] {
    padding: 12px var(--web-dialog-pad-x) var(--web-dialog-pad-x);
  }

  /* Secondary pages use the same compact workspace density as the main routes. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-page="1"] {
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-page="1"] section {
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-section-header="1"] {
    padding: 16px 16px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-section="language"] {
    padding: 0 16px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-section="language"]
    [data-settings-section-header="1"] {
    padding-inline: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-list="1"] {
    padding-inline: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-row="1"] {
    border-color: var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-steam-trade-link-settings] {
    padding: 0;
    overflow: hidden;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-steam-trade-link-settings] > button {
    min-height: 68px;
    border-radius: var(--ui-radius-control);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-primary="1"]
    [data-web-inline-panel="1"] {
    margin-top: 12px;
    padding: 16px;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-primary="1"]
    [data-web-inline-panel="1"]
    > footer
    button {
    max-width: none;
  }

  /* Drawers and short dialogs lose the centered mobile title treatment on web. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-backdrop="1"] {
    background: var(--ui-backdrop);
    backdrop-filter: blur(var(--ui-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--ui-backdrop-blur));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-header="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 16px;
    min-height: var(--web-dialog-header-height);
    padding: 12px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-header="1"]
    > div[aria-hidden="true"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-header="1"]
    > div:not([aria-hidden="true"]) {
    min-width: 0;
    padding: 0;
    text-align: left;
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-header="1"]
    > button {
    grid-column: 2;
    width: 36px;
    height: 36px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-content="1"] {
    padding: 18px var(--web-dialog-pad-x) 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-bottom-sheet-footer="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-action-sheet-panel="1"] {
    overflow: hidden;
    border: 0;
    border-radius: var(--web-dialog-radius);
    background: var(--web-surface-base);
    box-shadow: var(--web-shadow-overlay);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-action-sheet-title="1"] {
    min-height: 54px;
    padding: 16px 64px 12px 18px;
    border-bottom: 1px solid var(--web-border);
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-action-sheet-body="1"] {
    padding: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-content="1"]:has([data-action-sheet-size="compact"]) {
    width: min(420px, calc(100vw - 64px));
    max-width: 420px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-action-sheet-close="1"] {
    top: 9px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: var(--ui-radius-control-sm);
    transform: none;
  }

  /* Short service dialogs should size to their content instead of inheriting a mobile viewport height. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-motion="1"] {
    max-width: calc(100vw - var(--web-dialog-gutter));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-paid-only"]
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-short), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-short);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-paid-only"]
    [data-bottom-sheet-content="1"] {
    padding: 12px 20px 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-paid-only"]
    [data-bottom-sheet-footer="1"] {
    padding: 0 20px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-paid-only"]
    [data-paid-only-actions="1"]
    > button:first-child {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-paid-only"]
    [data-paid-only-actions="1"]
    > button {
    min-height: 44px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-settings"]
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-medium), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-medium);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="case-wallet-policy"],
      [data-bottom-sheet-variant="free-case-task"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-field-max), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-field-max);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="case-wallet-policy"],
      [data-bottom-sheet-variant="free-case-task"]
    )
    [data-bottom-sheet-content="1"] {
    padding-inline: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="instant-pay-info"],
      [data-bottom-sheet-variant="raffle-about"],
      [data-bottom-sheet-variant="tournament-rules"]
    )
    [data-bottom-sheet-footer="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="instant-pay-info"],
      [data-bottom-sheet-variant="daily-giveaway-task"],
      [data-bottom-sheet-variant="raffle-about"],
      [data-bottom-sheet-variant="tournament-rules"]
    )
    [data-bottom-sheet-content="1"] {
    scrollbar-gutter: stable;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-fairness"]
    [data-bottom-sheet-footer="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant$="-fairness"]
    [data-bottom-sheet-content="1"] {
    scrollbar-gutter: stable;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="plinko-result-lose"]
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-short), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-short);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-bottom-sheet-motion="1"] {
    width: min(calc(var(--web-dialog-medium) + 20px), calc(100vw - var(--web-dialog-gutter)));
    max-width: calc(var(--web-dialog-medium) + 20px);
  }

  /* Compact service dialogs use one readable measure. Selectors and item
     browsers retain wider layouts; result and financial flows keep their
     dedicated dimensions above. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="inventory-bulk-sell"],
      [data-bottom-sheet-variant="inventory-withdraw-confirm"],
      [data-bottom-sheet-variant="inventory-withdraw-message"],
      [data-bottom-sheet-variant="inventory-withdraw-suspended"],
      [data-bottom-sheet-variant="inventory-coupon-activation"],
      [data-bottom-sheet-variant="case-wallet-policy"],
      [data-bottom-sheet-variant="instant-pay-info"],
      [data-bottom-sheet-variant$="-paid-only"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-compact), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-compact);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-medium), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-medium);
  }

  /* Final dialog taxonomy: confirmations remain compact, pickers have room for
     their grids and result dialogs use one consistent desktop measure. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="free-case-task"],
      [data-bottom-sheet-variant="plinko-result-lose"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-compact), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-compact);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="inventory-withdraw-options"],
      [data-bottom-sheet-variant="inventory-item"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-wide), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-wide);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="mines-result"],
      [data-bottom-sheet-variant="plinko-result-lose"]
    )
    [data-bottom-sheet-panel="1"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-result-overlay] {
    background: var(--ui-backdrop-strong);
    backdrop-filter: blur(var(--ui-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--ui-backdrop-blur));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-result-layout="1"] {
    width: min(var(--web-dialog-result), calc(100vw - 80px));
    max-width: var(--web-dialog-result);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-layout="1"]
    > .relative.flex {
    padding: 40px 32px;
  }

  /* Non-case game results used to retain the full-height Telegram column even
     after their width was capped. On desktop they are one contained result
     dialog with an internal scroll area; the immersive reveal remains mobile. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"]) {
    display: grid;
    place-items: center;
    padding: 40px;
    clip-path: none;
    -webkit-clip-path: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-stage="1"] {
    position: relative;
    inset: auto;
    width: min(var(--web-dialog-result), calc(100vw - 80px));
    max-height: calc(100dvh - 80px);
    overflow: hidden;
    border: 1px solid var(--ui-dialog-separator);
    border-radius: var(--ui-dialog-radius-desktop);
    background: var(--ui-gradient-card-accent), var(--ui-dialog-surface);
    box-shadow: var(--ui-dialog-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-scroll="1"] {
    height: auto;
    max-height: calc(100dvh - 80px);
    padding: 0;
    overscroll-behavior: contain;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-layout="1"] {
    width: 100%;
    height: auto;
    max-width: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-panel="1"] {
    height: auto;
    min-height: min(520px, calc(100dvh - 80px));
    padding: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-round="1"] {
    position: static;
    margin: 0 auto 14px;
    transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-round="1"]
    > * {
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-game-result-content="1"] {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay]:not([data-game-result-overlay="case"])
    [data-win-overlay-cs-hero="true"] {
    height: 292px;
    margin-top: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-layout="1"]
    :is(button, .ui-button) {
    min-height: 44px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-footer="1"] .ui-button {
    min-height: 44px;
  }

  /* Achievement unlocks are result dialogs too. The phone stack becomes a
     compact product-style composition instead of a tall centred card. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-overlay="1"] {
    background: var(--ui-backdrop-strong);
    backdrop-filter: blur(var(--ui-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--ui-backdrop-blur));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-panel="1"] {
    display: grid;
    width: min(760px, calc(100vw - 80px));
    max-width: 760px;
    grid-template-areas:
      "visual eyebrow"
      "visual title"
      "visual copy"
      "visual stage"
      "visual actions";
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    align-items: center;
    gap: 8px 28px;
    padding: 24px;
    border-radius: var(--ui-dialog-radius-desktop);
    text-align: left;
    box-shadow: var(--ui-dialog-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-visual="1"] {
    grid-area: visual;
    width: 240px;
    height: 240px;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-eyebrow="1"] {
    grid-area: eyebrow;
    align-self: end;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-title="1"] {
    grid-area: title;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-copy="1"] {
    grid-area: copy;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-stage="1"] {
    grid-area: stage;
    justify-self: start;
    margin-top: 2px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-unlock-actions="1"] {
    grid-area: actions;
    align-self: start;
    margin-top: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="inventory-bulk-sell"],
      [data-bottom-sheet-variant="inventory-withdraw-confirm"],
      [data-bottom-sheet-variant="inventory-withdraw-message"],
      [data-bottom-sheet-variant="inventory-withdraw-suspended"],
      [data-bottom-sheet-variant="inventory-coupon-activation"],
      [data-bottom-sheet-variant="case-wallet-policy"],
      [data-bottom-sheet-variant="free-case-task"],
      [data-bottom-sheet-variant="instant-pay-info"],
      [data-bottom-sheet-variant="plinko-result-lose"],
      [data-bottom-sheet-variant$="-paid-only"]
    )
    [data-bottom-sheet-content="1"] {
    flex: 0 1 auto;
    overflow-y: visible;
  }

  /* Confirmation dialogs share a compact content-height layout. Pickers,
     results and transaction forms retain their dedicated wider measures. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-motion="1"] {
    max-width: var(--web-dialog-compact);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-content="1"] {
    flex: 0 1 auto;
    overflow-y: visible;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-footer="1"] {
    margin-top: 12px;
    padding: 0 20px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-footer="1"]
    :is(button, .ui-button) {
    min-height: 44px;
    border-radius: var(--ui-radius-control-sm);
  }
}

@media screen and (hover: hover) {
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-task-card="1"], [data-raffle-card="1"], [data-cs-skin-editorial-card="grid"]) {
    transition:
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card="1"]:hover {
    transform: translateY(-4px);
    background: var(--ui-gradient-case-card-hover), var(--web-surface-muted);
    box-shadow: var(--web-highlight-strong), var(--web-card-shadow-hover);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card="1"]:hover::after {
    opacity: 0.5;
    transform: skewX(-18deg) translateX(640%);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-card="1"]:hover
    [data-case-card-media="1"]
    > div {
    transform: translateY(-3px) scale(1.035);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-task-card="1"], [data-raffle-card="1"]):hover {
    transform: translateY(-1px);
    background-color: var(--web-surface-hover);
  }

  /* Keep the case-prize hit area stationary. Moving the card on its own
     :hover made the bottom 1px repeatedly enter and leave the hover target. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-prizes-page-grid="1"]
    > div:hover
    [data-cs-skin-editorial-card="grid"] {
    transform: translateY(-1px);
    background-color: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-games-page="1"] [data-game-card]:hover {
    transform: translateY(-2px);
    background: var(--ui-gradient-card-sheen-hover), var(--web-surface-hover);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card]:hover {
    transform: translateY(-1px);
    background: var(--web-surface-hover);
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] {
    --ui-backdrop-blur: 4px;
    --ui-overlay-shadow: 0 20px 56px rgb(0 0 0 / 0.38);
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-app-shell="1"] > .app-static-bg {
    background: var(--ui-app-background);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is([data-app-main="1"], [data-bottom-sheet-content="1"], [data-action-sheet-body="1"])
    :where(
      input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
          [type="file"]
        ),
      select,
      textarea
    ) {
    box-sizing: border-box;
    min-height: var(--ui-control-height);
    padding-inline: 12px;
    border-radius: var(--ui-control-radius);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is([data-modal-content="1"], [data-action-sheet-panel="1"]) {
    border-color: var(--ui-border-subtle);
    background: var(--ui-surface-base);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-panel="1"] {
    overflow: hidden;
    border-color: var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface-base);
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-action-sheet-panel="1"] {
    overflow: hidden;
    border-radius: var(--ui-radius-control);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-modal-content="1"]:has([data-action-sheet-size="compact"]) {
    width: min(480px, calc(100vw - 48px));
    max-width: 480px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-action-sheet-title="1"] {
    padding-right: 64px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-action-sheet-close="1"] {
    top: 9px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: var(--ui-radius-control-sm);
    transform: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-header="1"] {
    min-height: 60px;
    padding: 12px 16px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-content="1"] {
    padding-inline: 20px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-footer="1"] {
    padding: 12px 20px 20px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-bottom-sheet-variant="inventory-bulk-sell"],
      [data-bottom-sheet-variant="inventory-withdraw-confirm"],
      [data-bottom-sheet-variant="inventory-withdraw-message"],
      [data-bottom-sheet-variant="inventory-withdraw-suspended"],
      [data-bottom-sheet-variant="inventory-coupon-activation"],
      [data-bottom-sheet-variant="case-wallet-policy"],
      [data-bottom-sheet-variant="free-case-task"],
      [data-bottom-sheet-variant="instant-pay-info"],
      [data-bottom-sheet-variant="plinko-result-lose"],
      [data-bottom-sheet-variant$="-paid-only"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(480px, 100%);
    max-width: 480px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-motion="1"] {
    width: min(480px, 100%);
    max-width: 480px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-bottom-sheet-variant="coupon-selector"],
      [data-bottom-sheet-variant="upgrade-stake-selector"],
      [data-bottom-sheet-variant="upgrade-target-selector"],
      [data-bottom-sheet-variant="inventory-withdraw-options"],
      [data-bottom-sheet-variant="inventory-item"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(620px, 100%);
    max-width: 620px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-game-result-layout="1"] {
    width: min(620px, calc(100vw - 48px));
    max-width: 620px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-game-result-layout="1"]
    :is(button, .ui-button) {
    min-height: 44px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 14px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-cases-grid="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-case-card="1"] {
    min-height: 168px;
    padding: 12px 18px 12px 12px;
    border-radius: var(--ui-radius-card);
    background: var(--ui-gradient-featured-accent), var(--web-surface-soft);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-case-card-visual="1"] {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-case-card-media="1"] {
    min-height: 144px;
    aspect-ratio: 4 / 3;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-case-card-body="1"] {
    margin-top: 0;
    padding-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-case-section-featured="1"]
    [data-case-card-meta="1"] {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-games-desktop-grid="1"]
    [data-game-card] {
    border-radius: var(--ui-radius-control);
    background: var(--ui-surface-base);
  }
}

@media (min-width: 740px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-referrals-dashboard="1"] {
    align-items: start;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is([data-referrals-summary-card="1"], [data-referrals-invite-card="1"])
    > div {
    height: auto;
  }
}

/* Source section: 15-product-finish.css */
/* Product finish: desktop hierarchy, interaction and resilient content.
   This layer deliberately leaves the case reel focus slot and neighbour
   treatment untouched. */
@media screen {
  /* Keep one uninterrupted page canvas behind the utility header. The former
     workspace glow started below the top bar and made the header look dimmed. */

  /* Stable editorial type roles. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-title="1"] {
    font-size: var(--web-type-page);
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-content-section-header="1"],
      [data-web-inline-panel="1"] > header,
      [data-tasks-section-title="1"]
    ) {
    letter-spacing: -0.018em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :where(p, [data-game-card-description="1"], [data-profile-user-id="1"]) {
    line-height: var(--web-leading-copy);
  }

  /* The case opening stage is the flagship workspace. The reel becomes wider
     through layout allocation only; no central-slot or neighbour styling. */
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-details-page="1"] {
    --case-stage-height: clamp(380px, 49vh, 520px);
    --case-action-height: calc(248px * var(--ui-scale));
    grid-template-columns: minmax(0, 1fr) minmax(232px, 252px);
    grid-template-rows: auto auto auto;
    column-gap: 18px;
    row-gap: 20px;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-reel-stage="1"] {
    height: var(--case-stage-height);
  }

  /* The action area behaves like a web inspector: compact, calm and available
     while the user browses the prize catalogue. */
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-cluster="1"] {
    position: sticky;
    z-index: 12;
    top: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-content: center;
    height: var(--case-action-height);
    margin-top: 0;
    padding: 10px;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-card-sheen), var(--web-surface-base);
    box-shadow: var(--web-highlight), var(--web-card-shadow);
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-title="1"] {
    display: -webkit-box;
    flex-shrink: 0;
    overflow: hidden;
    color: var(--ui-text-primary);
    font-size: 15px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.25;
    letter-spacing: var(--ui-tracking-heading);
    text-align: center;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-visual="1"] {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    :is([data-case-desktop-actions="1"], [data-case-quick-settings="1"]) {
    flex-shrink: 0;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-visual="1"] img {
    width: min(86%, 178px);
    filter: drop-shadow(0 13px 18px rgb(0 0 0 / 0.24));
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    [data-case-action-cluster="1"][data-case-has-coupon="0"] [data-case-action-visual="1"] img {
    width: min(100%, 240px);
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-spin-cta="1"] {
    height: 44px;
    border-radius: var(--ui-radius-control);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.015em;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    [data-case-quick-setting][aria-pressed="true"] {
    box-shadow: inset 0 -2px 0 rgb(var(--ui-accent-rgb));
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-web-case-prizes="1"] {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    [data-web-case-prizes="1"]
    [data-web-inline-panel="1"]
    > header {
    min-height: 32px;
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-prizes-page-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 10px;
  }

  /* Editorial prize cards reserve explicit type, media and price zones. Rarity
     remains a contained artwork accent instead of becoming another outline. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-cs-skin-editorial-card="grid"], [data-prize-editorial-frame="grid"]) {
    overflow: hidden;
    border-radius: var(--ui-radius-card);
    background: var(--ui-gradient-media-glow), var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-editorial-title="1"] {
    max-width: 74%;
    text-transform: none;
    font-size: var(--web-item-card-title-size);
    line-height: 1.2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-editorial-title="1"]
    > span:first-child {
    letter-spacing: 0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-editorial-title="1"]
    > span:last-child {
    letter-spacing: -0.005em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-prizes-page-grid="1"] > div {
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 190px 228px;
  }

  /* Case catalogue cards now share the same product-card grammar. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card="1"] {
    contain: layout paint style;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-title="1"] {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 35px;
    text-wrap: balance;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="1"]
    [data-case-card-title="1"] {
    min-height: auto;
  }

  /* Every game uses the same right-panel contract. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-controls="mines"],
      [data-game-controls="plinko"],
      [data-game-controls="pvp"],
      [data-game-control-panel="roulette"],
      [data-game-fixed-bar="rocket"] [data-game-fixed-bar-inner="1"],
      [data-game-fixed-bar="upgrade"] [data-game-fixed-bar-inner="1"]
    ) {
    box-sizing: border-box;
    border-radius: var(--web-game-panel-radius);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-controls="mines"],
      [data-game-controls="plinko"],
      [data-game-controls="pvp"],
      [data-game-control-panel="roulette"]
    )
    :is(button, input, [role="button"]) {
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-primary-action="1"] {
    min-height: var(--web-game-primary-height);
    border-radius: var(--web-game-control-radius);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.012em;
    background: var(--ui-gradient-primary-action);
    box-shadow: var(--ui-shadow-primary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-control-group="quick-stakes"] {
    gap: var(--web-game-control-gap);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-control-group="quick-stakes"]
    > button {
    min-width: 0;
    height: var(--web-game-control-height);
  }

  /* Product states: clear intent, no accidental double submit, and no text
     escapes in translated controls. */
  html[data-desktop-layout="1"][data-standalone="1"] :is(button, a, [role="button"]) {
    -webkit-tap-highlight-color: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] button:disabled,
  html[data-desktop-layout="1"][data-standalone="1"] [aria-disabled="true"] {
    cursor: not-allowed;
    filter: saturate(0.7);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-primary-action="1"],
      [data-case-spin-cta="1"],
      [data-case-quick-setting],
      .ui-button
    ) {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-game-primary-action="1"], [data-case-spin-cta="1"], .ui-button-primary) {
    transition:
      background-color var(--web-action-fast) var(--web-action-ease),
      box-shadow var(--web-action-fast) var(--web-action-ease),
      opacity var(--web-action-fast) var(--web-action-ease);
  }
}

@media screen and (max-width: 1199px) {
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-details-page="1"] {
    grid-template-columns: minmax(0, 1fr) 232px;
    column-gap: 14px;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-prizes-page-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-cluster="1"] {
    padding: 10px;
  }
}

@media screen and (hover: hover) {
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-game-primary-action="1"], [data-case-spin-cta="1"], .ui-button-primary):not(
      :disabled
    ):hover {
    filter: var(--ui-effect-hover-brightness);
    box-shadow: var(--ui-shadow-primary);
  }
}

/* Source section: 16-release-hardening.css */
/* Release hardening: responsive geometry, overflow safety and final UI states.
   This layer intentionally does not target the case reel cards or animation. */

@media screen {
  /* Every route gets the same defensive sizing contract. Long labels and
     translated content may wrap, but never widen the application canvas. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-app-main="1"],
      [data-web-workspace-main="1"],
      [data-content-section="1"],
      [data-games-page="1"],
      [data-inventory-page-content="1"],
      [data-profile-page="1"],
      [data-settings-page="1"],
      [data-tasks-page="1"],
      [data-tournament-page="1"],
      [data-raffle-details-page="1"]
    ) {
    min-width: 0;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-app-main="1"], [data-bottom-sheet-content="1"], [data-action-sheet-body="1"])
    :where(p, h1, h2, h3, label, button, a, [role="button"]) {
    overflow-wrap: anywhere;
  }

  /* Game workspaces use one fluid two-column contract. Only the control
     geometry is normalized; game art, reel/wheel visuals and effects remain
     owned by their features. */
  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus] {
    --web-game-panel-width: var(--release-panel-width);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus]
    :is(
      [data-game-page="mines"],
      [data-game-page="plinko"],
      [data-game-page="pvp"],
      [data-game-page="rocket"],
      [data-game-page="roulette"],
      [data-game-page="upgrade"]
    ) {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-mines-layout="1"],
      [data-game-page="plinko"],
      [data-pvp-layout="1"],
      [data-rocket-content="1"],
      [data-game-page="roulette"],
      [data-game-page="upgrade"]
    )
    > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-mines-desktop-panel="1"],
      [data-plinko-desktop-controls="1"],
      [data-game-control-panel="pvp"],
      [data-game-control-panel="roulette"],
      [data-game-fixed-bar="rocket"] [data-game-fixed-bar-inner="1"],
      [data-game-fixed-bar="upgrade"] [data-game-fixed-bar-inner="1"]
    ) {
    width: 100%;
    min-width: 0;
    max-width: var(--release-panel-width);
    margin-inline: auto 0;
    padding: var(--game-fixed-bar-padding, var(--web-game-footer-inset));
    border-radius: var(--web-game-panel-radius);
    background-color: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-controls="mines"],
      [data-game-controls="plinko"],
      [data-game-controls="pvp"],
      [data-game-control-panel="roulette"]
    )
    :is(button, input, select) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-control-group="quick-stakes"] {
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-control-group="quick-stakes"]
    > button {
    white-space: nowrap;
  }

  /* Inventory cards keep stable media and metadata zones at every desktop
     density. Selection is conveyed without changing the card dimensions. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-grid-columns] {
    align-items: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-card-cell="1"] {
    contain: layout paint style;
    content-visibility: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-card="1"] {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-card="1"][aria-pressed="true"] {
    outline: none;
    box-shadow:
      inset 0 0 0 1px var(--ui-border-strong),
      var(--web-card-shadow-hover);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-cs-skin-card="editorial"] {
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-radius: var(--release-card-radius);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-card="1"] img {
    max-width: 100%;
    object-fit: contain;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-withdrawal-pending="1"] {
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-inventory-selection="1"] {
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr) repeat(3, minmax(118px, auto));
    gap: 10px;
    width: min(100%, 900px);
    margin-inline: auto;
    padding: 10px 12px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-inventory-selection="1"]
    > :nth-child(2) {
    min-width: 0;
    margin-right: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-inventory-selection="1"] .ui-button {
    min-width: 118px;
    min-height: 40px;
  }

  /* Dialogs use predictable content-height layouts. Dense pickers may scroll;
     short confirmations and service messages never inherit a tall mobile sheet. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-motion="1"] {
    max-width: calc(100vw - var(--web-dialog-gutter));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-panel="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="information"]:not([data-desktop-presentation="drawer"])
    [data-bottom-sheet-panel="1"] {
    height: auto;
    max-height: min(78vh, 680px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-content="1"] {
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="picker"]
    [data-bottom-sheet-content="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="transaction"]
    [data-bottom-sheet-content="1"] {
    min-height: 0;
    scrollbar-gutter: stable;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-content="1"]
    :is(input, select, textarea, button, .ui-button) {
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-footer="1"]
    :is(button, .ui-button) {
    min-width: 0;
    white-space: normal;
  }

  /* The final visual layer comes from spacing and material hierarchy, not a
     border around every object. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-card-variant="desktop"],
      [data-case-card="1"],
      [data-inventory-card="1"],
      [data-task-card="1"],
      [data-raffle-card="1"],
      [data-achievement-card]
    ) {
    transform: translateZ(0);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-page-state="empty"], [data-page-state="error"])
    > div {
    max-width: 560px;
    margin-inline: auto;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-loading-overlay="1"] {
    color: var(--web-text-secondary);
  }

  /* Progress pages use a deliberate desktop hierarchy instead of starting
     abruptly with a mobile card. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-levels-page="variant-2"],
      [data-achievements-page="true"],
      [data-raffles-page="1"],
      [data-tournament-page="1"]
    ) {
    min-width: 0;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-levels-page-heading="1"], [data-achievements-page-heading="1"]) {
    display: flex;
    min-height: 38px;
    align-items: center;
    padding-inline: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-levels-page-heading="1"], [data-achievements-page-heading="1"])
    h1 {
    font-size: 22px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-levels-current-rank="true"], [data-levels-rank-path="true"]) {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-daily-cases="true"] {
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-layout="1"] {
    display: flex;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-progress="1"] {
    display: grid;
    min-width: 0;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-progress="1"]
    > div:first-child {
    display: contents;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-primary="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-score="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-levels="1"] {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    white-space: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-score="1"] {
    grid-column: 3;
    padding-left: 0;
    border-left: 0;
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-metrics="1"] {
    margin-top: 0;
    padding-left: 0;
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-metrics="1"] > div {
    display: flex;
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    justify-content: flex-start;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-metrics="1"]
    > div
    + div {
    border-left: 1px solid var(--ui-border-subtle);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card-head="1"] {
    grid-area: head;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-image="1"] {
    grid-area: image;
    margin-top: 0;
    align-self: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-copy="1"] {
    grid-area: copy;
    margin-top: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card-footer="1"] {
    grid-area: footer;
    padding-top: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"][data-raffles-count="1"] {
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"][data-raffles-count="1"]
    [data-raffle-card="1"] {
    min-height: 220px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"][data-raffles-count="1"]
    [data-raffle-card-visual="1"] {
    min-height: 182px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-history-action="1"] {
    margin-inline: auto;
    justify-content: flex-end;
    padding-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-history-trigger="1"] {
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-overview="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-overview="1"] > * {
    min-width: 0;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-tournament-hero="1"], [data-tournament-my-standing="1"]) {
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  /* Product pages share one readable canvas instead of inheriting unrelated
     mobile widths from their cards. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-levels-page="variant-2"],
      [data-achievements-page="true"],
      [data-raffles-page="1"],
      [data-tournament-page="1"]
    ) {
    width: min(100%, 1180px);
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-final="true"] {
    margin-top: 0;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card="completed"] {
    background: var(--ui-gradient-positive-wash), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-list="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"][data-raffles-count="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-history-action="1"] {
    width: 100%;
    max-width: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"] {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-visual="1"] {
    padding: 0 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-prize-stack="1"][data-raffle-prize-count="1"] {
    --raffle-card-prize-factor: 1.68;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-prize-stack="1"][data-raffle-prize-count="2"] {
    --raffle-card-prize-factor: 1.32;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-content="1"] {
    padding: 34px 0 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-stat="1"] {
    min-height: 66px;
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card]:hover {
      transform: translateY(-1px);
      background-color: var(--web-surface-raised);
    }

    html[data-desktop-layout="1"][data-standalone="1"]
      [data-tournament-leaderboard-row="1"]:not([data-tournament-current-user="1"]):hover {
      background-color: var(--web-surface-raised);
    }
  }
}

/* Compact desktop: shrink the control rail first, preserving the main game
   field instead of clipping content at the right edge. */
@media screen and (max-width: 1199px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --release-panel-width: 278px;
    --web-game-panel-padding: 12px;
    --web-workspace-gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-mines-layout="1"],
      [data-game-page="plinko"],
      [data-rocket-content="1"],
      [data-game-page="roulette"],
      [data-game-page="upgrade"]
    ) {
    column-gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-control-group="quick-stakes"] {
    gap: 5px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-control-group="quick-stakes"]
    > button {
    padding-inline: 3px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-inventory-selection="1"] {
    grid-template-columns: auto minmax(80px, 1fr) repeat(3, minmax(104px, auto));
  }
}

/* Wide desktop: stop stretching utility panels and spend the extra room on
   the primary workspace and catalogue density. */
@media (min-width: 1600px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --release-panel-width: 320px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-cases-page="1"],
      [data-games-page="1"],
      [data-inventory-page-content="1"],
      [data-profile-page="1"],
      [data-settings-page="1"],
      [data-tasks-page="1"],
      [data-tournament-page="1"]
    ) {
    width: min(100%, 1360px);
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-overview="1"] {
    grid-template-columns: minmax(0, 1.22fr) minmax(420px, 0.78fr);
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] {
    display: flex;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] > * {
    width: 100%;
  }
}

/* Tablet is a deliberate intermediate layout: roomy dialogs, three-column
   catalogues where possible and no desktop-only sticky surfaces. */
@media (min-width: 768px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-app-main="1"] {
    overflow-x: clip;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-inventory-page-content="1"],
      [data-games-page="1"],
      [data-settings-page="1"],
      [data-tasks-page="1"],
      [data-tournament-page="1"]
    ) {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is([data-inventory-grid="1"], [data-inventory-grid-row="1"]) {
    gap: 10px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-inventory-card-cell="1"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-inventory-card="1"] {
    min-width: 0;
    max-width: 100%;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-motion="1"] {
    width: min(680px, calc(100vw - 48px));
    max-width: min(680px, calc(100vw - 48px));
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-dialog-kind="confirmation"]
    [data-bottom-sheet-motion="1"] {
    width: min(480px, calc(100vw - 48px));
    max-width: min(480px, calc(100vw - 48px));
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-bottom-sheet-footer="1"]
    :is(button, .ui-button) {
    min-width: 0;
    white-space: normal;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    :is(
      [data-levels-page="variant-2"],
      [data-achievements-page="true"],
      [data-raffles-page="1"],
      [data-tournament-page="1"]
    ) {
    min-width: 0;
    max-width: 100%;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-achievements-grid="true"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-levels-overview-grid="true"] {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-daily-cases-grid="true"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-daily-cases-grid="true"] > * {
    grid-column: auto;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-levels-reward-list="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-levels-reward-list="1"] > * {
    min-width: 0;
    height: 100%;
    margin-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-achievements-summary-layout="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
    align-items: stretch;
    gap: 16px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-achievements-summary-metrics="1"] {
    margin-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-achievements-filters="1"] {
    width: min(100%, 440px);
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"] {
    display: grid;
    grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
    align-items: stretch;
    gap: 16px;
    min-height: 170px;
    padding: 16px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-layout="1"] {
    display: contents;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-visual="1"] {
    display: flex;
    min-height: 138px;
    align-items: center;
    justify-content: center;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-content="1"] {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 36px;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-status="1"] {
    top: 16px;
    right: 16px;
    transform: none;
  }

  html[data-standalone="1"][data-desktop-layout="0"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-stats="1"] {
    margin-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero="1"] {
    padding: 18px;
    border-radius: var(--ui-radius-control);
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-layout="1"] {
    display: grid;
    grid-template-areas:
      "copy countdown"
      "copy aside";
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    align-items: center;
    gap: 14px 20px;
    text-align: left;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-copy="1"] {
    grid-area: copy;
    min-width: 0;
    padding-inline: 8px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-countdown="1"] {
    grid-area: countdown;
    justify-self: end;
    margin: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-eyebrow="1"] {
    margin-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-title="1"],
  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-body="1"] {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-title="1"] {
    font-size: 34px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-hero-aside="1"] {
    grid-area: aside;
    min-width: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rule-grid="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rule-card="1"] {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    padding: 9px 11px;
    border-radius: var(--ui-radius-card);
    text-align: left;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rule-icon="1"] {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    margin: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rule-value="1"] {
    margin-top: 0;
    font-size: 16px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rule-label="1"] {
    margin-top: 0;
    line-height: 16px;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-tournament-rules-link="1"] {
    margin-top: 10px;
  }
}

/* Case and shared game wins become a proper desktop dialog. The prize remains
   the visual focus, while the decision controls live in a stable side rail. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-game-result-layout="1"] {
    width: min(860px, calc(100vw - 96px));
    max-width: 860px;
    overflow: hidden;
    border-radius: var(--ui-radius-card);
    background: var(--ui-gradient-card-accent), var(--web-surface-base);
    box-shadow: var(--web-shadow-overlay);
    text-align: left;
    transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-panel="1"] {
    display: grid;
    grid-template-areas:
      ". visual"
      "header visual"
      "meta visual"
      "actions visual"
      ". visual";
    grid-template-columns: minmax(292px, 0.88fr) minmax(360px, 1.12fr);
    grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
    align-content: stretch;
    gap: 14px 24px;
    min-width: 0;
    min-height: 392px;
    padding: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-header="1"] {
    grid-area: header;
    min-width: 0;
    padding: 4px 2px 0;
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-header="1"]
    > :first-child {
    font-size: 28px;
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-header="1"]
    > :last-child:not(:first-child) {
    max-width: none;
    margin-inline: 0;
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-visual="1"] {
    grid-area: visual;
    display: flex;
    min-width: 0;
    min-height: 344px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-hero="true"] {
    height: 344px;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-media="true"] {
    top: 54px;
    width: 390px;
    height: 214px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-title="true"] {
    left: 24px;
    top: 14px;
    max-width: calc(100% - 112px);
    font-size: 15px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-exterior="true"] {
    top: 14px;
    right: 24px;
    font-size: 15px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-price="true"] {
    bottom: 12px;
    font-size: 20px;
    min-width: 144px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-cs-price="true"]
    svg {
    width: 24px;
    height: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-visual="1"]
    > .mt-8 {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-meta="1"] {
    grid-area: meta;
    display: flex;
    min-width: 0;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-inline: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-meta="1"]
    > * {
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-actions="1"] {
    grid-area: actions;
    min-width: 0;
    padding-top: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-actions="1"]
    > :first-child {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="case"]
    [data-win-overlay-actions="1"]
    .ui-button {
    min-height: 48px;
  }
}

/* Cross-feature dialog contract. This final layer applies to every existing
   sheet, modal and action dialog without changing any feature workflow. */
html[data-standalone="1"]
  :is(
    [data-bottom-sheet-header="1"] button,
    [data-action-sheet-close="1"],
    [data-web-inline-panel="1"] > header button
  ) {
  flex: 0 0 auto;
}

html[data-standalone="1"] [data-bottom-sheet-title="1"] {
  line-height: var(--ui-leading-heading);
  overflow-wrap: anywhere;
}

html[data-standalone="1"]
  :is([data-bottom-sheet-overlay="1"], [data-modal-overlay="1"])
  :is(button, a, input, select, textarea, [role="button"]):focus-visible {
  outline-offset: var(--ui-focus-ring-offset);
}

html[data-standalone="1"] [data-action-sheet-panel="1"][data-action-sheet-tone="solid"] {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-standalone="1"] [data-action-sheet-surface="1"] {
  color: var(--ui-text-primary);
  background: var(--ui-surface-base);
  box-shadow: var(--web-shadow-overlay, 0 24px 80px rgb(0 0 0 / 0.42));
}

@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-header="1"] {
    align-items: center;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-title="1"] {
    max-width: min(100%, 680px);
    font-size: var(--web-type-section);
    letter-spacing: var(--ui-tracking-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-content="1"] {
    scrollbar-width: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-content="1"]::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-content="1"]:has([data-action-sheet-size="standard"]) {
    width: min(var(--web-dialog-default), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-default);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-content="1"]:has([data-action-sheet-size="wide"]) {
    width: min(720px, calc(100vw - var(--web-dialog-gutter)));
    max-width: 720px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-bottom-sheet-header="1"] button, [data-action-sheet-close="1"]):not(:disabled):hover {
    color: var(--web-text-primary);
    background: var(--web-surface-hover);
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"][data-desktop-layout="0"] [data-modal-content="1"] {
    width: min(620px, calc(100vw - 48px));
    max-width: 620px;
    padding-inline: 0;
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-title="1"] {
    font-size: var(--ui-type-subheading);
  }

  html[data-standalone="1"][data-desktop-layout="0"] [data-bottom-sheet-content="1"] {
    scrollbar-gutter: stable;
  }
}

@media (min-width: 600px) and (max-height: 700px) {
  html[data-standalone="1"] [data-bottom-sheet-positioner="1"] {
    padding: 14px;
  }

  html[data-standalone="1"] [data-bottom-sheet-motion="1"] > div,
  html[data-standalone="1"] [data-bottom-sheet-panel="1"] {
    max-height: calc(100dvh - 28px);
  }

  html[data-standalone="1"] [data-bottom-sheet-header="1"] {
    min-height: 52px;
    padding-block: 8px;
  }

  html[data-standalone="1"] [data-bottom-sheet-content="1"] {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  html[data-standalone="1"] [data-bottom-sheet-footer="1"] {
    padding-top: 10px;
    padding-bottom: 12px;
  }
}

/* Source section: 17-professional-composition.css */
/* Professional composition pass.
   This layer increases editorial hierarchy without adding product entities or
   changing the case reel artwork, behaviour, or effects. */

@media screen {
  /* These routes use the richer editorial heading in the page body. Keeping a
     second one-word heading in the utility bar made the layout feel duplicated. */
  html[data-desktop-layout="1"][data-standalone="1"]:is(
      [data-app-route^="/bonuses/tasks"],
      [data-app-route^="/bonuses/raffles"]
    )
    [data-topbar-title="1"],
  html[data-desktop-layout="1"][data-standalone="1"][data-app-route^="/inventory"]:not(
      :has([data-referrals-header-placement="topbar"])
    )
    [data-topbar-title="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]:is(
      [data-app-route^="/bonuses/tasks"],
      [data-app-route^="/bonuses/raffles"]
    )
    [data-topbar-title-icon="1"],
  html[data-desktop-layout="1"][data-standalone="1"][data-app-route^="/inventory"]:not(
      :has([data-referrals-header-placement="topbar"])
    )
    [data-topbar-title-icon="1"] {
    display: none;
  }

  /* Rewards: a readable dashboard rather than a compressed mobile checklist. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-page="1"] {
    width: min(100%, 1180px);
    margin-inline: auto;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"] {
    padding: 22px 24px;
    border: 0;
    border-radius: var(--ui-radius-panel);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-tasks-summary-value="1"]
    > span:first-child {
    font-size: 38px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"] .h-1\.5 {
    height: 7px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-section] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-section-title="1"] {
    font-size: 17px;
    font-weight: var(--ui-font-weight-bold);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-task-card="1"] {
    min-height: 142px;
    padding: 16px;
    border: 0;
    transition:
      transform var(--ui-motion-normal) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-task-card="1"] .text-sm {
    font-size: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-task-card="1"] .text-xs {
    font-size: 12px;
  }

  /* Referral information now uses the available desktop width and a clear
     first-view hierarchy. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-page="1"] {
    width: min(100%, 1180px);
    margin-inline: auto;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-dashboard="1"] {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 12px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-summary-card="1"], [data-referrals-invite-card="1"]) {
    min-height: 270px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-summary-card="1"], [data-referrals-invite-card="1"])
    > div {
    height: 100%;
    padding: 18px;
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-invite-card="1"] {
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-summary-value="1"]
    > span:first-child {
    font-size: 40px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-promo-code="1"] {
    font-size: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-metrics="1"] {
    margin-top: 0;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-metrics="1"]
    > [data-referrals-metric] {
    box-sizing: border-box;
    height: 72px;
    min-height: 72px;
    padding: var(--referrals-metric-frame, 0px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-tabs="1"] {
    width: min(100%, 390px);
    min-height: 44px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-levels-card="1"] > div {
    padding: 22px;
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-level-grid="1"] {
    margin-top: 20px;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-level-grid="1"] button {
    min-height: 76px;
    padding: 15px;
  }

  /* Profile identity, account status and inventory read as one account page. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-page="1"] {
    width: min(100%, 1180px);
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-card="compact"]
    > div:first-child
    > div:first-child {
    width: 92px;
    height: 92px;
    border-radius: var(--ui-radius-card);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-display-name="1"] {
    font-size: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-status-column="1"] {
    gap: 12px;
    padding-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    > :is([data-profile-level-card], [data-steam-trade-link-card]) {
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: var(--web-surface-base);
  }

  /* Inventory cards trade a little density for legibility and perceived value. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-page-content="1"] {
    width: min(100%, 1180px);
    margin-inline: auto;
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-browse-controls="1"] {
    min-height: 58px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-grid-columns] {
    --inventory-grid-gap: 14px;

    gap: var(--inventory-grid-gap);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-grid-row="1"] {
    padding-bottom: var(--inventory-grid-gap);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-card-cell="1"] {
    contain-intrinsic-size: 196px 196px;
  }

  /* Raffles use a prize-led composition while keeping the existing detail flow. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-page="1"] {
    display: grid;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"] {
    border-radius: var(--ui-radius-panel);
    background: var(--ui-gradient-card-accent), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-visual="1"] {
    min-height: 156px;
    align-self: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-stat="1"] > :last-child {
    margin-top: 6px;
    font-size: 18px;
  }

  /* Ranks: current state, path and rewards are now visually distinct instead
     of being equally small panels. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-page="variant-2"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-page="variant-2"] > * {
    min-width: 0;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-levels-current-rank="true"], [data-levels-rank-path="true"]) {
    padding: 20px;
    border-radius: var(--ui-radius-panel);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-levels-current-rank="true"]
    [role="progressbar"] {
    height: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-tabs="true"] {
    margin-top: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-daily-cases="true"] {
    border-radius: var(--ui-radius-panel);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-levels-daily-cases="true"]
    [data-level-daily-case] {
    height: 184px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-levels-daily-cases="true"]
    [data-level-daily-case-visual="true"] {
    height: 126px;
  }

  /* Achievements become a proper catalogue with larger artwork and readable
     descriptions while retaining the existing details dialog. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-page="true"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-page="true"] > * {
    min-width: 0;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-count="1"] {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-bar="1"] {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-score="1"]
    > :last-child,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-levels="1"]
    > :last-child {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-filters="1"] button {
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-image="1"] {
    width: 128px;
    height: 124px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-copy="1"] > :first-child {
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-copy="1"] > :last-child {
    font-size: 13px;
    line-height: 1.45;
  }

  /* Catalogue cards get a shared media well and restrained motion instead of
     decorative outlines or extra glow. */

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"] {
    margin: 2px 0 8px;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-title="1"] {
    font-size: var(--web-game-title-size, 17px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-description="1"] {
    font-size: var(--web-game-description-size, 13px);
    line-height: 1.45;
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"]
      :is(
        [data-task-card="1"],
        [data-raffle-card="1"],
        [data-achievement-card],
        [data-game-card-variant="desktop"],
        [data-inventory-card="1"]
      ):hover {
      transform: translateY(-2px);
      background-color: var(--web-surface-hover);
    }

    html[data-desktop-layout="1"][data-standalone="1"]
      [data-game-card-variant="desktop"]:hover
      [data-game-card-arrow="1"] {
      color: rgb(var(--ui-accent-rgb) / 0.86);
      transform: translateX(3px);
    }
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"] [data-web-page-header="1"] {
    padding: 2px 2px 8px;
  }

  html[data-standalone="1"] [data-web-page-header-title="1"] {
    margin-top: 4px;
    font-size: clamp(23px, 3.4vw, 26px);
  }

  html[data-standalone="1"] [data-web-page-header-description="1"] {
    max-width: 620px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
  }

  html[data-standalone="1"] [data-tasks-section] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html[data-standalone="1"] [data-tasks-section-title="1"] {
    grid-column: 1 / -1;
  }

  html[data-standalone="1"] [data-referrals-dashboard="1"],
  html[data-standalone="1"] [data-profile-dashboard="1"] {
    gap: 12px;
  }

  html[data-standalone="1"] [data-achievements-grid="true"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  html[data-standalone="1"] [data-web-page-header="1"] {
    padding-bottom: 8px;
  }

  html[data-standalone="1"] [data-web-page-header-eyebrow="1"] {
    font-size: 10px;
  }

  html[data-standalone="1"] [data-web-page-header-title="1"] {
    font-size: 22px;
  }

  html[data-standalone="1"] [data-web-page-header-description="1"] {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
  }
}

/* Source section: 18-complete-product-pass.css */
/* Complete product pass.
   Final cross-route contracts for controls, service dialogs, states and
   responsive geometry. This file deliberately does not style the case reel,
   roulette wheel, game artwork or animation effects. */

html[data-standalone="1"] [data-ui-button="1"] {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

html[data-standalone="1"] [data-ui-button="1"] > :is(span, strong) {
  min-width: 0;
}

html[data-standalone="1"]
  :is([data-ui-button="1"]:disabled, button:disabled, [role="button"][aria-disabled="true"]) {
  cursor: not-allowed;
  filter: saturate(0.56);
  opacity: 0.5;
  transform: none;
}

html[data-standalone="1"] :is(input, select, textarea):disabled {
  cursor: not-allowed;
  color: var(--web-text-tertiary);
  opacity: 0.62;
}

html[data-standalone="1"] :is(input, textarea)::placeholder {
  color: var(--web-text-tertiary);
  opacity: 1;
}

@media screen {
  /* Desktop notifications are compact status messages rather than scaled-up
     mobile pills. The type is communicated by the icon and a restrained edge
     accent, while copy always reads from the left. */
  html[data-desktop-layout="1"][data-standalone="1"] .gg-toast {
    position: relative;
    overflow: hidden;
    border-color: var(--web-border);
    background: var(--web-surface-overlay);
    box-shadow: var(--web-shadow-overlay), var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] .gg-toast::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--web-text-tertiary);
    content: "";
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    .gg-toast:has([data-web-toast-icon="success"])::before {
    background: rgb(64 201 125 / 0.8);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    .gg-toast:has([data-web-toast-icon="error"])::before {
    background: rgb(238 181 74 / 0.84);
  }

  html[data-desktop-layout="1"][data-standalone="1"] .gg-toast > :first-child {
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] .gg-toast [role="status"],
  html[data-desktop-layout="1"][data-standalone="1"] .gg-toast [role="alert"] {
    min-width: 0;
    justify-content: flex-start;
    margin: 0;
    color: var(--web-text-primary);
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-toast-icon] {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: var(--ui-radius-badge);
    color: var(--web-text-secondary);
    background: var(--web-surface-interactive);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-toast-icon] > svg {
    width: 15px;
    height: 15px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-toast-icon="success"] {
    color: rgb(103 226 155 / 0.94);
    background: rgb(64 201 125 / 0.1);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-toast-icon="error"] {
    color: rgb(255 203 109 / 0.96);
    background: rgb(238 181 74 / 0.1);
  }

  /* 1. Tournament and raffles: compact editorial grouping and stable data
     rows. No extra routes or product entities are introduced. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-grid="1"] {
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-card="1"] {
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-content: start;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-table-head="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-leaderboard-row="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-player="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-prize="1"] {
    overflow: hidden;
  }

  /* 2. Ranks and achievements: completion state is visible without adding
     decorative outlines, and long localized copy cannot deform cards. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card="completed"] {
    box-shadow: var(--ui-positive-edge);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-copy="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievement-copy="1"]
    :is(h2, h3, p, div) {
    overflow-wrap: anywhere;
  }

  /* 3. Settings and service pages: predictable row density, field geometry
     and selected states across languages and account tools. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-row="1"] > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-toggle-row="1"]
    :is(p, span, label) {
    overflow-wrap: anywhere;
  }

  /* Language, audio and community stay below the banner. Its auto margin
     consumes spare viewport height without stretching navigation intervals. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-preferences-footer="1"] {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 38px;
    margin-top: 6px;
    flex: 0 0 auto;
    padding: 2px 5px 0;
    align-items: center;
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-switch="1"] {
    display: inline-flex;
    width: 72px;
    min-height: 38px;
    padding: 0 10px;
    gap: 8px;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: transparent;
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-control="1"] {
    position: static;
    display: flex;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-switch="1"]:hover {
    color: var(--web-text-primary);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-switch="1"]:active {
    transform: translateY(1px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-icon="1"] {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-code="1"] {
    font-size: 11px;
    font-weight: var(--ui-font-weight-bold);
    line-height: 1;
    letter-spacing: 0.08em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-control="1"] {
    position: static;
    display: flex;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-switch="1"] {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: transparent;
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-switch="1"]:hover,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-desktop-sound-switch="1"][aria-expanded="true"] {
    color: var(--web-text-primary);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-switch="1"]:active {
    transform: translateY(1px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-icon="1"] {
    display: inline-flex;
    width: 19px;
    height: 19px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-community-link="1"] {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: transparent;
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-community-link="1"]:hover {
    color: var(--web-text-primary);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-community-link="1"]:active {
    transform: translateY(1px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-community-icon="1"] {
    display: inline-flex;
    width: 19px;
    height: 19px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-desktop-sound-switch="1"][data-desktop-sound-state="off"] {
    color: var(--ui-text-disabled);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-desktop-language-popover="1"], [data-desktop-sound-popover="1"]) {
    position: absolute;
    z-index: 90;
    left: calc(100% + 10px);
    bottom: 0;
    width: 100%;
    overflow: hidden;
    padding: 6px;
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-panel);
    color: var(--web-text-primary);
    background: rgb(24 29 37 / 0.98);
    box-shadow: var(--web-floating-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-desktop-language-popover-title="1"], [data-desktop-sound-popover-title="1"]) {
    padding: 7px 10px 8px;
    font-size: 11px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--web-text-tertiary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-option] {
    display: grid;
    width: 100%;
    min-height: 42px;
    padding: 7px 9px;
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    text-align: left;
    color: var(--web-text-secondary);
    background: transparent;
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-option]:hover,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-desktop-language-option][data-selected="true"] {
    color: var(--web-text-primary);
    background: var(--web-surface-soft);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-option-code="1"] {
    font-size: 10px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: 0.07em;
    color: var(--web-text-tertiary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-option] strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-option-check="1"] {
    font-size: 13px;
    font-weight: var(--ui-font-weight-bold);
    text-align: center;
    color: rgb(var(--ui-accent-rgb) / 0.92);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-row] {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 9px 8px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    text-align: left;
    color: var(--web-text-primary);
    background: transparent;
    transition: background-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-row]:hover {
    background: var(--web-surface-soft);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-row] strong {
    font-size: 12px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.25;
  }

  /* The shared switch is deliberately generous in settings screens. Inside
     the compact rail popover it should read as a quiet status control while
     the whole row remains the click target. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-row] .tg-ui-switch {
    width: calc(40px * var(--ui-scale));
    height: calc(24px * var(--ui-scale));
    border-radius: calc(24px * var(--ui-scale));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-sound-row] .tg-ui-switch__thumb {
    top: calc(3px * var(--ui-scale));
    left: calc(3px * var(--ui-scale));
    width: calc(18px * var(--ui-scale));
    height: calc(18px * var(--ui-scale));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-desktop-sound-row]
    .tg-ui-switch--checked
    .tg-ui-switch__thumb {
    transform: translateX(calc(16px * var(--ui-scale)));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-panel="1"] {
    overflow: hidden;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-header="1"] > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-footer="1"] {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-footer="1"]
    > [data-ui-button="1"] {
    flex: 1 1 160px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-content="1"]
    :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    color: var(--web-text-primary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-content="1"] textarea {
    min-height: 96px;
    resize: vertical;
  }

  /* 5. Game control rails: controls align and localized values stay inside
     buttons. Game stages, wheels, reels and effects are deliberately untouched. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-mines-desktop-panel="1"],
      [data-plinko-desktop-controls="1"],
      [data-game-control-panel="pvp"],
      [data-game-control-panel="roulette"]
    )
    :is(button, input, select) {
    line-height: 1.2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-plinko-quick-stakes="1"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-plinko-quick-stakes="1"] > button {
    min-width: 0;
    padding-inline: 5px;
    gap: 3px;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-primary-action="1"] {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    overflow: hidden;
  }

  /* Screenshot-led correction pass: reconcile late composition rules instead
     of allowing a mobile minimum height to exceed its desktop grid track. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-games-desktop-grid="1"] {
    grid-auto-rows: minmax(300px, auto);
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-card-variant="desktop"] {
    height: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-list="1"] {
    display: grid;
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"] {
    height: 100%;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card-stats="1"] {
    gap: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-stat="1"] {
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-stat="1"]
    + [data-raffle-stat="1"] {
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-dashboard="1"] {
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-summary-card="1"], [data-referrals-invite-card="1"]) {
    height: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-summary-layout="1"] {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-summary-layout="1"] > * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-claim-action="1"] {
    margin-top: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-edit-action="1"] {
    color: var(--web-text-secondary);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-inline-promo-editor="1"] {
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-inline-promo-editor="1"]
    input {
    width: 100%;
    height: 42px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-inline-promo-actions="1"] {
    min-height: 42px;
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-metrics="1"]
    > [data-referrals-metric="accent"] {
    --referrals-metric-frame: 0px;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-metric-content="1"] {
    box-sizing: border-box;
    height: 100%;
    padding: 10px 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-inline-promo-editor="1"]
    [data-ui-button="1"] {
    min-height: 42px;
    height: 42px;
    border-radius: var(--ui-radius-control-sm);
    padding-inline: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-inline-promo-editor="1"]
    [data-referrals-promo-cancel="1"] {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
  }

  /* Inventory item preview: the old phone-sized artwork sat inside a desktop
     dialog and left most of the surface empty. Keep the same actions and data,
     but give the item a deliberate product-preview composition. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-motion="1"] {
    width: min(980px, calc(100vw - var(--web-dialog-gutter)));
    max-width: 980px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-panel="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.78fr);
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(82dvh, 640px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-panel="1"]
    > :first-child {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-header="1"] {
    min-height: 76px;
    padding: 14px 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-header="1"]
    > button {
    width: 38px;
    height: 38px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-cs-modal-title="editorial"] {
    padding-block: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-cs-modal-title="editorial"]
    > :nth-child(2) {
    margin-top: 5px;
    font-size: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-cs-modal-title="editorial"]
    > :nth-child(3) {
    margin-top: 7px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-content="1"] {
    grid-column: 1;
    grid-row: 2;
    min-height: 386px;
    padding: 0 0 20px 20px;
    overflow: hidden;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-preview="1"] {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 366px;
    place-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    :is([data-inventory-cs-modal-media="editorial"], [data-inventory-gift-modal-media="1"]) {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 292px;
    place-items: center;
    border-radius: var(--ui-radius-control-sm);
    background: var(--ui-gradient-media-glow), var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-cs-modal-art="1"] {
    width: min(350px, 76%);
    max-width: 76%;
    aspect-ratio: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-gift-modal-art="1"] {
    width: min(280px, 66%);
    max-width: 66%;
    aspect-ratio: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-footer="1"] {
    display: flex;
    align-items: center;
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    margin-top: 0;
    padding: 20px;
    border-top: 0;
    border-left: 1px solid var(--web-border);
    background: var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-actions="1"] {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    align-content: center;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-action="sell"] {
    grid-column: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-modal-showcase="1"] {
    width: 100%;
    min-height: 366px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-showcase-copy="1"] {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    padding: 0 30px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    :is([data-cs-item-showcase-eyebrow="1"], [data-cs-item-showcase-title="1"]) {
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-showcase-title="1"] {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    font-size: clamp(27px, 2vw, 34px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-showcase-meta="1"] {
    position: static;
    grid-column: 1;
    grid-row: 1;
    max-width: calc(100% - 40px);
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 8px;
    margin: 20px 20px 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-showcase-chip] {
    max-width: 100%;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-cs-item-showcase-visual="1"] {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    padding: 12px 30px 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-actions="1"]
    [data-ui-button="1"] {
    height: auto;
    min-height: 42px;
    border-radius: var(--ui-radius-control-sm);
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.2;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-price="1"] {
    font-size: 17px;
  }

  /* 6. Loading, empty and error states preserve the surrounding page rhythm;
     controls stay usable and messages retain a readable measure. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-page-state="loading"], [data-page-state="empty"], [data-page-state="error"]) {
    width: 100%;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-page-state="empty"], [data-page-state="error"])
    :is(p, div) {
    overflow-wrap: anywhere;
  }

  /* Empty raffles are a compact page state, not an oversized pseudo-card.
     The existing history action stays close to the explanation it belongs to. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-empty="1"] {
    min-height: 132px;
    padding: 22px 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-empty-copy="1"] {
    width: min(100%, 520px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-empty="1"]
    [data-raffles-history-trigger="1"] {
    min-height: 34px;
    padding-inline: 12px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-raised);
  }

  /* Editorial surface hierarchy. Major page regions carry the visual weight;
     nested data no longer reads as another stack of unrelated dark cards. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-levels-page="variant-2"],
      [data-achievements-page="true"],
      [data-raffles-page="1"],
      [data-tournament-page="1"],
      [data-profile-page="1"],
      [data-tasks-page="1"]
    )
    [data-web-page-header="1"] {
    margin-bottom: 2px;
  }

  /* Tasks expose their state through one quiet edge cue. This keeps the cards
     scannable without introducing status panels or decorative frames. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-task-card="1"] {
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-task-card="1"][data-task-state="available"]::before,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-task-card="1"][data-task-state="completed"]::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 2px;
    border-radius: 0 var(--ui-radius-indicator) var(--ui-radius-indicator) 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-task-card="1"][data-task-state="available"]::before {
    background: rgb(var(--ui-accent-rgb) / 0.72);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-task-card="1"][data-task-state="completed"]::before {
    background: rgb(56 216 121 / 0.62);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-task-card="1"] button {
    border-radius: var(--ui-radius-control);
    background-color: var(--web-surface-raised);
  }

  /* Ranks: current progress is the primary surface. The daily cases section
     becomes part of the page canvas instead of a card containing more cards. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-current-rank="true"] {
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
    box-shadow: inset 3px 0 0 rgb(var(--ui-accent-rgb) / 0.72);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-path="true"] {
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-daily-cases="true"] {
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-levels-daily-cases="true"]
    > :first-child {
    min-height: 32px;
    margin-bottom: 8px;
    padding-inline: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-cases-grid="true"] {
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-cases-grid="true"] > div {
    min-height: 184px;
    overflow: hidden;
    border-radius: var(--ui-radius-card);
    background: var(--ui-gradient-card-sheen), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-level-daily-case-shell="1"][data-level-daily-case-state="available"] {
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-level-daily-case-shell="1"][data-level-daily-case-state="locked"] {
    background: var(--web-surface-quiet);
  }

  /* Raffle cards use one continuous plane. Statistics are columns in the
     composition, not a second dark card inserted inside it. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"] {
    min-height: 188px;
    padding: 18px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-content="1"] {
    align-self: stretch;
    padding-top: 30px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card-stats="1"] {
    margin-top: 12px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-stat="1"] {
    min-height: 58px;
    padding: 10px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-stat="1"]:first-child {
    padding-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-stat="1"]:last-child {
    padding-right: 0;
  }

  /* Tournament and profile reserve the branded accent for the user's own
     state. Supporting information stays neutral and therefore easier to scan. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] {
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
    box-shadow: inset 3px 0 0 rgb(var(--ui-accent-rgb) / 0.72);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-type-switch="1"] {
    width: min(100%, 320px);
    padding: 3px;
    border-radius: var(--ui-radius-card);
    background: var(--web-surface-sunken);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-type-switch="1"] > button {
    height: 38px;
    border-radius: var(--ui-radius-control);
    font-size: 13px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero="1"] {
    padding: 18px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-title="1"] {
    font-size: clamp(22px, 1.8vw, 27px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-title="1"] span {
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] {
    padding: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-table-head="1"] {
    min-height: 42px;
    background: var(--web-surface-sunken);
  }

  /* Catalogue cards use one uninterrupted surface. Artwork remains the focal
     point without looking like a second card nested inside the game card. */

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-copy="1"] {
    padding-top: 4px;
  }

  /* Raffle list rows expose their identity before the figures. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card-title="1"] {
    max-width: calc(100% - 12px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-content="1"] {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
  }

  /* Upgrade pickers are dense catalogues. Their controls remain one toolbar;
     expanded filters are a structured work area rather than another modal. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="upgrade-stake-selector"],
      [data-bottom-sheet-variant="upgrade-target-selector"]
    )
    [data-bottom-sheet-content="1"] {
    padding: 8px 20px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-upgrade-target-browser="1"]
    [data-inventory-browse-controls="1"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-upgrade-target-browser="1"]
    [data-web-inline-panel="1"] {
    margin: 0 0 14px;
    padding: 14px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-upgrade-target-browser="1"]
    [data-web-inline-panel="1"]
    > header {
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-upgrade-target-browser="1"]
    [data-inventory-filter-sheet-layout="1"] {
    grid-template-columns: minmax(168px, 0.78fr) minmax(220px, 1fr) minmax(300px, 1.34fr);
    gap: 16px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-picker-grid="1"] {
    gap: 10px;
  }

  /* Trade-link binding is one compact form on desktop: help, URL, paste and
     confirmation share the same horizontal workflow. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-topup-trade-link-layout="1"] {
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topup-trade-link-help="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-topup-trade-link-help="1"]
    [data-ui-button="1"] {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topup-trade-link-input="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(136px, auto);
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-topup-trade-link-input="1"]
    :is(input, button) {
    min-height: 44px;
    height: 44px;
    border-radius: var(--ui-radius-control-sm);
  }

  /* The profile keeps the Steam editor visible as a first-class account
     setting. The compact two-row composition preserves useful input width
     without repeating a trigger card or showing a modal-style close action. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    > [data-web-inline-panel="1"] {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--ui-radius-panel);
    scroll-margin-top: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] #profile-steam-trade-link-editor {
    margin-top: 0;
    padding: 16px 18px;
    border-color: var(--web-border);
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    > [data-web-inline-panel="1"]
    > header {
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] #profile-steam-trade-link-editor > header {
    margin-bottom: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] #profile-steam-trade-link-editor > header h2 {
    font-size: 16px;
    line-height: 1.25;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-help="1"] {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-help="1"]
    [data-ui-button="1"] {
    min-height: 32px;
    margin-top: 0;
    padding: 4px 0;
    justify-self: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-input="1"] {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-input="1"]
    > input {
    grid-column: 1 / -1;
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-input="1"]
    > [data-ui-button="1"]:not([data-topup-trade-link-submit="1"]) {
    grid-column: 2;
    min-width: 112px;
    justify-self: end;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    [data-topup-trade-link-submit="1"] {
    grid-column: 3;
    min-width: 136px;
  }

  /* Opening the inline Steam editor must not make the compact identity card
     inherit the editor's height. The collapsed dashboard keeps its balanced
     two-column composition; only the expanded state sizes each column to its
     own content. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-dashboard="1"]:has(
      [data-profile-status-column="1"] > [data-web-inline-panel="1"]
    ) {
    align-items: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-dashboard="1"]:has([data-profile-status-column="1"] > [data-web-inline-panel="1"])
    [data-profile-card="compact"] {
    height: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]:has(> [data-web-inline-panel="1"])
    > [data-profile-level-card] {
    flex: 0 0 auto;
  }
}

@media (min-width: 1200px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-overview="1"] {
    grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] {
    display: flex;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing="1"] > * {
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing-layout="1"] {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing-rank="1"] {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing-score="1"] {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-next-place="1"] {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    padding-left: 0;
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-prize="1"] {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-prize-copy="1"] {
    text-align: left;
  }
}

/* 7. Tablet: consume available horizontal room before clipping or falling
   back to the narrow phone composition. */
@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"]
    :is([data-app-main="1"], [data-web-workspace-main="1"], [data-bottom-sheet-content="1"])
    > * {
    min-width: 0;
    max-width: 100%;
  }

  html[data-standalone="1"] [data-bottom-sheet-positioner="1"] {
    padding-inline: 24px;
  }

  html[data-standalone="1"] [data-raffles-empty="1"] {
    min-height: 150px;
  }

  html[data-standalone="1"] [data-bottom-sheet-motion="1"] {
    width: min(680px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
  }

  html[data-standalone="1"] [data-bottom-sheet-footer="1"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  html[data-standalone="1"] [data-bottom-sheet-footer="1"] > [data-ui-button="1"] {
    flex: 1 1 180px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-motion="1"] {
    width: min(680px, calc(100vw - 48px));
    max-width: 680px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-panel="1"] {
    height: auto;
    max-height: min(82dvh, 560px);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-handle="1"] {
    display: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-header="1"] {
    min-height: 76px;
    padding: 14px 18px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-content="1"] {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 18px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    :is([data-inventory-cs-modal-media="editorial"], [data-inventory-gift-modal-media="1"]) {
    width: 100%;
    min-height: 236px;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-media-glow), var(--web-surface-sunken);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-cs-modal-art="1"] {
    width: min(330px, 66%);
    max-width: 66%;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-footer="1"] {
    margin-top: 0;
    padding: 12px 18px 16px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-actions="1"] {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-action="sell"] {
    grid-column: 1 / -1;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-actions="1"]
    [data-ui-button="1"] {
    height: auto;
    min-height: 44px;
    margin-top: 0;
    border-radius: var(--ui-radius-control-sm);
    padding-inline: 10px;
    font-size: 14px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    [data-inventory-item-price="1"] {
    font-size: 17px;
  }

  html[data-standalone="1"] [data-plinko-quick-stakes="1"] > button,
  html[data-standalone="1"] [data-game-control-group="quick-stakes"] > button {
    min-width: 0;
    padding-inline: 5px;
    white-space: nowrap;
  }

  html[data-standalone="1"]
    :is(
      [data-achievements-grid="true"],
      [data-levels-reward-list="1"],
      [data-raffle-details-metrics="1"]
    )
    > * {
    min-width: 0;
  }
}

/* Large desktop is its own composition tier. A 2K monitor should reveal more
   of the product, not a 1280px page floating inside a phone-sized shell. The
   shell and data-heavy pages grow; forms and dialogs intentionally keep their
   readable measures from the desktop rules above. */
@media (min-width: 1800px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --desktop-shell-max: clamp(1640px, calc(100vw - 160px), 2240px);
    --desktop-rail-width: 232px;
    --desktop-logo-width: 174px;
    --desktop-gutter: clamp(30px, 1.8vw, 40px);
    --desktop-content-offset: calc(var(--desktop-rail-width) + 2 * var(--desktop-gutter));
    --web-page-max: 1680px;
    --web-workspace-gap: 28px;
    --web-game-panel-width: 344px;
    --release-panel-width: 344px;
    --web-case-card-min: 208px;
    --web-item-card-size: 216px;
    --web-featured-case-max: 700px;
    --web-achievement-columns: 3;
    --web-game-art-size: 164px;
    --web-game-title-size: 18px;
    --web-game-description-size: 14px;
    --web-case-title-size: 14px;
    --inventory-card-title-size: 12px;
    --inventory-card-exterior-size: 13px;
    --inventory-card-price-size: 16px;
    --web-type-display: 32px;
    --web-type-page: 24px;
    --web-type-section: 16px;
    --web-type-body: 14px;
    --web-type-caption: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-cases-page="1"],
      [data-case-details-page="1"],
      [data-games-page="1"],
      [data-inventory-page-content="1"],
      [data-profile-page="1"],
      [data-levels-page],
      [data-achievements-page="true"],
      [data-tasks-page="1"],
      [data-tournament-page="1"]
    ) {
    width: 100%;
    max-width: var(--web-page-max);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-page="1"], [data-raffles-page="1"]) {
    width: 100%;
    max-width: min(var(--web-page-max), 1480px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-games-desktop-grid="1"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media screen and (min-width: 2300px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --ui-width-scale: 1.08;
    --desktop-shell-max: clamp(2120px, calc(100vw - 240px), 2560px);
    --desktop-rail-width: 248px;
    --desktop-logo-width: 184px;
    --desktop-gutter: 40px;
    --desktop-content-offset: calc(var(--desktop-rail-width) + 2 * var(--desktop-gutter));
    --web-page-max: 2000px;
    --web-game-panel-width: 380px;
    --release-panel-width: 380px;
    --web-case-card-min: 210px;
    --web-item-card-size: 232px;
    --web-featured-case-max: 760px;
    --web-achievement-columns: 4;
    --web-game-art-size: 176px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-page="1"], [data-raffles-page="1"]) {
    max-width: min(var(--web-page-max), 1840px);
  }
}

@media (max-width: 599px) {
  html[data-standalone="1"] [data-ui-button="1"] {
    overflow-wrap: anywhere;
  }

  /* A narrow browser window still uses desktop navigation, but catalogue and
     dashboard content must collapse instead of keeping desktop column counts. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-games-desktop-grid="1"],
      [data-achievements-grid="true"],
      [data-tasks-section],
      [data-referrals-level-grid="1"]
    ) {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-games-desktop-grid="1"] {
    grid-auto-rows: minmax(284px, auto);
  }

  html[data-standalone="1"] [data-bottom-sheet-footer="1"] > [data-ui-button="1"] {
    min-height: 44px;
  }

  html[data-standalone="1"] [data-plinko-quick-stakes="1"] > button,
  html[data-standalone="1"] [data-game-control-group="quick-stakes"] > button {
    min-width: 0;
    font-size: 12px;
  }
}

/* Unified premium composition. This is the final shared contract for the
   existing product entities; feature-specific game canvases and reels remain
   intentionally outside of it. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-app-main="1"] {
    scrollbar-gutter: auto;
    scrollbar-width: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-app-main="1"]:not(.px-0) {
    --desktop-scrollbar-edge-reach: calc(
      var(--desktop-gutter) + max(0px, calc((100vw - var(--desktop-shell-max)) / 2))
    );
    --desktop-main-edge-padding: var(--desktop-scrollbar-edge-reach);
    box-sizing: border-box;
    width: calc(100% + var(--desktop-scrollbar-edge-reach));
    max-width: none;
    margin-right: calc(-1 * var(--desktop-scrollbar-edge-reach));
  }

  /* Case details predate the shared data-game-page wrapper. Anchor their
     inspector to the same viewport edge as every other desktop game rail. */
  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-details-page="1"] {
    width: min(calc(100% - var(--desktop-focus-viewport-edge)), var(--web-page-max));
    max-width: var(--web-page-max);
    margin-left: auto;
    margin-right: var(--desktop-focus-viewport-edge);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-app-main="1"]::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-heading="1"] {
    display: flex;
    min-height: 38px;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 0 2px 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-heading="1"] h2 {
    margin: 0;
    color: var(--web-text-primary);
    font-size: 16px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.018em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-heading="1"] p {
    margin: 4px 0 0;
    color: var(--web-text-secondary);
    font-size: 12px;
  }

  /* Controls: one calm neutral family, with orange reserved for the primary
     action and current state. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-ui-button="1"], [data-ui-select-trigger="1"]) {
    border-radius: var(--ui-radius-control-sm);
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-button="1"] {
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.012em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-button-variant="secondary"] {
    border-color: transparent;
    background: var(--web-surface-raised);
    box-shadow: var(--web-highlight);
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"]
      :is([data-ui-button="1"], [data-ui-select-trigger="1"]):not(:disabled):hover {
      transform: translateY(-1px);
    }
  }

  /* Game catalogue: one continuous editorial plane, consistent artwork
     scale, and enough response on hover to feel native to the web. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-games-desktop-grid="1"] {
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-card-variant="desktop"] {
    overflow: hidden;
    min-height: 284px;
    padding: 16px 18px 17px;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-media-glow), var(--web-surface-base);
    box-shadow: var(--web-highlight);
    transition:
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"] {
    flex-basis: 150px;
    min-height: 136px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-artwork="1"]
    img {
    filter: var(--ui-shadow-media);
    transition:
      transform var(--ui-motion-normal) var(--ui-motion-ease-standard),
      filter var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-card-variant="desktop"]
    [data-game-card-description="1"] {
    color: var(--web-text-secondary);
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-game-card-variant="desktop"]:hover {
      background: var(--ui-gradient-media-accent), var(--web-surface-raised);
      box-shadow: var(--web-highlight-strong), var(--web-card-shadow-hover);
      transform: translateY(-2px);
    }

    html[data-desktop-layout="1"][data-standalone="1"]
      [data-game-card-variant="desktop"]:hover
      [data-game-card-artwork="1"]
      img {
      filter: var(--ui-shadow-media-hover);
      transform: translateY(-2px) scale(1.015);
    }
  }

  /* Case catalogue: cards share an image stage and metadata rhythm. The
     reserved banner/fallback area is deliberately untouched. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-cases-grid="1"] {
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-visual="1"] {
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-case-section-featured="0"]
    [data-case-card="1"] {
    background: var(--ui-gradient-case-card), var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-media="1"] {
    min-height: 176px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-case-card-body="1"] {
    min-height: 62px;
    padding: 2px 15px 15px;
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"]
      [data-case-section-featured="0"]
      [data-case-card="1"]:hover {
      background: var(--ui-gradient-case-card-hover), var(--web-surface-muted);
      box-shadow: var(--web-highlight-strong), var(--web-card-shadow-hover);
    }
  }

  /* Inventory: denser web grid, consistent media stage and a quieter text
     layer. Selection remains a state rather than a decorative outline. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-grid="1"] {
    gap: 11px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-card-cell="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-editorial-card="grid"] {
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-card-sheen), var(--web-surface-base);
    box-shadow: var(--web-highlight);
    transition:
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  /* Tournament: a desktop data surface rather than stacked mobile cards. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-overview="1"] {
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero="1"] {
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-layout="1"] {
    grid-template-areas:
      "copy countdown"
      "aside aside";
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.62fr);
    align-items: start;
    gap: 20px 34px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-copy="1"] {
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown="1"] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-self: start;
    justify-self: end;
    width: min(100%, 460px);
    min-height: 78px;
    padding: 10px 8px;
    border-radius: var(--ui-radius-card);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown-part="1"] {
    position: relative;
    display: block;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-tournament-countdown-part="1"]
    + [data-tournament-countdown-part="1"]::before {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 1px;
    background: var(--web-border);
    content: "";
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown-separator="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown-content="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown-value="1"] {
    font-size: 27px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown-label="1"] {
    margin-top: 7px;
    color: var(--web-text-tertiary);
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-intro-toggle="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-body="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-aside="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-grid="1"] {
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-card="1"] {
    min-height: 62px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-icon="1"] {
    width: 30px;
    height: 30px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-value="1"] {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rule-label="1"] {
    color: var(--web-text-tertiary);
    font-size: 11px;
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rules-link="1"] {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 0;
    color: var(--web-text-secondary);
    font-size: 12px;
    text-decoration: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-table="1"] {
    overflow: hidden;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-table-head="1"] {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-leaderboard-row="1"] {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-tournament-leaderboard-row="1"]
    + [data-tournament-leaderboard-row="1"] {
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-rank="1"] {
    background: var(--web-surface-raised);
    color: var(--web-text-primary);
    box-shadow: inset 0 0 0 1px var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-tournament-top-three="1"]
    [data-tournament-row-rank="1"] {
    background: rgb(var(--ui-accent-rgb) / 0.1);
    color: rgb(255 184 77);
    box-shadow: inset 0 0 0 1px rgb(var(--ui-accent-rgb) / 0.16);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-tournament-leaderboard-row="1"][data-tournament-current-user="1"] {
    background: var(--ui-gradient-accent-wash);
    box-shadow: inset 3px 0 0 rgb(var(--ui-accent-rgb) / 0.78);
  }

  /* Engagement and progress pages: one summary surface, quiet supporting
     cards and aligned statistics. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-tasks-summary="1"],
      [data-achievements-summary="1"],
      [data-levels-current-rank="true"],
      [data-levels-rank-path="true"],
      [data-raffle-card="1"]
    ) {
    border-radius: var(--ui-radius-control);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-metrics="1"] {
    gap: 0;
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-metrics="1"] > * {
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-metrics="1"]
    > *
    + * {
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary-claimable="false"] {
    filter: saturate(0.42);
    opacity: 0.72;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-grid="true"] {
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievement-card] {
    display: grid;
    grid-template-areas:
      "image head"
      "image copy"
      "footer footer";
    grid-template-columns: 128px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 14px;
    min-height: 196px;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
    transition:
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-daily-cases="true"] {
    margin-top: 16px;
  }

  /* Settings: use the available web canvas and present both groups as
     deliberate equal-height panels instead of isolated mobile blocks. */

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-primary="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-preferences="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-section="language"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-preferences="1"] {
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-section-header="1"] {
    min-height: 64px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-page="1"]
    [data-topup-trade-link-help="1"] {
    display: block;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-page="1"]
    [data-topup-trade-link-help="1"]
    [data-ui-button="1"] {
    width: auto;
    margin-top: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-page="1"]
    [data-topup-trade-link-input="1"] {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-page="1"]
    [data-topup-trade-link-submit="1"] {
    grid-column: 1 / -1;
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-language-options="1"] {
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-list="1"] {
    border-color: var(--web-border);
  }

  /* Upgrade keeps its existing wheel and result logic. Only the surrounding
     workspace, empty slots and controls are promoted to web surfaces. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-web-frame="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-scale-measure="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-upgrade-add-stake="1"], [data-upgrade-target-empty="1"]) {
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  /* Dialog taxonomy. Product and selector dialogs receive room for content;
     confirmations remain compact and transactional forms stay focused. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-dialog-kind="product"]
    [data-bottom-sheet-motion="1"] {
    width: min(860px, calc(100vw - var(--web-dialog-gutter)));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-panel="1"] {
    border: 1px solid var(--web-border);
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-shadow-overlay), var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-header="1"] {
    min-height: 58px;
    border-bottom-color: var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-sheet-footer="1"] {
    gap: 8px;
    border-top-color: var(--web-border);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-select-menu="1"] {
    border: 1px solid var(--web-border);
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-overlay);
    box-shadow: var(--web-shadow-overlay), var(--web-highlight);
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  html[data-standalone="1"] [data-web-surface] {
    border-radius: var(--ui-radius-control);
  }

  html[data-standalone="1"] [data-web-empty-state="1"] {
    min-height: 144px;
    padding: 24px;
  }
}

/* Source section: 19-product-completion.css */
/* Product completion pass.
   Closes the remaining wide-screen, account, progression and raffle gaps.
   The case reel, roulette visuals/effects and reserved banner slot are not
   styled here. */

html[data-standalone="1"] [data-raffle-prize-quality="1"] {
  box-sizing: border-box;
  white-space: nowrap;
}

html[data-standalone="1"] [data-raffle-prize-quality-label="1"] {
  display: none;
}

html[data-standalone="1"] [data-raffle-prize-quality-code="1"] {
  display: inline;
  letter-spacing: 0.05em;
}

@media screen {
  /* Upgrade selectors read as one deliberate control stack: compact item
     slots first, followed by a quiet value shortcut instead of four badges. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-upgrade-section="stake"], [data-upgrade-section="target"]) {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-wide-card="1"] {
    height: auto;
    border: 0;
    border-radius: var(--ui-radius-card);
    background: var(--web-surface-muted);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-upgrade-wide-card="1"]:is(:hover, :focus-within) {
    background: var(--web-surface-interactive);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-gift-media="1"] {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-gift-title="1"] {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-gift-price="1"] {
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-card-action] {
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-section-heading="1"] {
    font-size: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-upgrade-add-stake="1"], [data-upgrade-change-target="1"]) {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: transparent;
    color: var(--web-text-tertiary);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-upgrade-add-stake="1"], [data-upgrade-change-target="1"]):hover {
    background: var(--web-surface-interactive);
    color: var(--web-text-secondary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-target-empty="1"] {
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-empty-slot] {
    min-height: 68px;
    border: 0;
    border-radius: var(--ui-radius-card);
    background: var(--web-surface-muted);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"] button:hover [data-upgrade-empty-slot] {
    background: var(--web-surface-interactive);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-empty-icon="1"] {
    width: 40px;
    height: 40px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-empty-copy="1"] {
    line-height: 1.25;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-section="multiplier-rail"] {
    margin-top: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-multiplier-label="1"] {
    margin-bottom: 5px;
    padding-inline: 2px;
    color: var(--web-text-tertiary);
  }

  /* Upgrade presentation layer. The wheel is the visual stage; stake, target
     and CTA read as one deliberate workflow instead of unrelated cards. */
  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-page="upgrade"] {
    --upgrade-utility-rail-height: 42px;
    --upgrade-stage-height: 430px;
    --upgrade-workflow-column-gap: 28px;
    isolation: isolate;
    align-content: start;
    row-gap: 0;
    column-gap: var(--upgrade-workflow-column-gap);
    grid-template-areas:
      "chance stake"
      "chance target"
      "chance controls"
      "chance actions"
      "chance .";
    grid-template-rows: repeat(4, max-content) minmax(0, 1fr);
    min-height: var(--web-upgrade-chance-height, var(--upgrade-stage-height));
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-page="upgrade"]::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 52px;
    bottom: 0;
    left: -3%;
    width: calc(
      100% - var(--web-game-panel-width, 360px) - var(--desktop-game-right-padding, 0px) + 3%
    );
    pointer-events: none;
    background: var(--ui-gradient-upgrade-backdrop);
    -webkit-mask-image: var(--ui-gradient-upgrade-backdrop-mask);
    mask-image: var(--ui-gradient-upgrade-backdrop-mask);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-page="upgrade"]::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    right: var(--desktop-game-right-padding, 0px);
    bottom: 0;
    grid-area: stake-start / stake-start / actions-end / stake-end;
    width: var(--web-game-panel-width, 360px);
    height: auto;
    pointer-events: none;
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: var(--web-surface-quiet);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-utility-actions="1"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    align-items: stretch;
    margin: 0;
    padding: 0 var(--web-game-footer-inset) var(--web-game-footer-inset);
    border: 0;
  }

  /* Every game uses equal help actions, including actions inside a sound or
     connection wrapper. Labels wrap consistently instead of disappearing. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-game-utility-group="1"], [data-game-utility-popover-anchor="1"]) {
    display: contents;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-utility-action="1"] {
    display: inline-flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 0;
    height: auto;
    min-height: 44px;
    gap: 3px;
    padding: 4px;
    border: 0;
    border-radius: 0;
    color: var(--web-text-tertiary);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-utility-action="1"] > :first-child {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-utility-action="1"]:not(:disabled):hover {
    color: var(--web-text-primary);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-utility-action-label="1"] {
    display: block;
    min-width: 0;
    font-size: 12px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Volume is part of the footer flow, never an overlay over the stake CTA. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-utility-popover="1"] {
    position: static;
    display: flex;
    align-items: center;
    order: 2;
    flex: 0 0 100%;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-utility-popover="1"] > div:first-child {
    order: 2;
    flex: 0 0 auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-utility-popover="1"] > div:first-child > div:first-child {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-utility-popover="1"] > div:last-child {
    flex: 1;
    min-width: 0;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-mines-desktop-stack="1"], [data-plinko-desktop-stack="1"],
      [data-game-fixed-bar="pvp"] [data-game-fixed-bar-inner="1"],
      [data-game-fixed-bar="roulette"] [data-game-fixed-bar-inner="1"]) {
    border-radius: var(--ui-radius-panel);
    background: var(--web-selection-game-panel-background);
    box-shadow: var(--web-selection-game-panel-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-game-control-panel="pvp"], [data-game-control-panel="roulette"]) {
    padding: var(--web-game-footer-inset);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-roulette-controls]
    [data-game-utility-action="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-roulette-bottom-actions] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="chance"] {
    position: relative;
    width: 100%;
    height: var(--web-upgrade-chance-height, var(--upgrade-stage-height));
    align-self: stretch;
    align-items: center;
    min-height: var(--web-upgrade-chance-height, var(--upgrade-stage-height));
    grid-area: chance;
    overflow: hidden;
    border: 0;
    background: var(--ui-gradient-upgrade-stage);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-wheel-shell="1"] {
    width: min(392px, 90%);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-chance-track="1"] {
    stroke: rgb(255 255 255 / 0.115);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-chance-arc="1"] {
    stroke-linecap: butt;
    filter: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-wheel-center="1"] {
    background: var(--ui-gradient-wheel-center), rgb(18 22 28 / 0.96);
    box-shadow: var(--ui-shadow-game-well);
  }

  /* The stage and its help share a real containing box. Legacy mobile scale
     frames remain display:contents on desktop and cannot own size queries. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-game-workspace="upgrade"] {
    container-name: upgrade-workspace;
    container-type: inline-size;
    width: calc(100% - var(--desktop-game-right-padding, 0px));
    max-width: var(--web-game-workspace-max, 100%);
    margin-inline: auto;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-workspace="upgrade"] > [data-game-page="upgrade"] {
    --desktop-game-right-padding: 0px;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  @container upgrade-workspace (max-width: 760px) {
    html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"] [data-game-page="upgrade"] {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "chance" "stake" "target" "controls" "actions";
      grid-template-rows: repeat(5, max-content);
      min-height: 0;
    }

    html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"] [data-upgrade-section="chance"] {
      height: auto;
      min-height: 0;
      padding-block: 24px;
    }

    html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"] [data-game-page="upgrade"]::after {
      display: none;
    }

    html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-wheel-shell="1"] {
      width: min(392px, 90%);
    }
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="stake"] {
    padding: 16px 16px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="target"] {
    padding: 8px 16px 12px;
    border: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section-heading="1"] {
    min-height: 27px;
    margin-bottom: 8px;
    padding-inline: 0;
    color: var(--web-text-secondary);
    font-size: 12px;
    letter-spacing: 0.045em;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section-heading="1"]::before {
    display: inline-grid;
    width: 24px;
    height: auto;
    margin-right: 6px;
    place-items: center;
    border-radius: 0;
    color: var(--ui-accent);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="stake"]
    [data-upgrade-section-heading="1"]::before {
    content: "01";
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="target"]
    [data-upgrade-section-heading="1"]::before {
    content: "02";
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section-heading="1"]
    > h2 {
    margin-right: auto;
    font-size: var(--web-type-body);
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    button:hover
    [data-upgrade-empty-slot] {
    border-bottom-color: var(--ui-accent);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-empty-slot] {
    min-height: 68px;
    gap: 10px;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-empty-icon="1"] {
    width: 28px;
    height: 32px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-empty-copy="1"] > span:first-child {
    font-size: var(--web-type-body);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-empty-copy="1"] > span:last-child {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: var(--ui-type-small);
    line-height: 1.3;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-top-actions="1"] [data-game-utility-action="1"] {
    flex-direction: row;
    width: auto;
    min-height: 38px;
    gap: 8px;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--web-text-secondary);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-top-actions="1"] [data-game-utility-action="1"]:not(:disabled):hover {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    color: var(--web-text-primary);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-fixed-bar="upgrade"]
    [data-game-fixed-bar-inner="1"] {
    --game-fixed-bar-padding: 0 16px 16px;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-fixed-bar="upgrade"]
    [data-game-primary-action="1"] {
    border: 0;
    border-radius: var(--ui-radius-control);
    background: rgb(var(--ui-accent-rgb));
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-fixed-bar="upgrade"]
    [data-game-primary-action="1"]:disabled {
    --button-foreground: var(--web-text-secondary);
    border: 0;
    color: var(--web-text-secondary);
    background: var(--web-surface-muted);
    box-shadow: none;
    filter: none;
    opacity: 1;
  }

  /* The case inspector has one primary action and a compact segmented options
     rail. Secondary modes should not read as three competing CTA buttons. */
  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-action-cluster="1"] {
    gap: 6px;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-spin-cta="1"] {
    box-shadow: var(--ui-shadow-primary);
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-settings="1"] {
    gap: 6px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting] {
    min-height: 30px;
    padding: 5px 7px;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-muted);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    [data-case-quick-setting]:is(:hover, :focus-visible) {
    color: var(--web-text-primary);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"]
    [data-case-quick-setting][aria-pressed="true"] {
    color: rgb(var(--ui-accent-rgb));
    background: transparent;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting="coupon"] {
    min-height: 29px;
    margin-top: 1px;
    padding-inline: 8px 6px;
    justify-content: space-between;
    border-radius: var(--ui-radius-badge);
    color: var(--web-text-secondary);
    background: var(--web-surface-quiet);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting-icon="1"] {
    flex: 0 0 auto;
    color: currentColor;
  }

  html[data-desktop-layout="1"][data-desktop-focus="case"] [data-case-quick-setting-arrow="1"] {
    flex: 0 0 auto;
    color: var(--web-text-tertiary);
    font-size: 17px;
    font-weight: 400;
    line-height: 0.75;
  }

  /* Referral terms are reference material: give the desktop hierarchy enough
     room to compare mechanics, rates and settlement rules without a tall
     mobile-card stack. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"] {
    --web-dialog-wide: 820px;
    --web-dialog-wide-large: 820px;
    --web-information-dialog-width: 820px;
  }

  /* Referral conversion is a small financial workflow, not a stretched pair
     of mobile actions. Keep context, amount and result in one calm dialog. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-convert-dialog="1"] {
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-convert-dialog="1"]
    :is(input, [data-ui-button="1"]) {
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-convert-dialog="1"]
    [data-ui-button="1"] {
    min-height: 46px;
  }

  /* Account: a compact desktop dashboard rather than two enlarged mobile
     cards. Identity and rank share one visual rhythm, while Steam binding is
     presented as a distinct service workflow underneath. */

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-status-column="1"] {
    display: flex;
    min-height: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    > [data-profile-level-card] {
    height: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-trade-row="1"] {
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    > [data-web-inline-panel="1"] {
    width: 100%;
    margin: 0;
    border: 1px solid var(--web-border-hairline);
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    > [data-web-inline-panel="1"]
    > header {
    margin-bottom: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-title="1"] {
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-icon="1"] {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    background: var(--web-surface-interactive);
    color: var(--web-text-secondary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-icon="1"] svg {
    width: 20px;
    height: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"] {
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-help="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-help="1"]
    [data-ui-button="1"] {
    margin: 0;
    padding: 2px 0;
    justify-self: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-input="1"] {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-input="1"]
    button {
    padding-inline: 12px;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"]
    > :last-child {
    margin-top: 0;
    color: var(--web-text-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-user-id="1"] {
    min-height: 40px;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-deadline="1"] {
    letter-spacing: 0.02em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-projected-chance="1"] {
    min-height: 36px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-cs-exterior-code="1"] {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: var(--web-surface-muted);
    font-size: 10px;
    letter-spacing: 0.07em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-cs-exterior-label="1"] {
    color: var(--web-text-secondary);
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
  }

  /* Ranks: reinforce hierarchy and turn the lower reward stream into a web
     catalogue. The added insights explain what happens next at a glance. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-overview-grid="true"] {
    grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-levels-current-rank="true"], [data-levels-rank-path="true"]) {
    min-height: 260px;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-about-button="true"] {
    width: 24px;
    height: 24px;
    margin: -2px 0 -2px 2px;
    font-size: 11px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-current-insights="1"] {
    gap: 0;
    overflow: hidden;
    border-top: 1px solid var(--web-border);
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-current-insights="1"] > * {
    min-height: 50px;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-current-insights="1"] > * + * {
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-path="true"] {
    display: grid;
    grid-template-rows: auto minmax(92px, 1fr) auto;
    justify-content: initial;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-steps="1"] {
    align-self: center;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-rank-path-check="locked"] {
    opacity: 0.5;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-reward-list="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-reward-list="1"] > * {
    min-width: 0;
    min-height: 118px;
    height: 100%;
    margin: 0;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-section-heading] {
    min-height: 34px;
    margin-bottom: 8px;
    padding-inline: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-level-reward-row][data-level-reward-status="AVAILABLE"] {
    background: var(--ui-gradient-accent-wash), var(--web-surface-base);
    box-shadow: inset 2px 0 0 rgb(var(--ui-accent-rgb) / 0.7);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-level-reward-row][data-level-reward-status="LOCKED"] {
    opacity: 0.58;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-level-reward-status-pill="1"] {
    padding: 5px 9px;
    font-size: 11px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-level-reward-items="1"] {
    gap: 0;
    margin-top: 12px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-level-reward-item] {
    min-height: 52px;
    padding: 10px 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-level-reward-item]
    + [data-level-reward-item] {
    padding-left: 12px;
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-level-reward-action="1"] {
    width: auto;
    min-width: 0;
    min-height: 40px;
    margin-top: 0;
    margin-left: 12px;
    padding-inline: 12px;
    border-radius: var(--ui-radius-control-sm);
  }

  /* Tournament rows reserve readable space for prize names and expose the
     rules affordance as a real desktop action. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-prize-title="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-prize-copy="1"] {
    display: block;
    max-width: 220px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-rules-link="1"] {
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  /* Achievement status filters stay compact above the catalogue. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tools="1"] {
    display: block;
    width: min(100%, 820px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-grid="true"] {
    grid-template-columns: repeat(var(--web-achievement-columns, 3), minmax(0, 1fr));
  }

  /* Compact desktop controls must remain real click targets even when their
     visual treatment is quiet. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-raffles-history-trigger="1"], [data-raffle-details-about="1"]) {
    min-height: 44px;
    padding-inline: 14px;
  }

  /* Achievement progress is a status rail, not another oversized card. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary="1"] {
    container-type: inline-size;
    container-name: achievement-summary;
    width: min(100%, 980px);
    min-height: 0;
    padding: 4px 2px 14px;
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-layout="1"] {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-progress="1"] {
    flex: 1 1 520px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-metrics="1"] {
    flex: 0 1 auto;
    max-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-achievements-summary-primary="1"],
      [data-achievements-summary-score="1"],
      [data-achievements-summary-levels="1"]
    ) {
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-achievements-summary-primary="1"], [data-achievements-summary-score="1"], [data-achievements-summary-levels="1"])
    > * {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-primary="1"]
    > :first-child,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-score="1"]
    > :first-child,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-achievements-summary-levels="1"]
    > :first-child {
    font-size: 12px;
    line-height: 1.35;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-count="1"] {
    font-size: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-bar="1"] {
    height: 5px;
  }
}

@container achievement-summary (max-width: 560px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-progress="1"] {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-achievements-summary-primary="1"], [data-achievements-summary-score="1"]) {
    flex-direction: column;
    align-items: flex-start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-score="1"] {
    grid-column: 2;
    align-items: flex-end;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-summary-bar="1"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (min-width: 1280px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-card="compact"] {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(210px, 0.5fr);
    gap: 18px;
    align-items: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-identity-main="1"] {
    min-width: 0;
    height: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"] {
    grid-template-columns: minmax(300px, 0.7fr) minmax(580px, 1.3fr);
  }
}

@media (min-width: 1800px) and (min-height: 850px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --web-page-max: 1780px;
    --web-game-panel-width: 380px;
    --release-panel-width: 380px;
    --web-case-card-min: 222px;
    --web-game-art-size: 184px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-game-page="upgrade"],
      [data-game-page="mines"],
      [data-game-page="plinko"],
      [data-game-page="pvp"],
      [data-game-page="rocket"]
    ) {
    width: 100%;
    max-width: 1780px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-plinko-board-shell="1"],
      [data-pvp-wheel-host="1"],
      [data-rocket-hero-host="1"]
    ) {
    min-height: clamp(430px, 50vh, 620px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-overview-grid="true"] {
    grid-template-columns: minmax(520px, 0.9fr) minmax(680px, 1.1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-grid="true"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) and (min-height: 820px) {
  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-page="upgrade"] {
    --upgrade-stage-height: clamp(500px, calc(100dvh - 230px), 620px);
  }
}

/* The tall large-desktop tier above intentionally expands 1800-2299px pages
   to 1780px. Restore the wider 2300px tier after it so ultrawide desktops do
   not inherit that smaller cap through source-order precedence. */
@media (min-width: 2300px) and (min-height: 850px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --web-page-max: 2000px;
  }
}

/* Native 4K is a capped composition, not a stretched canvas. The backdrop
   still covers the viewport, while the navigation, stage and workflow rail
   share one centred visual field. Requiring both dimensions avoids changing
   short 3440x1440 ultrawides. */
@media screen and (min-width: 3000px) and (min-height: 1600px) {
  html[data-desktop-layout="1"][data-standalone="1"] {
    --ui-width-scale: 1.24;
    --desktop-shell-max: min(calc(100vw - 320px), 3040px);
    --desktop-rail-width: 304px;
    --desktop-logo-width: 224px;
    --desktop-gutter: 48px;
    --desktop-topbar-title-size: 26px;
    --desktop-case-topbar-title-size: 24px;
    --desktop-content-offset: calc(var(--desktop-rail-width) + 2 * var(--desktop-gutter));
    --desktop-section-gap: 32px;
    --desktop-panel-gap: 20px;
    --app-topbar-content-gap: 24px;
    --web-page-max: 2520px;
    --web-game-workspace-max: 2520px;
    --web-workspace-gap: 32px;
    --web-game-panel-width: 480px;
    --web-selection-game-panel-width: 480px;
    --web-selection-game-panel-height: 560px;
    --web-upgrade-chance-height: min(1120px, calc(100dvh - 320px));
    --web-upgrade-wheel-size: min(940px, 90%, 48dvh);
    --release-panel-width: 480px;
    --web-game-rail-height: min(1160px, calc(100dvh - 320px));
    --web-game-panel-padding: 20px;
    --web-game-control-gap: 10px;
    --web-game-control-height: 46px;
    --web-game-primary-height: 54px;
    --web-case-card-min: 252px;
    --web-case-card-max: 310px;
    --web-item-card-size: 264px;
    --web-featured-case-max: 980px;
    --web-achievement-columns: 4;
    --web-game-art-size: 228px;
    --web-type-display: 42px;
    --web-type-page: 34px;
    --web-type-section: 20px;
    --web-type-body: 17px;
    --web-type-caption: 14px;
    --web-dialog-gutter: 120px;
    --web-dialog-compact: 480px;
    --web-dialog-default: 600px;
    --web-dialog-medium: 640px;
    --web-dialog-wide: 1040px;
    --web-dialog-wide-large: 1120px;
    --web-dialog-result: 760px;
    --web-drawer-width: 560px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-referrals-page="1"], [data-raffles-page="1"]) {
    max-width: min(var(--web-page-max), 2200px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-page] {
    width: min(100%, var(--web-game-workspace-max));
    max-width: var(--web-game-workspace-max);
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cases-grid="1"] {
    grid-template-columns: repeat(
      auto-fill,
      minmax(var(--web-case-card-min), var(--web-case-card-max))
    );
    justify-content: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-games-desktop-grid="1"] {
    grid-template-columns: repeat(auto-fit, minmax(460px, 560px));
    grid-auto-rows: minmax(370px, 450px);
    justify-content: center;
    gap: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-grid="true"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="contracts"]
    [data-contract-workspace="1"] {
    column-gap: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="contracts"]
    [data-contract-stage="1"] {
    min-height: var(--web-game-rail-height);
    padding: 30px 30px 34px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="contracts"]
    [data-contract-board] {
    width: min(100%, 960px, calc(100dvh - 400px));
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="contracts"]
    [data-contract-panel-section] {
    padding: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="contracts"]
    [data-contract-desktop-cta="1"] {
    padding: 0 22px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-game-page="upgrade"] {
    --upgrade-utility-rail-height: 48px;
    --upgrade-workflow-column-gap: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-live-win-strip="1"] {
    min-height: 80px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    :is([data-upgrade-section="stake"], [data-upgrade-section="target"]) {
    padding-inline: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="stake"] {
    padding-top: 22px;
    padding-bottom: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section="target"] {
    padding-top: 10px;
    padding-bottom: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-section-heading="1"] {
    min-height: 32px;
    margin-bottom: 10px;
    font-size: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="upgrade"]
    [data-upgrade-empty-slot] {
    min-height: 96px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-details-page="1"] {
    --case-stage-height: min(940px, calc(100dvh - 350px));
    --case-action-height: 430px;
    max-width: var(--web-game-workspace-max);
    grid-template-columns: minmax(0, 1fr) 420px;
    column-gap: 32px;
    row-gap: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-action-cluster="1"] {
    padding: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-action-visual="1"] img {
    width: min(92%, 240px);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-action-cluster="1"][data-case-has-coupon="0"] [data-case-action-visual="1"] img {
    width: min(100%, 320px);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-case-spin-cta="1"] {
    height: 58px;
    font-size: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="case"]
    [data-prizes-page-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-plinko-board-shell="1"], [data-pvp-wheel-host="1"], [data-rocket-hero-host="1"]) {
    min-height: min(1040px, calc(100dvh - 320px));
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="plinko"]
    [data-plinko-board-shell="1"] {
    max-height: 1100px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="rocket"]
    [data-rocket-content="1"] {
    height: min(1100px, calc(100dvh - 320px));
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="roulette"]
    [data-roulette-content="1"] {
    --roulette-desktop-panel-width: 480px;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="plinko"]
    [data-game-page="plinko"] {
    --plinko-desktop-panel-width: 480px;
    --plinko-desktop-column-gap: 32px;
  }
}

/* Available content width, not device classification, owns column collapse. */
html[data-desktop-layout="1"][data-standalone="1"] [data-app-main="1"] {
  container-type: inline-size;
  container-name: desktop-main;
}

@container desktop-main (max-width: 780px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-referrals-dashboard="1"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Item preview and actions stack before either column loses readable space.
   Metadata stays at the upper right, in its own flow row rather than over text. */
@media (max-width: 800px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-bottom-sheet-panel="1"] {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 32px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-content="1"] {
    min-height: 0;
    padding: 12px 16px;
    overflow: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-item-preview="1"] {
    height: auto;
    min-height: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-modal-showcase="1"] {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(160px, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-meta="1"] {
    position: static;
    grid-area: 1 / 1;
    max-width: 100%;
    justify-self: end;
    margin: 14px 16px 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-copy="1"] {
    grid-area: 2 / 1;
    padding: 0 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    :is([data-cs-item-showcase-title="1"], [data-cs-item-showcase-eyebrow="1"]) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-title="1"] {
    font-size: 26px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-visual="1"] {
    grid-area: 3 / 1;
    height: 190px;
    min-height: 160px;
    padding: 8px 18px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-item-actions="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-item-action="sell"] {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-item-actions="1"] [data-ui-button="1"] {
    min-height: 40px;
    padding: 8px;
    font-size: 13px;
  }
}

/* Navigation lives in the page heading, without a separate card-sized row. */
html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tabs="1"] {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab] {
  position: relative;
  isolation: isolate;
  height: 32px;
  padding-inline: 0;
  border-radius: 0;
  color: var(--web-text-muted);
  font-size: 14px;
  line-height: 1;
  transition:
    color var(--ui-motion-fast) var(--ui-motion-ease-standard),
    background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
    box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-achievements-tab]:not([aria-pressed="true"]):hover {
  color: var(--web-text-secondary);
  background: transparent;
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab][aria-pressed="true"] {
  color: var(--web-text-primary);
  background: transparent;
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab-icon] {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: var(--ui-text-tertiary);
  transition: color var(--ui-motion-fast) var(--ui-motion-ease-standard);
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab-icon] svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-achievements-tab][aria-pressed="true"]
  [data-achievements-tab-icon] {
  color: rgb(var(--ui-accent-rgb));
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab-label="1"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab-indicator="1"] {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 28px;
  height: 2px;
  border-radius: var(--ui-radius-badge);
  background: transparent;
  transform: translateX(-50%);
  transition:
    background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
    box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-achievements-tab][aria-pressed="true"]
  [data-achievements-tab-indicator="1"] {
  background: rgb(var(--ui-accent-rgb));
  box-shadow: 0 0 12px rgb(var(--ui-accent-rgb) / 0.4);
}

html[data-desktop-layout="1"][data-standalone="1"] [data-achievements-tab]:focus-visible {
  outline: 2px solid var(--ui-focus-ring);
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  html[data-standalone="1"] [data-profile-trade-row="1"] {
    margin-top: 0;
  }
}

/* Match the shell rail density on short windows without moving these utility
   controls away from the bottom of the navigation list. */
@media screen and (max-height: 800px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-preferences-footer="1"] {
    min-height: 32px;
    margin-top: 2px;
    padding: 0 3px;
    gap: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-switch="1"] {
    width: 64px;
    min-height: 32px;
    padding-inline: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-desktop-sound-switch="1"], [data-desktop-community-link="1"]) {
    width: 32px;
    height: 32px;
  }
}

@media screen and (max-height: 640px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-preferences-footer="1"] {
    min-height: 28px;
    margin-top: 1px;
    padding-inline: 2px;
    gap: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-language-switch="1"] {
    width: 56px;
    min-height: 28px;
    padding-inline: 6px;
    gap: 5px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-desktop-sound-switch="1"], [data-desktop-community-link="1"]) {
    width: 28px;
    height: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-desktop-language-icon="1"],
      [data-desktop-sound-icon="1"],
      [data-desktop-community-icon="1"]
    ) {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
}

/* Short desktop windows keep the scene and all primary controls in view.
   Extra help/volume content still grows the page and remains scrollable. */
@media (min-width: 1024px) and (max-height: 760px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-game-controls="plinko"] {
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-desktop-controls="1"] :is([data-plinko-stake-field="1"], [data-plinko-settings-section]) {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-desktop-controls="1"] :is([data-plinko-stake-field="1"], [data-plinko-settings-section]) > div + div {
    min-width: 0;
    margin-top: 0;
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-desktop-controls="1"] [data-plinko-settings-section] button {
    height: 32px;
    min-height: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-desktop-controls="1"] :is([data-plinko-quick-stakes] > button, [data-plinko-stake-field] input) {
    height: 32px;
    min-height: 32px;
  }
}

@container tournament-hero (max-width: 760px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-layout="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "countdown" "aside";
    gap: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-countdown="1"] {
    justify-self: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-hero-aside="1"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container tournament-page (max-width: 760px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing-layout="1"] {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 8px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-standing-rank="1"] {
    grid-row: 1 / span 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-next-place="1"] {
    grid-column: 2;
    grid-row: 2;
    padding-left: 0;
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-prize="1"] {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-my-prize-copy="1"] {
    text-align: left;
  }
}

@container tournament-page (max-width: 600px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-table-head="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-layout="1"] {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-rank="1"] {
    grid-row: 1 / span 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-prize="1"] {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tournament-row-prize-title="1"] {
    text-align: left;
  }
}

/* Flat status surfaces: artwork remains expressive, while controls and
   selection states follow the shared underline/typography language. */
html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card="1"] {
  background: var(--web-surface-base);
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"] {
  background: var(--web-surface-base);
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-tasks-summary-claim="1"].tasks-summary-claim-ready {
  animation: none;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-metric="accent"] {
  border: 0;
  background: var(--web-surface-base);
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-metric="accent"] [data-referrals-metric-content="1"] {
  background: transparent;
  color: var(--web-text-primary);
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-level-trigger="1"] {
  padding: 0;
  background: transparent;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-level-trigger="1"] > div {
  background: transparent;
  color: var(--ui-accent);
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-level-grid="1"] button {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-referrals-level-grid="1"] [data-referrals-level-state="current"] {
  color: var(--ui-accent);
  box-shadow: inset 0 -2px 0 var(--ui-accent);
}

html[data-desktop-layout="1"][data-standalone="1"]
  [data-tournament-leaderboard-row="1"][data-tournament-current-user="1"],
html[data-desktop-layout="1"][data-standalone="1"]
  [data-level-reward-row][data-level-reward-status="AVAILABLE"] {
  background: var(--web-surface-base);
  box-shadow: inset 0 -2px 0 rgb(var(--ui-accent-rgb) / 0.72);
}

/* Dialog system v2.
   Bottom sheets stay native on phones; desktop receives an explicit,
   content-driven dialog taxonomy with one visual language. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-positioner="1"] {
    padding: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-medium), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-medium);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="compact"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-compact), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-compact);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="wide"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-wide), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-wide);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="result"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-result), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-result);
  }

  /* Keep the complete revealed Mines board, but do not let its square grid
     determine the width or height of the desktop result dialog. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="mines-result"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(560px, calc(100vw - 32px));
    max-width: 560px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-summary="1"] {
    padding: 8px 4px 12px;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-summary="1"]
    .text-ui-display-lg {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-board="1"] {
    width: min(100%, clamp(240px, calc(75dvh - 270px), 420px));
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-board="1"]
    .tg-mines-board__grid {
    gap: clamp(4px, 0.6vw, 8px);
    padding: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-actions="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-actions="1"]
    > * + * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-actions="1"]:has(> :nth-child(3))
    > :last-child {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-panel="1"] {
    overflow: hidden;
    border: 0;
    border-radius: var(--ui-dialog-radius-desktop);
    color: var(--ui-dialog-title);
    background: var(--ui-dialog-surface);
    box-shadow: var(--ui-dialog-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    min-height: var(--ui-dialog-header-height);
    padding: 11px 14px 9px var(--ui-dialog-inline-padding);
    border: 0;
    box-shadow: inset 0 -1px var(--ui-dialog-separator);
  }

  /* One restrained title treatment for every titled web dialog. Titleless
     product overlays keep their intentionally quiet close-only header. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"]:has([data-bottom-sheet-title="1"]) {
    background: var(--ui-dialog-section-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"]
    > [aria-hidden="true"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-title="1"] {
    grid-column: 1;
    max-width: none;
    position: relative;
    padding: 0 0 0 17px;
    text-align: left;
    color: var(--ui-dialog-title);
    font-size: max(var(--ui-dialog-title-size), 20px);
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: var(--ui-tracking-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-title="1"]::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: var(--ui-radius-indicator);
    background: var(--ui-accent);
    transform: translateY(-50%);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"]
    > button {
    grid-column: 2;
    width: var(--ui-dialog-close-size);
    height: var(--ui-dialog-close-size);
    border-radius: var(--ui-dialog-close-radius);
    color: var(--ui-dialog-muted);
    background: var(--ui-dialog-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"]
    > button:hover {
    color: var(--ui-dialog-title);
    background: var(--ui-dialog-hover-surface);
  }

  /* Match the editorial underline navigation on the Achievements page.
     The stake tabs and sort choices stay separate controls, with no tray. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="game-gift-picker"] [data-game-stake-tabs="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="game-stake-form"] [data-game-stake-tabs="1"] {
    display: flex;
    width: fit-content;
    max-width: 100%;
    height: auto;
    min-height: 38px;
    padding: 0;
    gap: 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tabs="1"] [data-game-stake-tab] {
    position: relative;
    min-width: 0;
    height: 38px;
    padding: 0 2px 3px;
    border-radius: 0;
    background: transparent;
    color: var(--ui-dialog-muted);
    font-size: var(--ui-type-small);
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tabs="1"] [data-game-stake-tab][aria-pressed="true"] {
    background: transparent;
    color: var(--ui-dialog-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tab-icon="1"] {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    color: var(--ui-dialog-muted);
    opacity: 0.66;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tab-icon="1"] svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tab][aria-pressed="true"] [data-game-stake-tab-icon="1"] {
    color: var(--ui-accent);
    opacity: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tab-indicator="1"] {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    border-radius: var(--ui-radius-badge);
    background: transparent;
    transform: translateX(-50%);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-stake-tab][aria-pressed="true"]
    [data-game-stake-tab-indicator="1"] {
    background: var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-content="1"] {
    margin-top: 0;
    padding: 18px 20px 20px;
    font-size: var(--web-type-body);
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-footer="1"] {
    margin-top: 0;
    padding: 14px 20px 20px;
    border: 0;
    background: var(--ui-dialog-surface);
    box-shadow: none;
    transition: box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]:not([data-dialog-kind="product"])
    [data-bottom-sheet-footer="1"][data-scroll-more="1"] {
    box-shadow: var(--ui-dialog-footer-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="confirmation"]
    [data-bottom-sheet-content="1"] {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="confirmation"]
    [data-bottom-sheet-footer="1"] {
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="confirmation"]
    [data-bottom-sheet-footer="1"]
    :is(button, [data-ui-button="1"]) {
    min-height: 44px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    [data-bottom-sheet-motion="1"]
    > div,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    [data-bottom-sheet-panel="1"] {
    max-height: min(78dvh, 720px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    [data-bottom-sheet-content="1"] {
    padding: 16px 18px 18px;
    scrollbar-gutter: stable;
  }

  /* The upgrade catalog previously mixed a 560px motion wrapper with a
     78dvh panel, which pushed the visible surface below the centered box. */
  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-bottom-sheet-variant="upgrade-stake-selector"],
      [data-bottom-sheet-variant="upgrade-target-selector"]
    )
    [data-bottom-sheet-motion="1"]
    > div {
    height: min(78dvh, 720px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]:not(
      :has([data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"])
    )
    [data-web-inline-panel="1"] {
    margin-top: 12px;
    padding: 14px;
    border: 0;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-dialog-section-surface);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    [data-web-inline-panel="1"]
    > header {
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    [data-web-inline-panel="1"]
    > header
    button {
    color: var(--ui-dialog-muted);
    background: transparent;
  }

  /* Inventory filters use one focused desktop popover instead of a full-width form. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"] {
    position: relative;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-sheet-layout="1"] {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 12px 10px;
    overflow: visible;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-section="price"] {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-section="stat-trak"] {
    grid-column: 3 / span 4;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-section]
    > h3 {
    margin-bottom: 6px;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-section]
    button,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-section]
    label {
    min-height: 38px;
    height: 38px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-price-range="1"] {
    display: grid;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-price-range="1"]
    label {
    min-width: 0;
    padding-inline: 9px;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-price-range="1"]
    label:focus-within {
    border-bottom-color: var(--ui-accent);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-price-separator="1"] {
    color: var(--ui-text-tertiary);
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-stattrak-options="1"][data-ui-underline-tabs="1"] {
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdowns="1"] {
    display: contents;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="wear"] {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="rarity"] {
    grid-column: 3 / span 2;
    grid-row: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="weapon"] {
    grid-column: 5 / span 2;
    grid-row: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"][data-inventory-weapon-filter="hidden"]
    [data-inventory-filter-dropdown="wear"] {
    grid-column: 1 / span 3;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"][data-inventory-weapon-filter="hidden"]
    [data-inventory-filter-dropdown="rarity"] {
    grid-column: 4 / span 3;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown] {
    position: relative;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-trigger="1"] {
    display: flex;
    width: 100%;
    height: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 8px 2px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    color: var(--ui-dialog-title);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-trigger="1"][aria-expanded="true"] {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-label="1"] {
    display: block;
    margin-bottom: 3px;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-summary="1"] {
    display: block;
    overflow: hidden;
    color: var(--ui-dialog-title);
    font-size: var(--web-type-caption);
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-panel="1"] {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    z-index: 12;
    width: 290px;
    padding: 9px;
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: color-mix(in srgb, var(--ui-dialog-surface) 96%, black);
    box-shadow: var(--ui-shadow-floating);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="rarity"]
    [data-inventory-filter-dropdown-panel="1"] {
    left: auto;
    right: 0;
    width: 410px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="weapon"]
    [data-inventory-filter-dropdown-panel="1"] {
    left: auto;
    right: 0;
    width: 410px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-expanded-panel] {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    :is([data-inventory-filter-dropdown-panel="1"], [data-inventory-filter-expanded-panel])
    button,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    :is([data-inventory-filter-dropdown-panel="1"], [data-inventory-filter-expanded-panel])
    label {
    min-height: 36px;
    height: 36px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    :is([data-inventory-filter-dropdown-panel="1"], [data-inventory-filter-expanded-panel])
    button {
    padding-inline: 9px;
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-choice="1"] {
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 19%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-choice="1"][aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    color: var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-choice="1"]:not(:disabled):not([aria-pressed="true"]):hover {
    background: transparent;
    color: var(--ui-dialog-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"] [data-inventory-weapon-search="1"] {
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"] [data-inventory-weapon-search="1"]:focus-within {
    border-bottom-color: var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown-panel="1"]
    [data-inventory-wear-options="1"] {
    gap: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-groups="1"] {
    display: grid;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-group] {
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-group-heading="1"] {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 8px;
    padding: 1px 2px 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-group-heading="1"]
    > span:last-child:not(:first-child) {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-grid="1"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-option="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 10px;
    align-items: center;
    column-gap: 10px;
    padding-inline: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"]
    [data-inventory-rarity-dot="1"] {
    position: static;
    width: 10px;
    height: 10px;
    transform: none;
    justify-self: end;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="wear"]
    [data-inventory-wear-options="1"]
    button {
    min-height: 44px;
    height: auto;
    padding-block: 5px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="wear"]
    [data-inventory-wear-options="1"]
    button
    > span:first-child {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.15;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-filter-dropdown="weapon"]
    [data-inventory-weapon-options="1"] {
    max-height: 194px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scrollbar-gutter: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"] {
    position: absolute;
    top: 54px;
    right: 0;
    z-index: 30;
    width: min(760px, 100%);
    margin-top: 0;
    padding: 14px;
    max-height: min(600px, 60dvh);
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: color-mix(in srgb, var(--ui-dialog-surface) 97%, black);
    box-shadow: var(--ui-shadow-overlay);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    min-height: 28px;
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > header
    h2 {
    color: var(--ui-dialog-title);
    font-size: var(--web-type-body);
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > header
    button {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: var(--ui-radius-control);
    color: var(--ui-dialog-muted);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > footer {
    position: static;
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > footer
    > div {
    width: 224px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-web-inline-panel="1"]
    > footer
    button {
    min-height: 34px;
    height: 34px;
    padding: 5px 10px;
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="transaction"]
    [data-bottom-sheet-content="1"] {
    padding: 18px 20px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="information"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"]
    > div,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="information"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-panel="1"] {
    height: auto;
    max-height: min(72dvh, 640px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-positioner="1"] {
    align-items: center;
    padding: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-motion="1"] {
    height: min(calc(100dvh - 48px), 840px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-panel="1"] {
    border-radius: var(--ui-dialog-radius-desktop);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-content="1"] {
    padding: 18px 20px 24px;
  }

  /* Action sheets use the same surface, header and measures. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-surface="1"] {
    border: 0;
    border-radius: var(--ui-dialog-radius-desktop);
    background: var(--ui-dialog-surface);
    box-shadow: var(--ui-dialog-shadow);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-title="1"] {
    min-height: var(--ui-dialog-header-height);
    position: relative;
    padding: 15px 54px 14px 37px;
    border: 0;
    box-shadow: inset 0 -1px var(--ui-dialog-separator);
    background: var(--ui-dialog-section-surface);
    color: var(--ui-dialog-title);
    font-size: max(var(--ui-dialog-title-size), 20px);
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: var(--ui-tracking-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-title="1"]::before {
    content: "";
    position: absolute;
    inset-inline-start: 20px;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: var(--ui-radius-indicator);
    background: var(--ui-accent);
    transform: translateY(-50%);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-body="1"] {
    padding: 18px 20px 20px;
    font-size: var(--web-type-body);
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-close="1"] {
    top: 11px;
    right: 12px;
    width: var(--ui-dialog-close-size);
    height: var(--ui-dialog-close-size);
    border-radius: var(--ui-dialog-close-radius);
    color: var(--ui-dialog-muted);
    background: var(--ui-dialog-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-modal-overlay="1"][data-dialog-system="2"]
    [data-action-sheet-close="1"]:hover {
    color: var(--ui-dialog-title);
    background: var(--ui-dialog-hover-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-dialog="1"]
    section {
    border: 0;
    border-radius: var(--ui-dialog-section-radius);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-details="1"]
    section {
    background: var(--ui-surface-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-referrals-convert-dialog="1"]
    [data-referrals-convert-balance="1"] {
    border-radius: var(--ui-radius-control-sm);
    background: var(--ui-surface-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-dialog-summary="1"] {
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-surface-muted);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-dialog="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-dialog="1"] > * {
    min-width: 0;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-footer="1"] [data-daily-task-action="1"] {
    flex: 0 0 auto;
    width: auto;
    min-width: 180px;
    margin-inline-start: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-daily-task-dialog="1"]
    :is(
      [data-daily-task-hero="1"],
      [data-daily-task-status="1"],
      [data-daily-task-participation="1"],
      [data-daily-task-hint="1"]
    ) {
    border-radius: var(--ui-dialog-section-radius);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-steps="1"] {
    gap: 0;
    overflow: hidden;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-surface-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-step="1"] {
    border-bottom: 1px solid var(--web-border-hairline);
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-step="1"]:last-child {
    border-bottom: 0;
  }

  @media (max-width: 900px) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-daily-task-dialog="1"] {
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
    }
  }
}

/* CS inspection remains immersive on phones, but web presents it as a
   contained product viewer instead of stretching the 430px mobile canvas
   across the whole browser window. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-overlay="1"] {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    clip-path: none;
    -webkit-clip-path: none;
    opacity: 0;
    background: rgb(5 8 12 / 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-overlay="1"][data-cs-skin-inspect-visible="1"] {
    opacity: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-stage="1"] {
    position: relative;
    inset: auto;
    width: min(1040px, calc(100vw - 72px));
    height: min(720px, calc(100dvh - 64px));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-surface="1"] {
    width: 100%;
    max-width: none;
    overflow: hidden;
    border-radius: var(--ui-dialog-radius-desktop);
    opacity: 0;
    background: var(--ui-surface-base);
    box-shadow: var(--ui-dialog-shadow);
    transform: translateY(10px) scale(0.985);
    transition:
      opacity var(--ui-motion-normal) var(--ui-motion-ease-standard),
      transform var(--ui-motion-normal) var(--ui-motion-ease-emphasized);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-overlay="1"][data-cs-skin-inspect-visible="1"]
    [data-cs-skin-inspect-surface="1"] {
    opacity: 1;
    transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-scene="1"] {
    inset: 78px 0 64px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-header="1"] {
    align-items: center;
    min-height: 78px;
    padding: 14px 18px 13px 22px;
    background: var(--ui-surface-base);
    box-shadow: inset 0 -1px var(--ui-dialog-separator);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-header="1"]
    [data-inventory-cs-modal-title="editorial"] {
    max-width: 680px;
    padding-block: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-header="1"]
    [data-inventory-cs-modal-title="editorial"]
    > :first-child {
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-header="1"]
    [data-inventory-cs-modal-title="editorial"]
    > :nth-child(2) {
    margin-top: 5px;
    font-size: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-header="1"]
    [data-inventory-cs-modal-title="editorial"]
    > :nth-child(3) {
    margin-top: 7px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-close="1"] {
    width: 38px;
    height: 38px;
    border-radius: var(--ui-dialog-close-radius);
    color: var(--ui-dialog-muted);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-close="1"]:hover {
    color: var(--ui-dialog-title);
    background: var(--ui-dialog-hover-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-skin-inspect-price="1"] {
    inset: auto 18px 14px auto;
    width: auto;
    min-height: 42px;
    justify-content: flex-end;
    padding-inline: 14px;
    border-radius: var(--ui-radius-control-sm);
    color: var(--ui-dialog-title);
    background: var(--ui-dialog-section-surface);
    box-shadow: inset 0 0 0 1px var(--ui-dialog-separator);
    font-size: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-price="1"]
    > :first-child {
    width: 22px;
    height: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-inspect-scene="1"]
    :is([data-cs-skin-inspect-scene-loading="1"], [data-cs-skin-inspect-descriptor-loading="1"]) {
    gap: 10px;
    font-size: var(--web-type-body);
  }
}

@media screen and (max-width: 600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-actions="1"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (min-width: 900px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="mines-result"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(800px, calc(100vw - 48px));
    max-width: 800px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-layout="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 390px);
    align-items: center;
    gap: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-layout="1"]
    > * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-summary="1"] {
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-board="1"] {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="mines-result"]
    [data-mines-result-actions="1"] {
    max-width: 560px;
    margin-inline: auto;
  }
}

@media (min-width: 1800px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="wide"]:not(
      [data-desktop-presentation="drawer"]
    )
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-wide-large), calc(100vw - 120px));
    max-width: var(--web-dialog-wide-large);
  }
}

/* Achievement details use the desktop canvas for a side-by-side summary and
   complete level list. Short windows still retain the sheet's scroll fallback. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-bottom-sheet-motion="1"] {
    width: min(920px, calc(100vw - 32px));
    max-width: 920px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    :is([data-bottom-sheet-motion="1"] > div, [data-bottom-sheet-panel="1"]) {
    height: auto;
    max-height: min(calc(100dvh - 40px), 760px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-bottom-sheet-content="1"] {
    flex: 0 1 auto;
    padding: 16px 18px 18px;
  }
}

@media screen and (min-width: 900px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-layout="1"] {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-summary="1"] {
    padding: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-summary-title="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-image="1"] {
    height: 136px;
    max-width: 220px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-level="1"] {
    min-height: 62px;
    gap: 10px;
    padding: 7px 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="achievement-details"]
    [data-achievement-details-level-image="1"] {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 3000px) and (min-height: 1600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-positioner="1"] {
    padding: 48px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"] {
    min-height: 68px;
    padding-inline: 24px 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-content="1"] {
    padding: 22px 24px 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-footer="1"] {
    padding: 0 24px 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"]
    :is([data-bottom-sheet-motion="1"] > div, [data-bottom-sheet-panel="1"]) {
    max-height: min(82dvh, 980px);
  }
}

@media screen and (max-height: 700px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-positioner="1"] {
    padding: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-motion="1"] {
    height: calc(100dvh - 32px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-header="1"] {
    min-height: 50px;
    padding-block: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"]
    [data-bottom-sheet-content="1"] {
    padding-block: 14px 16px;
  }
}

/* A computer can keep desktop navigation inside a narrow web frame, but the
   filter form still needs phone-like space instead of a compressed popover. */
@media screen and (max-width: 1023px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-kind="picker"][data-bottom-sheet-variant="inventory-filters"]
    [data-bottom-sheet-motion="1"] {
    width: min(560px, calc(100vw - 32px));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-filters"]
    [data-inventory-filter-sheet-layout="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-filters"]
    [data-inventory-price-range="1"] {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-filters"]
    [data-bottom-sheet-footer="1"]
    > div {
    width: 100%;
  }
}

/* The picker can breathe on large monitors while its filter popover keeps the
   same compact, predictable geometry. */
@media (min-width: 1400px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="upgrade-target-selector"] {
    --web-dialog-wide: 1160px;
    --web-dialog-wide-large: 1160px;
    --web-dialog-gutter: 96px;
  }
}

/* Source section: 21-workspace-refinement.css */
/* Focused desktop refinement for collection, settings and top-up workflows. */
/* One responsive product-result composition across games. Currency-only
   results retain their existing layouts and transaction behavior. */
@media screen {
  html[data-standalone="1"] [data-upgrade-prize-selected="1"] {
    border-radius: 0;
    background: transparent;
    box-shadow: inset 0 -2px var(--ui-accent);
  }

  /* Reserve a top-right row within the art stage instead of covering the skin. */
  html[data-standalone="1"] [data-cs-item-artwork-meta="1"] {
    position: relative;
    z-index: 3;
    grid-area: 1 / 1;
    justify-self: end;
    align-self: start;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 6px;
    margin: 0;
    overflow: visible;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
  }

  html[data-standalone="1"] [data-cs-item-artwork-meta="1"] [data-inventory-cs-rarity-label="1"] {
    padding: 4px 8px;
    border-radius: var(--ui-radius-badge);
    background: var(--web-surface-raised);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[data-standalone="1"] [data-cs-item-artwork-wear="1"] {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  html[data-standalone="1"] [data-game-result-overlay][data-dialog-kind="result"]:has(> [data-item-win-dialog="1"]) {
    display: grid;
    place-items: center;
    padding: 16px;
  }

  html[data-standalone="1"] [data-item-win-dialog="1"] {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 20px 32px;
    width: min(820px, calc(100vw - 32px));
    height: min(484px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    min-width: 0;
    padding: 32px;
    border-radius: var(--ui-dialog-radius-desktop);
    background: var(--ui-dialog-surface);
    box-shadow: var(--ui-dialog-shadow);
    overflow: hidden;
    text-align: left;
  }

  html[data-standalone="1"] [data-item-win-action="close"] {
    position: absolute;
    z-index: 5;
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: var(--ui-dialog-close-radius);
    color: var(--ui-text-secondary);
  }

  html[data-standalone="1"] [data-item-win-action="close"] svg {
    width: 20px;
    height: 20px;
  }

  html[data-standalone="1"] [data-item-win-art="1"] {
    grid-column: 1;
    grid-row: 1 / 3;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  html[data-standalone="1"] [data-game-result-overlay] [data-item-win-dialog="1"] [data-win-overlay-cs-hero="true"] {
    grid-row: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  html[data-standalone="1"] [data-game-result-overlay] [data-item-win-dialog="1"] [data-win-overlay-cs-backdrop="true"] {
    inset: 0;
  }

  html[data-standalone="1"] [data-game-result-overlay] [data-item-win-dialog="1"] [data-win-overlay-cs-media="true"] {
    top: 8%;
    left: 0;
    width: 100%;
    height: 84%;
    transform: none;
  }

  html[data-standalone="1"] [data-item-win-body="1"] {
    grid-column: 2;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 10px 4px 4px 0;
    scrollbar-width: thin;
  }

  html[data-standalone="1"] [data-item-win-eyebrow="1"] {
    margin: 0 24px 16px 0;
    color: var(--ui-accent-text);
    font-size: 13px;
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-standalone="1"] :is([data-item-win-context="1"], [data-item-win-multiplier="1"], [data-item-win-meta="1"]) {
    color: var(--ui-text-secondary);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  html[data-standalone="1"] [data-item-win-context="1"] { margin-bottom: 12px; }
  html[data-standalone="1"] [data-item-win-multiplier="1"] {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--ui-radius-control);
    background: rgb(var(--ui-accent-rgb) / 0.1);
    color: var(--ui-accent-text);
    font-size: 16px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
  }
  html[data-standalone="1"] [data-item-win-multiplier="1"] strong { font-weight: var(--ui-font-weight-bold); }
  html[data-standalone="1"] [data-item-win-meta="1"] { margin-top: 6px; }
  html[data-standalone="1"] [data-item-win-meta="1"] span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }

  html[data-standalone="1"] [data-item-win-dialog="1"] [data-inventory-cs-modal-title="editorial"] {
    padding: 0;
    text-transform: none;
  }

  html[data-standalone="1"] [data-item-win-dialog="1"] [data-inventory-cs-modal-title="editorial"] > div:first-child {
    font-size: 13px;
    line-height: 1.4;
  }

  html[data-standalone="1"] [data-item-win-dialog="1"] [data-inventory-cs-modal-title="editorial"] h2 {
    margin-top: 6px;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[data-standalone="1"] [data-item-win-value="1"] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 8px;
    font-size: 28px;
    font-weight: var(--ui-font-weight-bold);
    color: var(--ui-text-primary);
    font-variant-numeric: tabular-nums;
  }

  html[data-standalone="1"] [data-item-win-value="1"] svg { width: 22px; height: 26px; }
  html[data-standalone="1"] [data-item-win-footer="1"] { grid-column: 2; min-width: 0; }
  html[data-standalone="1"] [data-item-win-actions="1"] { display: grid; gap: 8px; }
  html[data-standalone="1"] [data-item-win-actions="1"] > .ui-button { min-height: 44px; font-size: 14px; margin: 0; }
  html[data-standalone="1"] [data-item-win-actions="1"] > [data-item-win-action="keep"] { color: var(--ui-text-secondary); }
  html[data-standalone="1"] [data-item-win-sale-price="1"] { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
  html[data-standalone="1"] [data-item-win-sale-price="1"] svg { width: 18px; height: 22px; }
  html[data-standalone="1"] [data-item-win-utility="1"] { display: flex; justify-content: center; margin-top: 4px; }
  html[data-standalone="1"] [data-item-win-utility="1"] button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 12px; font-size: 12px; color: var(--ui-text-secondary); }

  html[data-standalone="1"] [data-item-win-presenting="1"] :is([data-item-win-body], [data-item-win-footer], [data-item-win-action="close"], [data-cs-item-artwork-meta]) { visibility: hidden; }

  @media (max-width: 639px) {
    html[data-standalone="1"] [data-item-win-dialog="1"] {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: min(30dvh, 210px) minmax(0, 1fr) auto;
      height: auto;
      padding: 20px;
      gap: 12px;
    }
    html[data-standalone="1"] [data-item-win-art="1"] { grid-column: 1; grid-row: 1; }
    html[data-standalone="1"] [data-item-win-art="1"] [data-cs-item-artwork-meta="1"] { margin-right: 32px; max-width: calc(100% - 32px); }
    html[data-standalone="1"] [data-item-win-body="1"] { grid-column: 1; padding: 0; }
    html[data-standalone="1"] [data-item-win-footer="1"] { grid-column: 1; }
    html[data-standalone="1"] [data-item-win-eyebrow="1"] { margin-bottom: 10px; }
    html[data-standalone="1"] [data-item-win-dialog="1"] [data-inventory-cs-modal-title="editorial"] h2 { font-size: 24px; }
    html[data-standalone="1"] [data-item-win-value="1"] { margin-top: 12px; font-size: 24px; }
  }

  @media (max-height: 560px) {
    html[data-standalone="1"] [data-item-win-dialog="1"] { padding: 16px; gap: 8px 20px; }
    html[data-standalone="1"] [data-item-win-body="1"] { padding-top: 0; }
    html[data-standalone="1"] [data-item-win-eyebrow="1"] { margin-bottom: 8px; font-size: 12px; line-height: 1.2; }
    html[data-standalone="1"] [data-item-win-dialog="1"] [data-inventory-cs-modal-title="editorial"] h2 { font-size: 24px; }
    html[data-standalone="1"] [data-item-win-value="1"] { margin: 12px 0 6px; font-size: 24px; line-height: 1.25; }
    html[data-standalone="1"] [data-item-win-actions="1"] { gap: 4px; }
  }

  @media (max-width: 639px) and (max-height: 640px) {
    html[data-standalone="1"] [data-item-win-dialog="1"] {
      grid-template-rows: min(26dvh, 148px) minmax(0, 1fr) auto;
    }
  }
}
/* Shared editorial tabs: view and stake-mode navigation, not action choices. */
@media screen {
  html[data-standalone="1"] [data-ui-underline-tabs="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-underline-tabs="1"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    min-height: 40px;
    gap: 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bonuses-tabs="1"][data-ui-underline-tabs="1"] {
    display: none;
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-underline-tabs="1"] [data-ui-underline-tab="1"] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    gap: 7px;
    padding: 0 2px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ui-text-secondary);
    font-size: var(--ui-type-small);
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-pressed="true"],
  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-current="page"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-underline-tabs="1"] [data-ui-underline-tab="1"][aria-pressed="true"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-ui-underline-tabs="1"] [data-ui-underline-tab="1"][aria-current="page"] {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    color: var(--ui-text-primary);
    opacity: 1;
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"]:not(:disabled):hover {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"]:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 3px;
  }

  html[data-standalone="1"] [data-ui-underline-tab-icon="1"] {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    color: var(--ui-text-tertiary);
  }

  html[data-standalone="1"] [data-ui-underline-tab-icon="1"] svg {
    width: 18px;
    height: 18px;
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-pressed="true"] [data-ui-underline-tab-icon="1"],
  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-current="page"] [data-ui-underline-tab-icon="1"] {
    color: var(--ui-accent);
  }

  html[data-standalone="1"] [data-ui-underline-tab-label="1"] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[data-standalone="1"] [data-ui-underline-tab-indicator="1"] {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    border-radius: var(--ui-radius-badge);
    background: transparent;
    transform: translateX(-50%);
  }

  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-pressed="true"] [data-ui-underline-tab-indicator="1"],
  html[data-standalone="1"] [data-ui-underline-tab="1"][aria-current="page"] [data-ui-underline-tab-indicator="1"] {
    background: var(--ui-accent);
  }

  html[data-standalone="1"]
    :is([data-plinko-risk-tabs="1"], [data-plinko-rows-tabs="1"], [data-upgrade-multiplier-grid="1"])[data-ui-underline-tabs="1"] {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-standalone="1"]
    :is([data-plinko-risk-tabs="1"], [data-plinko-rows-tabs="1"], [data-upgrade-multiplier-grid="1"])[data-ui-underline-tabs="1"]::-webkit-scrollbar {
    display: none;
  }

  html[data-standalone="1"] [data-contract-mode-switch="1"][data-ui-underline-tabs="1"] {
    width: fit-content;
    justify-content: flex-start;
    gap: 16px;
  }

  html[data-standalone="1"] [data-contract-mode-switch="1"][data-ui-underline-tabs="1"] [data-ui-underline-tab="1"] {
    min-width: 44px;
  }

  /* Rank navigation shares the same underline treatment and scrolls only when labels cannot fit. */
  html[data-standalone="1"] [data-levels-rank-tabs="true"][data-ui-underline-tabs="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-levels-rank-tabs="true"][data-ui-underline-tabs="1"] {
    width: max-content;
    min-width: 100%;
    max-width: none;
    justify-content: space-between;
    gap: 12px;
  }

  @media (max-width: 479px) {
    html[data-standalone="1"] [data-ui-underline-tabs="1"] {
      gap: 12px;
    }
    html[data-standalone="1"] [data-ui-underline-tab="1"] {
      font-size: 12px;
      gap: 5px;
    }
  }
}

/* Currency-only Plinko wins are a compact result, not a tall item showcase. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"] {
    width: min(440px, calc(100vw - 48px));
    max-width: 440px;
    height: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"]
    [data-game-result-panel="1"] {
    height: auto;
    min-height: 0;
    padding: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"]
    [data-game-result-round="1"] {
    margin-bottom: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"]
    [data-game-result-content="1"] {
    width: 100%;
    flex: 0 0 auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-result-kind="stars"]
    [data-plinko-result-heading="1"] {
    font-size: var(--web-type-page);
    line-height: 1.12;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-result-kind="stars"]
    [data-plinko-result-meta="1"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-stars-prize="1"] {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-dialog-section-surface);
    color: var(--ui-dialog-title);
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-result-actions="stars"] {
    margin-top: 20px;
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-result-actions="stars"]
    .ui-button--primary {
    min-height: 52px;
    font-size: var(--web-type-body);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-result-actions="stars"]
    .ui-button--text {
    min-height: 40px;
    color: var(--ui-dialog-muted);
  }
}

@media screen and (max-width: 600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]:has([data-plinko-result-kind="stars"]) {
    padding: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"] {
    width: min(440px, calc(100vw - 32px));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-result-overlay="plinko"]
    [data-plinko-result-kind="stars"]
    [data-game-result-panel="1"] {
    padding: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-plinko-stars-prize="1"] {
    min-height: 96px;
    font-size: 30px;
  }
}

/* Mines history is an in-page journal, not a full-width stack of mobile cards. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-game-info="history"]:has([data-mines-history-content="1"])
    [data-web-inline-panel="1"] {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    padding: 20px 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-game-info="history"]:has([data-mines-history-content="1"])
    [data-web-inline-panel="1"]
    > header h2 {
    font-size: var(--web-type-section);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-list="1"] {
    display: grid;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-list="1"]
    > * + * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row="1"] {
    min-height: 88px;
    padding: 14px 18px;
    border: 0;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-dialog-section-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row="1"]:hover {
    background: var(--ui-dialog-hover-surface);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row-layout="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.2fr) 18px;
    align-items: center;
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-round="1"] {
    min-width: 0;
    font-size: var(--web-type-body);
    line-height: 1.3;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-meta="1"] {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 5px;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-meta="1"] time {
    color: var(--ui-dialog-muted);
    opacity: 0.72;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"] {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
    font-weight: 600;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"]::before {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
    content: "";
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"][data-result="cashed_out"] {
    color: var(--ui-success-label);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"][data-result="busted"] {
    color: var(--ui-danger-soft);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"][data-result="protected"] {
    color: var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amounts="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amount] {
    display: grid;
    justify-items: end;
    gap: 4px;
    min-width: 0;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amount]
    > :last-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ui-dialog-title);
    font-size: var(--web-type-body);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row="1"][data-mines-history-status="CASHED_OUT"]
    [data-mines-history-amount="payout"]
    > :last-child {
    color: var(--ui-currency-foreground);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-chevron="1"] {
    width: 18px;
    height: 18px;
    color: var(--ui-dialog-muted);
  }
}

@media screen and (max-width: 1023px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row-layout="1"] {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
    gap: 6px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-outcome="1"] {
    grid-column: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amounts="1"] {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-chevron="1"] {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-row-layout="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amounts="1"] {
    grid-column: 1;
    grid-row: auto;
    margin-top: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-mines-history-amount] {
    justify-items: start;
  }
}

@media screen {
  /* Inventory and item pickers share an always-visible, wrapping sort toolbar. */
  html[data-standalone="1"] [data-inventory-browse-root="1"] {
    min-width: 0;
    max-width: 100%;
  }

  html[data-standalone="1"] [data-inventory-browse-root="1"]
    [data-inventory-browse-controls="1"][data-inventory-browse-presentation="sort-actions"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    min-height: 48px;
    gap: 12px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-inventory-browse-actions="1"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    margin-inline-start: auto;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"] {
    position: relative;
    height: 40px;
    min-height: 40px;
    gap: 7px;
    padding: 0 2px 4px;
    border: 0;
    border-radius: 0;
    color: var(--ui-text-secondary);
    background: transparent;
    box-shadow: none;
    font-size: var(--ui-type-small);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]:not(:disabled):hover {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]:is([aria-expanded="true"], [data-inventory-filter-active="1"]) {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]:is([aria-expanded="true"], [data-inventory-filter-active="1"]) > svg {
    color: var(--ui-accent);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    border-radius: var(--ui-radius-badge);
    background: transparent;
    content: "";
    transform: translateX(-50%);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]:is([aria-expanded="true"], [data-inventory-filter-active="1"])::after {
    background: var(--ui-accent);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"]:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 3px;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"] {
    position: relative;
    width: auto;
    min-width: 84px;
    height: 40px;
    min-height: 40px;
    padding: 0 8px 4px;
    border: 0;
    border-radius: 0;
    color: var(--ui-text-secondary);
    background: transparent;
    box-shadow: none;
    font-size: var(--ui-type-small);
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"]:not(:disabled):hover {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"][aria-pressed="true"] {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"]::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    border-radius: var(--ui-radius-badge);
    background: transparent;
    content: "";
    transform: translateX(-50%);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"][aria-pressed="true"]::after {
    background: var(--ui-accent);
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-selection-trigger="1"]:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 3px;
  }

  html[data-standalone="1"] [data-inventory-sort-control="1"][data-ui-underline-tabs="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-sort-control="1"][data-ui-underline-tabs="1"] {
    gap: 16px;
  }

  html[data-standalone="1"] [data-inventory-sort-control="1"] [data-inventory-sort-option]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  /* Inventory filter form keeps only exclusive choices as underline tabs. */
  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-stattrak-options="1"][data-ui-underline-tabs="1"] {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-stattrak-options="1"] [data-ui-underline-tab="1"] {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 2px;
    text-align: center;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-price-range="1"] {
    display: grid;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    overflow: visible;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-price-field] {
    height: 44px;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-price-field]:focus-within {
    border-bottom-color: var(--ui-accent);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdowns="1"] {
    display: grid;
    gap: 10px;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown] {
    position: relative;
    min-width: 0;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown-trigger="1"] {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 2px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    color: var(--ui-dialog-title);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown-trigger="1"][aria-expanded="true"] {
    border-bottom-color: var(--ui-accent);
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown-label="1"] {
    display: block;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown-summary="1"] {
    display: block;
    overflow: hidden;
    color: var(--ui-dialog-title);
    font-size: var(--web-type-caption);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-dropdown-panel="1"] {
    margin-top: 6px;
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-choice="1"] {
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 19%, transparent);
    border-radius: 0;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-inventory-filter-sheet-layout="1"] [data-inventory-filter-choice="1"][aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    color: var(--ui-accent);
  }

  html[data-standalone="1"] [data-inventory-filter-actions="1"] [data-inventory-filter-reset="1"] {
    min-width: 0;
    color: var(--ui-text-secondary);
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-inventory-filter-actions="1"] [data-inventory-filter-apply="1"] {
    min-width: 128px;
  }

  @media (max-width: 479px) {
    html[data-standalone="1"]
      [data-inventory-filter-sheet-layout="1"] [data-inventory-stattrak-options="1"] [data-ui-underline-tab="1"] {
      font-size: 11px;
    }
  }

  @media (max-width: 479px) {
    html[data-standalone="1"] [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"] {
      width: 44px;
      height: 44px;
      justify-content: center;
      padding: 0;
    }

    html[data-standalone="1"] [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-label="1"] {
      display: none;
    }

    html[data-standalone="1"] [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-count="1"] {
      position: absolute;
      top: -4px;
      right: -4px;
    }
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-surface] {
    box-sizing: border-box;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-card-sheen), var(--web-surface-base);
    /* Inventory cells use paint containment; keep the shared material inside
       the tile so pickers and virtualized grids render the same surface. */
    box-shadow: var(--web-highlight);
    transition:
      filter var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  /* One optical hierarchy in inventory, market, rewards and game pickers. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-weapon="1"] {
    color: var(--ui-dialog-muted);
    font-weight: 400;
    letter-spacing: 0.015em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-finish="1"] {
    letter-spacing: 0;
    line-height: 1.3;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-currency="1"] {
    width: calc(15px * var(--ui-scale));
    height: calc(18px * var(--ui-scale));
    opacity: 0.85;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-price="1"] {
    gap: 6px;
    font-variant-numeric: tabular-nums;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-selected-mark="1"] {
    left: 7%;
    bottom: 8%;
    width: 24px;
    height: 24px;
    border-radius: var(--ui-radius-badge);
    color: var(--web-surface-sunken);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-surface][aria-pressed="true"] {
    filter: none;
    background: var(--ui-gradient-card-selected), var(--web-surface-raised);
    box-shadow: var(--web-highlight-strong);
  }

  /* The picker summary needs spacing on touch devices as well as desktops. */
  html[data-standalone="1"] [data-item-picker-footer="1"] {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  html[data-standalone="1"] [data-item-picker-summary="1"] {
    display: grid;
    gap: 6px;
    color: var(--ui-dialog-muted);
    font-size: 12px;
  }

  html[data-standalone="1"] [data-item-picker-summary="1"] strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ui-dialog-title);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }

  html[data-standalone="1"] [data-bottom-sheet-footer="1"] [data-item-picker-footer="1"] > [data-ui-button="1"] {
    min-width: min(180px, 100%);
    min-height: 44px;
    margin: 0;
  }

  @media (max-width: 479px) {
    html[data-standalone="1"] [data-item-picker-summary="1"] {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 8px 16px;
    }

    html[data-standalone="1"] [data-bottom-sheet-footer="1"] [data-item-picker-footer="1"] > [data-ui-button="1"] {
      width: 100%;
    }
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-skin-editorial-card="grid"] > [data-cs-skin-rarity-glow="1"] {
    left: 14%;
    top: 23%;
    width: 72%;
    height: 54%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-item-card-surface]
    [data-cs-skin-editorial-card="grid"] {
    border-radius: var(--ui-radius-control);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-item-card-surface]
    [data-cs-skin-editorial-card="grid"]
    img {
    transition:
      transform var(--ui-motion-normal) var(--ui-motion-ease-standard),
      filter var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-item-card-surface]:hover {
      transform: none;
      filter: var(--ui-effect-hover-brightness);
      background: var(--ui-gradient-card-sheen-hover), var(--web-surface-raised);
      box-shadow: var(--web-highlight-strong);
    }

    html[data-desktop-layout="1"][data-standalone="1"]
      [data-item-card-surface]:hover
      [data-cs-skin-editorial-card="grid"] {
      background: transparent;
      box-shadow: none;
    }
  }

  /* Top-up: a wallet workspace with a clear before/after balance summary. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-bottom-sheet-variant="topup-main"][data-dialog-system="2"] {
    --web-dialog-medium: 600px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-bottom-sheet-content="1"] {
    padding: 18px 22px 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-main-content="1"] {
    display: block;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"] {
    margin-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    > div {
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button {
    position: relative;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button[data-topup-method-active="1"] {
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 28px;
    height: 2px;
    border-radius: var(--ui-radius-badge);
    background: transparent;
    content: "";
    transform: translateX(-50%);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button[data-topup-method-active="1"]::after {
    background: var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-method-badge="1"] {
    background: var(--web-surface-raised);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-checkout="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "payment"
      "summary"
      "coupon"
      "submit";
    gap: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-checkout="1"]
    > * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-payment-column="1"] {
    grid-area: payment;
  }


  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button {
    height: 42px;
    border-radius: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-amount="1"] {
    min-height: 0;
    padding: 10px 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-amount="1"]::after {
    content: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-amount-label="1"] {
    position: static;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ui-dialog-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-amount="1"]
    > .relative {
    height: 76px;
    margin-bottom: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-coupon="1"] {
    grid-area: coupon;
    min-height: 52px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-coupon="1"]
    button {
    border-radius: var(--ui-radius-control);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    :is([data-topup-quick-add="1"] button, [data-topup-submit="1"]) {
    height: 44px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-quick-add="1"] {
    padding: 0;
    border-radius: var(--ui-radius-control-sm);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-quick-add="1"]
    button {
    min-width: 0;
    height: 36px;
    border: 0;
    border-radius: 0;
    color: var(--ui-text-secondary);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-quick-add="1"]
    button:not(:disabled):hover {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-quick-add-label="1"] {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-submit="1"] {
    grid-area: submit;
    height: 50px;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-summary="1"] {
    grid-area: summary;
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 16px;
    padding: 4px 2px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-summary-heading="1"] {
    color: var(--ui-dialog-muted);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-values="1"] {
    display: flex;
    align-items: center;
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-values="1"]
    strong {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: var(--ui-dialog-title);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-values="1"]
    strong
    svg {
    width: 20px;
    height: 20px;
    flex: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-current-balance="1"] {
    margin: 0;
    color: var(--ui-dialog-muted);
    font-size: 12px;
    line-height: 1.35;
  }

  /* Coupon selection is a compact catalogue, not a full-bleed illustration. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"][data-dialog-system="2"] {
    --web-dialog-medium: 620px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-bottom-sheet-content="1"] {
    padding: 14px 16px 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupons-hint="1"] {
    margin: 0 2px 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupons-grid="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-count="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-card="1"] {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr) 26px;
    align-items: center;
    min-height: 104px;
    gap: 12px;
    padding: 8px 10px 8px 8px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-card="1"]
    > [data-coupon-card-art="1"] {
    width: 124px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-card="1"]
    [data-coupon-type-pill="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-card="1"]
    > div:nth-child(2) {
    margin: 0;
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-check="1"] {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: transparent;
    background: var(--web-surface-interactive);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-selected="1"] {
    border-bottom: 2px solid var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-coupons"]
    [data-topup-coupon-selected="1"]
    [data-topup-coupon-check="1"] {
    color: var(--ui-primary-foreground);
    background: var(--ui-accent);
  }

  /* Settings: clear sections with supporting copy and no equal-height stretch. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-page="1"] {
    max-width: 1040px;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-settings-integrations="1"], [data-settings-preferences="1"]) {
    overflow: hidden;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-integrations-body="1"]
    [data-steam-trade-link-settings] {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-settings-integrations-body="1"]
    [data-steam-trade-link-settings]
    > button {
    min-height: 76px;
    border-radius: var(--ui-radius-control-sm);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-list="1"] {
    padding: 0 12px 10px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-settings-toggle-row="1"] {
    min-height: 68px;
    padding: 11px 8px;
  }
}

/* Source section: 22-profile-workspace.css */
/* Profile is an account workspace: dense, legible and deliberately flatter
   than the transactional screens around it. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-page="1"]
    > [data-web-page-header="1"] {
    min-height: 0;
    margin-bottom: 0;
    padding: 0 2px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-page="1"]
    [data-web-page-header-text="1"] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px 18px;
  }

  /* Identity and rank are two parts of one account summary, not two cards. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: stretch;
    gap: 0;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-card="compact"] {
    display: grid;
    align-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-identity-main="1"] {
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-card="compact"]
    [data-profile-identity-main="1"]
    > div:first-child {
    width: 60px;
    height: 60px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metrics="compact-grid"] {
    margin: 0;
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metric-tile="1"] {
    padding-right: 8px;
    padding-left: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-status-column="1"] {
    min-width: 0;
    padding: 0;
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-status-column="1"]
    > [data-profile-level-card] {
    width: 100%;
    min-height: 132px;
    margin: 0;
    padding: 16px 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  /* Steam binding behaves like a compact connected-service editor. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-trade-row="1"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    > [data-web-inline-panel="1"] {
    position: relative;
    display: block;
    padding: 14px 16px;
    border-color: var(--web-border);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    > [data-web-inline-panel="1"]
    > header {
    position: absolute;
    top: 14px;
    left: 16px;
    width: 226px;
    min-height: 40px;
    margin: 0;
    align-self: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    > [data-web-inline-panel="1"]
    > [data-web-inline-content="1"] {
    min-width: 0;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-icon="1"] {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-title="1"] {
    display: grid;
    width: 100%;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-copy="1"] {
    display: block;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-status] {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--web-text-tertiary);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-steam-service-status] > span {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--ui-neutral-dot);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-steam-service-status="linked"]
    > span {
    background: var(--ui-positive-strong);
    box-shadow: var(--ui-focus-ring-positive);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"] {
    display: grid;
    grid-template-columns: 226px minmax(0, 1fr);
    gap: 7px;
    padding-bottom: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-help="1"] {
    display: flex;
    min-width: 0;
    grid-column: 1;
    grid-row: 1 / span 3;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 44px 0 0 42px;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-help="1"]
    > div:first-child {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-help="1"]
    [data-ui-button="1"] {
    min-height: 24px;
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 11px;
    white-space: normal;
    text-align: left;
    justify-content: flex-start;
    line-height: 1.4;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-footnote="1"] {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--web-text-tertiary);
    font-size: 11px;
    line-height: 1.35;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-input="1"]
    :is(input, button) {
    min-height: 40px;
    height: 40px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-input="1"] {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"]
    > [role="alert"] {
    grid-column: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"]
    [data-topup-trade-link-layout="1"]
    > :last-child {
    grid-column: 2;
    margin: 0;
  }

  /* Collection controls introduce the content instead of floating in a large bar. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inventory="1"] {
    position: relative;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inventory-heading="1"] {
    position: static;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-height: 32px;
    align-items: center;
    margin-bottom: 8px;
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-inventory-heading-icon="1"] {
    width: 22px;
    height: 22px;
    color: rgb(var(--ui-accent-rgb) / 0.96);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inventory-heading="1"] h2 {
    color: var(--web-text-primary);
    font-size: 18px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.02em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inventory-count="1"] {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    color: var(--web-text-tertiary);
    font-size: 12px;
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inventory-count="1"]::before {
    margin-right: 8px;
    color: var(--web-border-strong);
    content: "·";
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-inventory="1"]
    [data-inventory-page-content="1"]
    [data-inventory-browse-controls="1"] {
    width: 100%;
    min-height: 44px;
    margin-left: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

}

/* Source section: 23-editorial-headings.css */
/* Shared editorial heading system.
   Page titles, section titles and their metadata now form one restrained
   hierarchy instead of looking like unrelated labels or decorative banners. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header="1"] {
    min-height: 0;
    align-items: center;
    padding: 0 2px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-copy="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-page-header-copy="1"][data-has-icon="1"] {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-icon="1"] {
    display: inline-flex;
    width: 30px;
    height: 30px;
    margin: 0;
    align-items: center;
    justify-content: center;
    color: rgb(var(--ui-accent-rgb) / 0.96);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-text="1"] {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-eyebrow="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-title="1"] {
    margin: 0;
    color: var(--web-text-primary);
    font-size: var(--web-type-page);
    font-weight: var(--ui-font-weight-bold);
    line-height: var(--web-leading-tight);
    letter-spacing: var(--ui-tracking-heading);
    white-space: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-description="1"] {
    display: flex;
    min-width: 0;
    flex: 1 1 260px;
    align-items: center;
    gap: 14px;
    max-width: none;
    margin: 0;
    color: var(--web-text-secondary);
    font-size: var(--web-type-body);
    line-height: var(--web-leading-body);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-page-header-description="1"]::before {
    width: 1px;
    height: 14px;
    flex: 0 0 auto;
    background: var(--web-border);
    content: "";
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-aside="1"] {
    align-self: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-title="1"] {
    margin: 0;
    color: var(--web-text-primary);
    font-size: var(--web-type-section);
    font-weight: var(--ui-font-weight-bold);
    line-height: var(--web-leading-tight);
    letter-spacing: var(--ui-tracking-title);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-meta="1"] {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    color: var(--web-text-tertiary);
    font-size: var(--web-type-caption);
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-section-meta="1"]::before {
    margin-right: 8px;
    color: var(--web-border-strong);
    content: "·";
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-header="1"] {
    min-height: 44px;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-divider="1"] {
    background: var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-content-section-toggle="1"] {
    min-height: 36px;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-tertiary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-section] {
    padding-top: 14px;
    border-top: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-section-title="1"] {
    display: flex;
    min-height: 32px;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-upgrade-section-heading="1"] {
    min-height: 40px;
    margin-bottom: 8px;
    padding-inline: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-heading="1"] {
    min-height: 46px;
    align-items: center;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-heading="1"]
    > div:first-child {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-title="1"] {
    color: var(--web-text-primary);
    font-size: var(--web-type-page);
    font-weight: var(--ui-font-weight-bold);
    line-height: var(--web-leading-tight);
    letter-spacing: var(--ui-tracking-heading);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-deadline="1"] {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    margin-top: 0;
    color: var(--web-text-secondary);
    font-size: var(--web-type-body);
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-deadline="1"]::before {
    width: 1px;
    height: 14px;
    flex: 0 0 auto;
    background: var(--web-border);
    content: "";
  }

  /* Raffle detail is a desktop participation workspace, not a stack of
     stretched mobile cards. Prize context stays on the left; the complete
     decision flow occupies one calm surface on the right. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-page="1"] {
    display: grid;
    width: 100%;
    max-width: 1240px;
    gap: 14px;
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-page="1"] > *,
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] > *,
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-participation-card="1"] > * {
    min-width: 0;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-about="1"] {
    min-height: 36px;
    padding-inline: 12px;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-about="1"]:hover {
    color: var(--web-text-primary);
    background: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] {
    display: grid;
    grid-template-columns: minmax(320px, 0.88fr) minmax(440px, 1.12fr);
    align-items: stretch;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-hero="1"] {
    --raffle-detail-prize-scale-override: 0.9;
    display: flex;
    min-height: 360px;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-media-accent), var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-summary="1"] {
    position: relative;
    z-index: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-summary-title="1"] {
    margin-top: 0;
    color: var(--web-text-primary);
    font-size: 16px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: -0.02em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-hero-prizes="1"] {
    flex: 1 1 auto;
    align-content: center;
    align-items: center;
    justify-content: center;
    gap: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-detail-prize="1"] {
    width: min(280px, 78%);
    height: 300px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-detail-prize="1"] > :first-child {
    width: 100%;
    height: 220px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-quality="1"] {
    top: 4px;
    right: 4px;
    left: auto;
    max-width: none;
    padding: 0;
    transform: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 11px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.025em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-quality-label="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-quality-code="1"] {
    display: inline;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-price="1"] {
    border: 0;
    background: var(--ui-gradient-accent-pill), rgb(255 255 255 / 0.055);
    box-shadow: var(--ui-shadow-price-badge);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card-price-anchor="1"] {
    z-index: 20;
    width: max-content;
    max-width: none;
    overflow: visible;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-card-price-anchor="1"] > * {
    min-width: max-content;
    max-width: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-participation-card="1"] {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-metrics="1"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    background: var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-metric="1"] {
    padding: 14px 12px 13px;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-metric="1"] > :first-child {
    color: var(--web-text-tertiary);
    font-size: 10px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.1em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-metric="1"] > :last-child {
    margin-top: 4px;
    color: var(--web-text-primary);
    font-size: 20px;
    font-weight: var(--ui-font-weight-bold);
    line-height: 1;
    letter-spacing: -0.03em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-panel="1"] {
    min-height: 0;
    padding: 18px 20px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-contribution-header="1"]
    > div:first-child
    > div:first-child {
    color: var(--web-text-primary);
    font-size: 17px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.025em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-balance="1"] {
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-secondary);
    background: var(--web-surface-soft);
    font-size: 12px;
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-balance="1"] strong {
    color: var(--web-text-primary);
    font-variant-numeric: tabular-nums;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-contribution-editor="1"] {
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-desktop-ticket-controls="1"] {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-field="1"] {
    display: grid;
    min-height: 40px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-raised);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-input="1"] {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--ui-radius-control);
    color: var(--web-text-primary);
    background: transparent;
    font-size: 18px;
    font-weight: var(--ui-font-weight-bold);
    line-height: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-limit="1"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 13px;
    color: var(--web-text-tertiary);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-ticket-limit="1"] strong {
    color: var(--web-text-secondary);
    font-weight: var(--ui-font-weight-semibold);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-ticket-input="1"]::-webkit-inner-spin-button,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-ticket-input="1"]::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-contribution-summary="1"] {
    display: block;
    margin-top: 10px;
    padding-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-contribution-summary="1"] strong {
    display: inline-flex;
    min-height: 0;
    align-items: baseline;
    margin-top: 0;
    color: var(--web-text-primary);
    font-size: 13px;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-contribute-action="1"] {
    min-height: 44px;
    margin-top: 10px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 14px;
    font-weight: var(--ui-font-weight-bold);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-page="1"][data-raffle-details-embedded="1"] {
    display: grid;
    max-width: none;
    grid-template-columns: minmax(350px, 0.9fr) minmax(330px, 1.1fr);
    grid-template-areas:
      "heading deadline"
      "workspace workspace";
    column-gap: 8px;
    row-gap: 2px;
    padding-bottom: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-inline-details="1"] {
    position: relative;
    padding: 10px 14px 12px;
    border: 0;
    border-radius: var(--ui-radius-control);
    background:
      var(--ui-gradient-card-accent), var(--ui-gradient-card-sheen), var(--web-surface-raised);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"]:has([data-raffle-inline-details="1"]) {
    max-width: 1080px;
    margin-inline: auto;
    grid-auto-rows: auto;
    align-items: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-embedded-meta="1"] {
    display: contents;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-inline-heading="1"] {
    grid-area: heading;
    min-height: 28px;
    padding-left: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-inline-heading="1"] h2 {
    color: var(--web-text-primary);
    font-size: 21px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-about="1"] {
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-about-icon="1"] {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: var(--ui-font-sans);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-deadline="1"] {
    grid-area: deadline;
    align-self: center;
    justify-self: end;
    margin-top: 0;
    padding-right: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-deadline="1"]::before {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-workspace="1"] {
    grid-area: workspace;
    grid-template-columns: minmax(350px, 0.9fr) minmax(330px, 1.1fr);
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-hero="1"] {
    --raffle-detail-prize-scale-override: 0.6;
    display: flex;
    min-height: 124px;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    gap: 3px;
    padding: 2px 10px 4px;
    border-radius: 0;
    background: transparent;
    container-name: raffle-prize-panel;
    container-type: inline-size;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-hero-prizes="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-height: 82px;
    align-content: center;
    align-items: end;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-hero-prizes="1"][data-raffle-prize-columns="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-detail-prize="1"] {
    width: 100%;
    min-width: 0;
    height: 96px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-detail-prize="1"]
    > :first-child {
    width: min(156px, 100%);
    height: 70px;
    margin-inline: auto;
  }

  @container raffle-prize-panel (min-width: 400px) {
    html[data-desktop-layout="1"][data-standalone="1"]
      [data-raffle-details-embedded="1"]
      [data-raffle-hero-prizes="1"][data-raffle-prize-columns="multi"] {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-prize-summary-title="1"] {
    max-width: 100%;
    line-height: 1.15;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-collection="1"] {
    display: block;
    overflow: hidden;
    color: var(--web-text-secondary);
    font-size: 10px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-finish="1"] {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--web-text-primary);
    font-size: 16px;
    font-weight: var(--ui-font-weight-bold);
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-participation-card="1"] {
    align-content: center;
    grid-template-rows: auto auto;
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border-right: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-metrics="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 0 2px;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-metric="1"] {
    display: block;
    padding: 0;
    text-align: left;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-metric="1"]
    + [data-raffle-metric="1"] {
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-metric="1"]
    > :first-child {
    font-size: 9px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-metric="1"]
    > :last-child {
    margin-top: 3px;
    font-size: 17px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-panel="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "editor";
    row-gap: 6px;
    padding: 0 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-panel="1"]:has([data-raffle-contribute-action="1"]) {
    grid-template-columns: minmax(0, 1fr) minmax(138px, 0.7fr);
    grid-template-areas:
      "label label"
      "editor action";
    column-gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribution-label="1"] {
    grid-area: label;
    color: var(--web-text-secondary);
    font-size: 10px;
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.075em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribution-header="1"] {
    grid-area: header;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribution-header="1"]
    > div:first-child
    > div:first-child {
    font-size: 15px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribution-availability="1"] {
    margin-top: 0;
    line-height: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-ticket-balance="1"] {
    min-height: 30px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribution-editor="1"] {
    grid-area: editor;
    margin-top: 0;
    padding-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-ticket-field="1"] {
    background: rgb(11 14 19 / 0.58);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-desktop-ticket-controls="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-ticket-input="1"] {
    min-height: 36px;
    line-height: 36px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-contribute-action="1"] {
    grid-area: action;
    min-height: 36px;
    align-self: start;
    margin-top: 2px;
    padding-inline: 10px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-inline-details="1"]
    [data-raffle-contribute-action="1"]:disabled {
    color: var(--web-text-tertiary);
    background: var(--web-surface-raised);
    opacity: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-prize-collection="1"] {
    font-weight: var(--ui-font-weight-semibold);
    letter-spacing: 0.035em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffles-history-count="1"] {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    margin-left: 8px;
    padding-inline: 6px;
    border-radius: 999px;
    color: var(--web-text-secondary);
    background: var(--web-surface-interactive);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
}

@media screen and (max-width: 1180px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] {
    grid-template-columns: minmax(300px, 0.82fr) minmax(430px, 1.18fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-hero="1"] {
    padding-inline: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-panel="1"] {
    padding-inline: 16px;
  }
}

@media (min-width: 1800px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-page="1"] {
    max-width: 1480px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-detail-prize="1"] {
    width: min(320px, 78%);
  }
}

/* Two compact entries fit once the workspace has room for both columns. */
@media screen and (min-width: 1440px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-page="1"][data-raffle-details-embedded="1"] {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading deadline"
      "workspace workspace";
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"]:not([data-raffles-count="1"]) {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffles-list="1"]:not([data-raffles-count="1"]) > * + * {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-inline-details="1"] {
    min-width: 0;
    align-self: start;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"] [data-raffle-details-workspace="1"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media screen and (min-width: 1440px) and (max-width: 1799px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-panel="1"]:has([data-raffle-contribute-action="1"]) {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 0.65fr);
  }
}

/* Source section: 24-system-contract-final.css */
/* Container-aware composition. Viewport breakpoints still define shell mode;
   these queries make dense workspaces respond to the width they actually get. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] :is([data-profile-page="1"]) {
    container-name: profile-page;
    container-type: inline-size;
  }

  html[data-desktop-layout="1"][data-standalone="1"] :is([data-levels-page]) {
    container-name: levels-page;
    container-type: inline-size;
  }

  html[data-desktop-layout="1"][data-standalone="1"] :is([data-raffles-list="1"]) {
    container-name: raffles-list;
    container-type: inline-size;
  }

  @container levels-page (max-width: 860px) {
    html[data-desktop-layout="1"][data-standalone="1"] :is([data-levels-overview-grid="true"]) {
      grid-template-columns: minmax(0, 1fr);
    }

    html[data-desktop-layout="1"][data-standalone="1"] :is([data-levels-rank-path="true"]) {
      min-height: 260px;
    }
  }

  @container levels-page (max-width: 620px) {
    html[data-desktop-layout="1"][data-standalone="1"] :is([data-levels-current-insights="1"]) {
      grid-template-columns: minmax(0, 1fr);
    }

    html[data-desktop-layout="1"][data-standalone="1"] :is([data-levels-rank-final="true"]) {
      align-items: flex-start;
      flex-direction: column;
    }
  }

  @container raffles-list (max-width: 720px) {
    html[data-desktop-layout="1"][data-standalone="1"] :is([data-raffle-card-stats="1"]) {
      grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
    }

    html[data-desktop-layout="1"][data-standalone="1"] :is([data-raffle-card-content="1"]) {
      min-width: 0;
    }
  }

}

/* Shared interactive primitives are the default vocabulary for new chrome. */
html[data-standalone="1"]
  :is([data-ui-button="1"], [data-ui-icon-button="1"], [data-ui-menu-item="1"]) {
  -webkit-tap-highlight-color: transparent;
}

/* Final desktop composition: remove nested mobile-style trays from account
   summaries, keep achievement controls compact, and render referral terms as
   a document rather than a stack of cards. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] {
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-card="compact"] {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 132px;
    gap: 24px;
    padding: 16px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metrics="compact-grid"] {
    grid-template-columns: 100px 172px;
    min-height: 48px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metrics="compact-grid"] > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metrics="compact-grid"] > * + * {
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metric-tile="1"] {
    min-height: 48px;
    padding: 2px 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metric-label="1"] {
    overflow: visible;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-overflow: clip;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metric-value="1"] {
    margin-top: 6px;
    font-size: 18px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-achievements-metric="true"] {
    border-radius: var(--ui-radius-badge);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-achievements-arrow="true"] {
    display: flex;
    right: 6px;
    width: 16px;
    height: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-dialog="1"] {
    padding-bottom: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-dialog="1"]
    :is(
      [data-referrals-conditions-intro="1"],
      [data-referrals-conditions-layout="1"] > section,
      [data-referrals-conditions-rates="1"],
      [data-referrals-settlement-row="1"]
    ) {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-intro="1"] {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-layout="1"] {
    margin-top: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-steps="1"] {
    gap: 0;
    margin-top: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-condition-step="1"] {
    padding-inline: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-condition-step="1"]:first-child {
    padding-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-condition-step="1"]:last-child {
    padding-right: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-condition-number="1"] {
    display: block;
    width: auto;
    height: auto;
    padding-top: 2px;
    border-radius: 0;
    color: var(--ui-accent);
    background: transparent;
    font-size: 11px;
    line-height: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-details="1"] {
    margin-top: 0;
    gap: 0;
    padding-top: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-rates="1"] {
    padding-right: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-current-rate="1"] {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-rate-table="1"] {
    border: 0;
    border-radius: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-rate-row="1"] {
    padding-inline: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-rate-row="1"][data-current="1"] {
    box-shadow: inset 2px 0 0 rgb(var(--ui-accent-rgb) / 0.78);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-conditions-settlement="1"] {
    gap: 0;
    padding-left: 20px;
    border-left: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-settlement-row="1"] {
    padding-block: 10px 14px;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-settlement-row="1"]:first-child {
    padding-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="referral-conditions"]
    [data-referrals-settlement-row="1"]:last-child {
    border-bottom: 0;
  }

  /* Page-level explanations use the same in-flow disclosure as game info.
     Closed sections must not leave a phantom gap in vertical page stacks. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-page-info][data-web-game-info-open="0"] {
    margin-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-page-info="help"]
    [data-web-inline-content="1"] {
    max-width: 720px;
  }
}

/* The account summary keeps identity text readable before collapsing the rank
   card. Metrics move below identity instead of squeezing the name to initials. */
@container profile-page (max-width: 940px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 280px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-card="compact"] {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-metrics="compact-grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--web-border);
  }
}

@container profile-page (max-width: 700px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-status-column="1"] {
    border-top: 1px solid var(--web-border);
    border-left: 0;
  }
}

/* The form needs more room than the account summary: two translated actions,
   a readable URL field and the help column must all fit before staying inline. */
@container profile-page (max-width: 780px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] > [data-web-inline-panel="1"] > header {
    position: static;
    width: auto;
    margin-bottom: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] [data-topup-trade-link-layout="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] [data-topup-trade-link-layout="1"]
    > :is([data-topup-trade-link-help], [data-topup-trade-link-input], [data-topup-trade-link-footnote], [role="alert"]) {
    grid-column: 1;
    grid-row: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] [data-topup-trade-link-help="1"] {
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] [data-topup-trade-link-input="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-trade-row="1"] [data-topup-trade-link-input="1"] > input {
    grid-column: 1 / -1;
  }
}


/* A computer keeps the desktop rail inside Telegram's narrow web frame.
   Compact geometry does not switch authentication or the device presentation. */
@media screen and (max-width: 1023px) {
  /* The feed needs a full desktop header; reserve narrow space for account actions. */
  html[data-standalone="1"] [data-topbar-root="1"] [data-topbar-middle="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"]
    [data-topbar-actions="1"] {
    grid-column: 1;
  }

  html[data-desktop-layout="0"][data-standalone="1"] [data-topbar-leading="1"],
  html[data-desktop-layout="0"][data-standalone="1"] [data-topbar-actions="1"] {
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"] {
    --desktop-rail-width: 152px;
    --desktop-logo-width: 128px;
    --desktop-gutter: 12px;
    --web-dialog-gutter: 24px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-topbar-actions="1"] {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-game-info="about"]
    [data-web-inline-content="1"]
    > div,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-web-game-info="about"]
    [data-game-about-document] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-about-document]
    > [data-game-about-summary="1"] {
    padding-right: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-game-about-document]
    > [data-game-about-steps="1"] {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--web-border);
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    :is(
      [data-case-details-page="1"],
      [data-mines-layout="1"],
      [data-game-page="plinko"],
      [data-contract-workspace="1"],
      [data-settings-page="1"],
      [data-inventory-browse-controls="1"],
      [data-topup-main-content="1"]
    ) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    :is(
      [data-case-details-page="1"],
      [data-mines-layout="1"],
      [data-game-page="plinko"],
      [data-contract-workspace="1"],
      [data-topup-main-content="1"]
    )
    > * {
    grid-area: auto;
    min-width: 0;
    max-width: 100%;
  }

  /* The generic single-column rule above must not enlarge the square 7×7
     board beyond the available viewport height. */
  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"][data-desktop-focus="mines"]
    [data-mines-board-shell="1"] {
    max-width: min(100%, var(--mines-board-max-width, 540px), max(220px, calc(100dvh - 190px)));
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-page="1"][data-raffle-details-embedded="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "deadline"
      "workspace"
      "about";
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-workspace="1"] {
    grid-area: workspace;
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-web-page-info="about"] {
    grid-area: about;
    width: 100%;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-case-action-cluster="1"] {
    --case-action-visual-display: none;
    position: relative;
    width: min(100%, 520px);
    max-width: 520px;
    height: auto;
    margin-inline: auto;
  }
}

@media screen and (max-width: 599px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    > div {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-methods="1"]
    button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    height: auto;
    padding: 6px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"] [data-topup-methods="1"] button > span {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-checkout="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "payment"
      "summary"
      "coupon"
      "submit";
    padding: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"]
    [data-topup-balance-summary="1"] {
    min-height: 0;
  }
}

/* The market is part of the same collection workspace as inventory. Keep its
   page measure, toolbar density and item cards on that shared visual rhythm. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-page="1"] {
    container-type: inline-size;
    container-name: skin-market;
    width: min(100%, 1180px);
    margin-inline: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-toolbar="1"] {
    position: relative;
    z-index: 20;
    grid-template-columns: minmax(200px, 0.68fr) minmax(0, 2.32fr);
    align-items: stretch;
    border-radius: var(--ui-radius-control);
    overflow: visible;
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-inventory-browse-root="1"][data-inventory-filter-display="popover"] {
    position: static;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-inventory-browse-root="1"][data-inventory-filter-display="popover"]
    [data-web-inline-panel="1"] {
    top: calc(100% + 8px);
    right: 8px;
    width: min(760px, calc(100% - 16px));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-skin-market-search="1"] {
    height: 48px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-skin-market-search="1"]:focus-within {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-inventory-browse-controls="1"] {
    min-height: 48px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-skin-market-toolbar="1"]
    [data-inventory-browse-presentation="market-toolbar"] {
    display: grid;
    grid-template-columns:
      minmax(170px, 1.35fr) repeat(2, minmax(105px, 1fr)) minmax(174px, 1.3fr)
      48px;
    align-items: stretch;
    gap: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-presentation="market-toolbar"]
    > * {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-browse-presentation="market-toolbar"]
    [data-inventory-filter-dropdown] {
    position: relative;
    grid-column: auto;
    grid-row: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
    [data-inventory-browse-presentation="market-toolbar"] [data-inventory-filter-dropdown-panel="1"] {
    top: calc(100% + 8px);
    max-width: calc(100cqw - 16px);
  }

  @container skin-market (max-width: 900px) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-toolbar="1"] {
      grid-template-columns: minmax(0, 1fr);
    }

    /* Keep the right-aligned rarity menu inside the compact toolbar while
       retaining the trigger as its positioning anchor. */
    html[data-desktop-layout="1"][data-standalone="1"]
      [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
      [data-inventory-browse-presentation="market-toolbar"]
      [data-inventory-filter-dropdown="rarity"] [data-inventory-filter-dropdown-panel="1"] {
      width: min(410px, calc(100cqw - 16px));
    }
  }

  @container skin-market (max-width: 660px) {
    html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-toolbar="1"]
      [data-inventory-browse-presentation="market-toolbar"] {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    }

    html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] {
      grid-column: 1 / -1;
    }

    html[data-desktop-layout="1"][data-standalone="1"]
      [data-inventory-browse-root="1"][data-inventory-facet-presentation="dropdowns"]
      [data-inventory-browse-presentation="market-toolbar"] [data-inventory-filter-dropdown="rarity"] {
      grid-column: 2 / -1;
    }

    html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-stattrak="1"] {
      grid-column: 1 / 3;
    }
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] {
    display: grid;
    height: 48px;
    grid-template-columns: 16px minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 14px minmax(0, 1fr);
    align-items: center;
    gap: 0 6px;
    padding: 5px 10px 4px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 22%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: border-color var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"]:focus-within {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-price="1"][data-invalid="1"] {
    border-bottom-color: var(--ui-danger);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-price="1"]
    [data-market-inline-filter-label="1"] {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] img,
  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] svg,
  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] input,
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-price="1"]
    [data-inventory-price-separator="1"] {
    grid-row: 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-price="1"] input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ui-dialog-title);
    background: transparent;
    font-size: var(--web-type-caption);
    font-weight: 600;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-price="1"]
    input::placeholder {
    color: var(--ui-text-tertiary);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-filter-label="1"] {
    display: block;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-caption);
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-stattrak="1"] {
    display: block;
    height: 48px;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-stattrak="1"]
    [data-market-stattrak-options="1"][data-ui-underline-tabs="1"] {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    justify-content: space-between;
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-stattrak="1"]
    [data-market-stattrak-option][data-ui-underline-tab="1"] {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    padding-inline: 2px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-market-inline-sort="1"] {
    width: 48px;
    min-width: 48px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-market-inline-sort="1"]
    [data-inventory-price-sort] {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-browse-presentation="market-toolbar"]
    [data-inventory-filter-dropdown-trigger="1"] {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-market-weapon-filters="1"] {
    position: relative;
    z-index: 14;
    container-type: inline-size;
    container-name: market-weapon-filters;
    padding: 6px 8px;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
    box-shadow: var(--web-highlight);
  }

  html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
  }

  @container market-weapon-filters (max-width: 1000px) {
    html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @container market-weapon-filters (max-width: 660px) {
    html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @container market-weapon-filters (max-width: 420px) {
    html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @container market-weapon-filters (max-width: 300px) {
    html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  html[data-standalone="1"] [data-market-weapon-category="1"] {
    position: relative;
    min-width: 0;
  }

  html[data-standalone="1"] [data-market-weapon-category-trigger="1"] {
    display: grid;
    width: 100%;
    min-height: 64px;
    grid-template-columns: 44px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--ui-radius-control-sm);
    color: var(--ui-dialog-muted);
    background: transparent;
    font-size: var(--web-type-caption);
    font-weight: 500;
    line-height: 1;
    text-align: left;
    transition:
      color var(--ui-motion-fast) var(--ui-motion-ease-standard),
      background var(--ui-motion-fast) var(--ui-motion-ease-standard),
      box-shadow var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"][data-direct="1"] {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"]:hover:not(:disabled) {
    color: var(--ui-dialog-title);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"]:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: -2px;
    color: var(--ui-dialog-title);
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"][data-selected="1"],
  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"][aria-expanded="true"] {
    color: var(--ui-dialog-title);
    background: transparent;
    box-shadow: inset 0 -2px var(--ui-accent);
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"]:disabled {
    opacity: 0.42;
  }

  html[data-standalone="1"] [data-market-weapon-category-media="1"] {
    display: grid;
    position: relative;
    width: 44px;
    height: 42px;
    place-items: center;
    overflow: hidden;
  }

  html[data-standalone="1"]
    [data-market-weapon-category-media="1"]
    [data-market-weapon-preview="1"] {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgb(0 0 0 / 0.32));
    transform: scale(1.06);
  }

  html[data-standalone="1"]
    [data-market-weapon-category-media="1"]
    [data-market-weapon-category-icon="1"] {
    width: 27px;
    height: 27px;
    opacity: 0.58;
  }

  html[data-standalone="1"] [data-market-weapon-category-label="1"] {
    min-width: 0;
    line-height: 1.15;
    white-space: normal;
  }

  html[data-standalone="1"] [data-market-weapon-category-caret="1"] {
    width: 12px;
    height: 12px;
    flex: none;
    opacity: 0.6;
    transition: transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-standalone="1"]
    [data-market-weapon-category-trigger="1"][aria-expanded="true"]
    [data-market-weapon-category-caret="1"] {
    transform: rotate(180deg);
  }

  html[data-standalone="1"] [data-market-weapon-category-panel="1"] {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--market-category-panel-left, 0px);
    z-index: 42;
    width: min(288px, calc(100vw - 40px));
    overflow: hidden;
    border: 0;
    border-radius: var(--ui-radius-panel);
    background: color-mix(in srgb, var(--ui-dialog-surface) 98%, black);
    box-shadow: var(--ui-shadow-overlay);
  }

  html[data-standalone="1"] [data-market-weapon-select-all="1"] {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--web-border);
    color: var(--ui-dialog-title);
    font-size: var(--web-type-body);
    font-weight: 600;
    text-align: left;
  }

  html[data-standalone="1"] [data-market-weapon-select-all="1"][aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    color: var(--ui-accent);
  }

  html[data-standalone="1"] [data-market-weapon-options="1"] {
    max-height: min(390px, 50dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 12px 6px;
    scrollbar-gutter: stable;
  }

  html[data-standalone="1"] [data-market-weapon-option="1"] {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 62px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-dialog-muted) 19%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--ui-dialog-muted);
    font-size: var(--web-type-body);
    text-align: left;
  }

  html[data-standalone="1"] [data-market-weapon-option="1"]:not(:disabled):not([aria-pressed="true"]):hover {
    color: var(--ui-dialog-title);
    background: transparent;
  }

  html[data-standalone="1"] [data-market-weapon-option="1"][aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    color: var(--ui-accent);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-market-weapon-option="1"]
    > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-standalone="1"] [data-market-weapon-option-icon="1"] {
    display: grid;
    position: relative;
    width: 60px;
    height: 44px;
    overflow: hidden;
    place-items: center;
    border-radius: var(--ui-radius-control-sm);
    color: var(--ui-dialog-muted);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-market-weapon-option-icon="1"]
    > [data-market-weapon-category-icon="1"] {
    width: 30px;
    height: 30px;
    opacity: 0.36;
  }

  html[data-standalone="1"] [data-market-weapon-option-icon="1"] img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  html[data-standalone="1"] [data-market-weapon-check="1"] {
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 1px solid var(--web-border-strong);
    border-radius: var(--ui-radius-control-sm);
    color: var(--ui-ink);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-market-weapon-check="1"][data-checked="1"] {
    border-color: var(--ui-accent);
    background: var(--ui-accent);
  }

  html[data-standalone="1"] [data-market-weapon-check="1"] svg {
    width: 15px;
    height: 15px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-grid="1"] {
    gap: 14px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-card="1"] {
    min-width: 0;
    contain: layout paint style;
    contain-intrinsic-size: 210px 210px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="compact"][data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-motion="1"] {
    width: min(720px, calc(100vw - var(--web-dialog-gutter)));
    max-width: 720px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-content="1"] {
    padding: 20px 24px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-footer="1"]
    > div {
    width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-footer="1"] {
    padding: 0 24px 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-footer="1"]
    button {
    min-height: 44px;
    border-radius: var(--ui-radius-control-sm);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-purchase-inspect="1"] svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
  }
}

@container market-weapon-filters (min-width: 1540px) {
  html[data-standalone="1"] [data-market-weapon-filter-track="1"] {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

@media screen and (min-width: 700px) {
  /* Fit the owned-item picker to its cards, not the generic wide-dialog size.
     Leave room for a non-overlay scrollbar without losing the third column. */
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="upgrade-stake-selector"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="game-gift-picker"] {
    --web-item-picker-columns: 3;
    --web-dialog-wide: calc(
      var(--web-item-picker-columns) * var(--web-item-card-size)
      + (var(--web-item-picker-columns) - 1) * var(--web-item-card-gap)
      + 2 * var(--ui-dialog-inline-padding) + 20px
    );
    --web-dialog-wide-large: var(--web-dialog-wide);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="upgrade-stake-selector"]
    [data-bottom-sheet-content="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="game-gift-picker"]
    [data-bottom-sheet-content="1"] {
    padding-inline: var(--ui-dialog-inline-padding);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-item-catalog-grid="1"] {
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, var(--web-item-card-size)), var(--web-item-card-size))
    );
    justify-content: center;
    align-items: start;
    gap: var(--web-item-card-gap);
  }

  /* Market cards may grow with the available page width; other catalog grids
     retain their compact fixed-size cards. auto-fill keeps partial rows aligned. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-grid="1"][data-item-catalog-grid="1"] {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--web-item-card-size)), 1fr));
    justify-content: stretch;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-prizes-page-grid="1"][data-item-catalog-grid="1"] {
    grid-template-columns: repeat(
      auto-fit,
      minmax(min(100%, var(--web-item-card-size)), var(--web-item-card-size))
    );
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-prizes-page-grid="1"][data-item-catalog-grid="1"]
    :is([data-cs-skin-editorial-card="grid"], [data-prize-editorial-frame="grid"]) {
    aspect-ratio: 1 / 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is(
      [data-inventory-grid-row="1"],
      [data-upgrade-picker-grid="1"].absolute,
      [data-game-gift-picker-grid="1"].absolute
    )[data-item-catalog-grid="1"] {
    padding-bottom: var(--web-item-card-gap);
  }
}

@media screen and (min-width: 700px) and (max-width: 759px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="upgrade-stake-selector"],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="game-gift-picker"] {
    --web-item-picker-columns: 2;
  }
}

@media screen {
  html[data-standalone="1"] [data-item-catalog-grid="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 1800px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-skin-market-page="1"] {
    width: 100%;
    max-width: var(--web-page-max);
  }
}

@media screen and (min-width: 3000px) and (min-height: 1600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-bottom-sheet-variant="topup-main"][data-dialog-system="2"] {
    --web-dialog-medium: 760px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-dialog-size="compact"][data-bottom-sheet-variant="skin-market-purchase"]
    [data-bottom-sheet-motion="1"] {
    width: min(900px, calc(100vw - var(--web-dialog-gutter)));
    max-width: 900px;
  }
}

@media screen and (max-width: 599px) {
  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"] {
    --desktop-rail-width: 96px;
    --desktop-logo-width: 88px;
    --desktop-gutter: 8px;
    --desktop-nav-direction: column;
    --desktop-nav-align: center;
    --desktop-nav-item-padding: 2px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    a[data-bottom-nav-item] {
    --desktop-nav-item-height: 48px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-bottom-nav-tab-layer="1"] {
    gap: 2px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-bottom-nav-icon-layer="1"] {
    flex-basis: auto;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-bottom-nav-label="1"] {
    font-size: 10px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-standalone="1"]
    [data-desktop-preferences-footer="1"] {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Inventory product: artwork and details are separate columns, while the
   compact action group remains inside the shared fixed dialog footer. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]
    :is([data-bottom-sheet-motion="1"] > div, [data-bottom-sheet-panel="1"]) {
    height: auto;
    max-height: min(calc(100dvh - 32px), 640px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-header="1"] {
    min-height: 48px;
    padding-block: 7px;
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]:not(:has([data-bottom-sheet-title="1"]))
    [data-bottom-sheet-header="1"] {
    min-height: 44px;
    padding: 5px 14px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]:not(:has([data-bottom-sheet-title="1"]))
    [data-bottom-sheet-content="1"] {
    padding-top: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]
    [data-bottom-sheet-footer="1"] {
    padding: 0 24px 24px;
    min-width: 0;
    align-items: center;
    overflow-y: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-product-details="1"] {
    width: 100%;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-product-details="1"] [data-inventory-cs-modal-title="editorial"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 0 20px;
    text-transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-product-details="1"] [data-inventory-cs-modal-title="editorial"] > :first-child {
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.02em;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-product-details="1"] [data-inventory-cs-modal-title="editorial"] h2 {
    margin: 0;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: clamp(24px, 2.5vw, 32px);
    line-height: 1.12;
    letter-spacing: -0.025em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-product-value="1"] {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    padding-bottom: 12px;
    font-size: 12px;
    color: var(--ui-dialog-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-product-value="1"] strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ui-dialog-title);
    font-variant-numeric: tabular-nums;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-product-value="1"] [data-inventory-item-price="1"] {
    font-size: 28px;
    line-height: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"]
    :is([data-inventory-item-action="sell"], [data-inventory-item-action="withdraw"], [data-inventory-item-action="inspect"]) {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-inventory-item-action="inspect"] {
    background: transparent;
    box-shadow: none;
    color: var(--ui-dialog-muted);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-modal-showcase="1"][data-cs-item-showcase-layout="artwork"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-height: 320px;
    height: 100%;
    border: 0;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-layout="artwork"]:has([data-cs-item-artwork-meta="1"]) {
    grid-template-rows: auto minmax(0, 1fr);
  }

  html[data-standalone="1"] [data-cs-item-showcase-layout="artwork"] [data-cs-item-artwork-meta="1"] {
    margin: 12px 12px 0;
    max-width: calc(100% - 24px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-layout="artwork"] [data-cs-item-showcase-visual="1"] {
    grid-area: 1 / 1;
    height: 100%;
    min-height: 0;
    padding: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-layout="artwork"]:has([data-cs-item-artwork-meta="1"]) [data-cs-item-showcase-visual="1"] {
    grid-area: 2 / 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-cs-item-showcase-layout="artwork"] [data-cs-item-showcase-accent="1"] {
    display: none;
  }
}

@media screen and (max-width: 800px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"]
    :is([data-bottom-sheet-motion="1"] > div, [data-bottom-sheet-panel="1"]) {
    height: auto;
    max-height: calc(100dvh - 32px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-modal-showcase="1"][data-cs-item-showcase-layout="artwork"] {
    height: 180px;
    min-height: 180px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-layout="artwork"] [data-cs-item-showcase-visual="1"] {
    padding: 6px 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-product-details="1"] [data-inventory-cs-modal-title="editorial"] {
    padding-bottom: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-dialog-system="2"][data-bottom-sheet-variant="inventory-item"] [data-bottom-sheet-footer="1"] {
    flex: 0 1 auto;
    padding: 0 16px 16px;
    border-left: 0;
  }
}

@media screen and (max-width: 800px) and (max-height: 650px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-modal-showcase="1"][data-cs-item-showcase-layout="artwork"] {
    height: 100px;
    min-height: 100px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="inventory-item"] [data-cs-item-showcase-layout="artwork"]:has([data-cs-item-artwork-meta="1"]) {
    height: min(156px, 28dvh);
    min-height: min(156px, 28dvh);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-inventory-product-details="1"] [data-inventory-cs-modal-title="editorial"] {
    gap: 5px;
    padding-bottom: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-inventory-product-value="1"] {
    padding-bottom: 4px;
  }
}

/* Product dialogs share one authored showcase instead of stretching a catalog
   tile or dropping an item into an otherwise empty surface. The item identity,
   exact variant and price stay readable while the artwork owns the visual focus. */
@media screen {
  html[data-standalone="1"] [data-cs-item-modal-showcase="1"] {
    display: grid;
    min-height: 310px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(178px, 1fr) auto;
    border: 1px solid rgb(var(--cs-item-showcase-rgb) / 0.18);
    background: var(--ui-gradient-card-sheen), var(--web-surface-sunken, rgb(18 23 31));
    box-shadow: var(--web-highlight), var(--web-card-shadow);
  }

  html[data-standalone="1"] [data-cs-item-showcase-ambient="1"] {
    position: absolute;
    right: -9%;
    bottom: -48%;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 999px;
    background: rgb(var(--cs-item-showcase-rgb) / 0.16);
    filter: blur(46px);
  }

  html[data-standalone="1"] [data-cs-item-showcase-accent="1"] {
    position: absolute;
    inset: 0 auto auto 0;
    z-index: 3;
    width: 62%;
    height: 3px;
    background: var(--cs-item-showcase-color);
    opacity: 0.82;
  }

  html[data-standalone="1"] [data-cs-item-showcase-copy="1"] {
    grid-column: 1;
    grid-row: 1;
    padding: 22px 20px 0;
  }

  html[data-standalone="1"] [data-cs-item-showcase-eyebrow="1"] {
    font-size: 11px;
  }

  html[data-standalone="1"] [data-cs-item-showcase-title="1"] {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(24px, 7vw, 34px);
  }

  html[data-standalone="1"] [data-cs-item-showcase-meta="1"] {
    grid-column: 1;
    grid-row: 2;
    max-width: calc(100% - 40px);
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 6px;
    margin: 12px 20px 0;
  }

  html[data-standalone="1"] [data-cs-item-showcase-chip] {
    display: inline-flex;
    min-width: 0;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--web-text-secondary, rgb(255 255 255 / 0.58));
    background: var(--web-surface-interactive);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
  }

  html[data-standalone="1"] [data-cs-item-showcase-visual="1"] {
    grid-column: 1;
    grid-row: 3;
    min-height: 178px;
    padding: 0 28px;
  }

  html[data-standalone="1"]
    [data-cs-item-showcase-visual="1"]
    [data-cs-skin-rarity-glow="1"]
    > div {
    align-items: center;
    justify-content: center;
  }

  html[data-standalone="1"] [data-cs-item-showcase-visual="1"] img {
    transform: scale(0.93);
    filter: drop-shadow(0 18px 22px rgb(0 0 0 / 0.34));
  }

  html[data-standalone="1"] [data-cs-item-showcase-price="1"] {
    grid-column: 1;
    grid-row: 4;
    justify-self: end;
    gap: 8px;
    margin: 0 20px 20px;
    font-size: 24px;
  }

  html[data-standalone="1"] [data-cs-item-showcase-price="1"] > :first-child {
    width: 25px;
    height: 25px;
  }
}

@media screen and (min-width: 700px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-modal-showcase="1"] {
    min-height: 332px;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-copy="1"] {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    padding: 22px 26px 22px 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-title="1"] {
    max-width: 100%;
    font-size: clamp(26px, 2.3vw, 34px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-meta="1"] {
    position: static;
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
    justify-content: flex-end;
    margin: 24px 26px 0 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-visual="1"] {
    grid-column: 1;
    grid-row: 1 / 4;
    min-height: 0;
    padding: 28px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-visual="1"] img {
    transform: scale(1.02);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-cs-item-showcase-price="1"] {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin: 0 26px 28px 10px;
    font-size: 28px;
  }
}

/* One continuous control panel, including the shared utility footer. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-mines-desktop-panel="1"], [data-plinko-desktop-controls="1"]) {
    padding: var(--web-game-footer-inset);
    background: transparent;
    box-shadow: none;
  }
}

/* Narrow desktop windows keep the desktop shell, but never a squeezed game
   scene or an implicit second column. The query measures space after the rail. */
@container desktop-main (max-width: 780px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-game-page="rocket"], [data-game-page="mines"], [data-game-page="plinko"], [data-game-page="pvp"], [data-game-page="roulette"]) {
    --release-panel-width: 100%;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-page="roulette"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-game-fixed-bar="roulette"] {
    grid-column: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-layout="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "wheel" "bank" "controls" "players" "about";
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-main-column="1"] { display: contents; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-wheel-host="1"] { grid-area: wheel; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-bank="1"] { grid-area: bank; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-side-rail="1"] { display: contents; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-game-fixed-bar="pvp"] { grid-area: controls; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-players="1"] { grid-area: players; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-about-inline="1"] { grid-area: about; }
  html[data-desktop-layout="1"][data-standalone="1"] [data-pvp-about-inline="1"] [data-game-about-document] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-rocket-content="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: 0;
    gap: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-rocket-hero-host="1"] {
    grid-area: 1 / 1;
    height: clamp(260px, 34dvh, 340px);
    min-height: 260px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-rocket-side-panel="1"] {
    grid-area: 2 / 1;
    height: auto;
    max-height: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-rocket-live-bets="1"] {
    flex: 0 1 auto;
    max-height: 152px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-mines-layout="1"], [data-game-page="plinko"]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
    grid-template-rows: auto;
    height: auto;
    min-height: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-mines-layout="1"], [data-game-page="plinko"]) > * {
    grid-area: auto;
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="mines"] [data-mines-board-shell="1"] {
    max-width: min(100%, 360px);
  }

  html[data-desktop-layout="1"][data-standalone="1"][data-desktop-focus="plinko"] [data-plinko-board-shell="1"] {
    height: clamp(280px, 44dvh, 400px);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    :is([data-mines-desktop-panel="1"], [data-plinko-desktop-controls="1"]) {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-text="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-web-page-header-description="1"]::before {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"],
  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-embedded="1"] [data-raffle-details-workspace="1"] {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] [data-raffle-details-hero="1"] {
    grid-area: 1 / 1;
    min-width: 0;
    border-left: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-raffle-details-workspace="1"] [data-raffle-participation-card="1"] {
    grid-area: 2 / 1;
    min-width: 0;
    border-right: 0;
  }
}

@container desktop-main (min-width: 360px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-page="1"][data-raffle-details-embedded="1"] {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading deadline"
      "workspace workspace";
  }
}

@container desktop-main (min-width: 360px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-desktop-ticket-controls="1"] {
    display: grid;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-mobile-slider="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-workspace="1"] {
    grid-area: workspace;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-workspace="1"]
    [data-raffle-details-hero="1"] {
    grid-area: 1 / 2;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-workspace="1"]
    [data-raffle-participation-card="1"] {
    grid-area: 1 / 1;
    border-right: 1px solid var(--web-border);
  }
}

@container desktop-main (min-width: 360px) and (max-width: 539px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-raffle-details-embedded="1"]
    [data-raffle-details-panel="1"]:has([data-raffle-contribute-action="1"]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "editor"
      "action";
    row-gap: 4px;
  }
}

@media screen and (max-width: 767px) {
  html[data-standalone="1"]
    [data-inventory-browse-controls="1"][data-inventory-browse-presentation="sort-actions"] {
    flex-wrap: nowrap;
    gap: 8px;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-sort-control="1"] {
    flex: 0 0 auto;
    width: auto;
    gap: 6px;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-sort-control="1"] [data-inventory-sort-option][data-ui-underline-tab="1"] {
    width: 38px;
    min-height: 40px;
    padding: 0;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-sort-option] [data-ui-underline-tab-label="1"] {
    display: none;
  }

  html[data-standalone="1"]
    [data-inventory-selection-action="1"] [data-inventory-browse-actions="1"] {
    flex: 0 1 auto;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-inline-start: 0;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-trigger="1"] {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }

  html[data-standalone="1"]
    [data-inventory-browse-presentation="sort-actions"] [data-inventory-filter-label="1"] {
    display: none;
  }

  html[data-standalone="1"]
    [data-inventory-selection-action="1"] [data-inventory-selection-trigger="1"] {
    flex: 0 1 104px;
    min-width: 76px;
    height: 40px;
    padding-inline: 8px;
  }
}

/* A single quiet selection language for secondary choices and history. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-grid="1"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 0 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-rocket-coupon-picker="1"]
    [data-dialog-section="1"] {
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-card="1"] {
    display: grid;
    width: 100%;
    min-height: 88px;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-card="1"][aria-pressed="true"] {
    border-bottom: 2px solid var(--ui-accent);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-card="1"]
    > [data-coupon-card-art="1"] {
    width: 84px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-card="1"]
    [data-coupon-type-pill="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="coupon-selector"]
    [data-coupon-picker-copy="1"] {
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  html[data-standalone="1"] [data-profile-steam-trade-link-input="1"] {
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-profile-steam-trade-link-input="1"]:focus-visible {
    border-bottom-color: var(--ui-accent);
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
  }

  html[data-standalone="1"] [data-coupon-choice="1"] {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-coupon-choice="1"][aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-coupon-choice="1"]:not(:disabled):hover {
    background: var(--web-surface-hover);
  }

  html[data-standalone="1"] [data-coupon-choice="1"]:focus-visible,
  html[data-standalone="1"] [data-game-history-row="1"]:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
  }

  html[data-standalone="1"] [data-game-history-row="1"] {
    border: 0;
    border-bottom: 1px solid var(--web-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-game-history-row="1"]:not(:disabled):hover {
    background: var(--web-surface-hover);
  }

  html[data-standalone="1"] [data-topup-methods="1"] > div {
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-standalone="1"] [data-topup-methods="1"] button {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-topup-methods="1"] button[data-topup-method-active="1"] {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-pay-cards-method-options="1"] button {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"] [data-pay-cards-method-options="1"] button[aria-pressed="true"] {
    border-bottom-color: var(--ui-accent);
    background: transparent;
    box-shadow: none;
  }

  /* Keep long dropdowns scrollable without showing a native scrollbar or its gutter. */
  html[data-standalone="1"]
    :is(
      [data-ui-select-menu="1"],
      [data-inventory-filter-dropdown-panel="1"],
      [data-inventory-weapon-options="1"],
      [data-web-inline-panel="1"],
      [data-market-weapon-options="1"]
    ) {
    scrollbar-width: none;
    scrollbar-gutter: auto;
    -ms-overflow-style: none;
  }

  html[data-standalone="1"]
    :is(
      [data-ui-select-menu="1"],
      [data-inventory-filter-dropdown-panel="1"],
      [data-inventory-weapon-options="1"],
      [data-web-inline-panel="1"],
      [data-market-weapon-options="1"]
    )::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}

/* GG$ top-up: one calm, layered checkout surface. Payment handlers are unchanged. */
@media screen {
  html[data-standalone="1"] [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"] {
    --topup-surface: rgb(20 26 35);
    --topup-section: rgb(25 34 48);
    --topup-tile: rgb(37 47 61);
    --topup-text: rgb(243 245 248);
    --topup-muted: rgb(146 156 172);
    --topup-accent: rgb(255 153 0);
    --topup-gold: rgb(255 194 71);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-panel="1"] {
    border: 0;
    border-radius: var(--ui-radius-panel);
    color: var(--topup-text);
    background: var(--topup-surface);
    box-shadow: var(--ui-dialog-shadow);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-header="1"]:has([data-bottom-sheet-title="1"]) {
    min-height: 74px;
    padding: 14px 22px;
    background: var(--ui-gradient-topup-header);
    box-shadow: inset 0 -1px var(--ui-dialog-separator);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-title="1"] {
    color: var(--topup-text);
    font-size: clamp(24px, 2.5vw, 31px);
    line-height: 1.15;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-title="1"]::before {
    width: 4px;
    height: 31px;
    background: var(--topup-accent);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-header="1"] > button {
    width: 38px;
    height: 38px;
    border-radius: var(--ui-radius-control-sm);
    background: rgb(21 28 38);
    color: var(--topup-muted);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-header="1"] > button:hover {
    background: var(--topup-tile);
    color: var(--topup-text);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-content="1"] {
    min-width: 0;
    margin-top: 0;
    padding: 18px 22px 22px;
    scrollbar-width: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-content="1"]::-webkit-scrollbar {
    display: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-main-content="1"] {
    display: block;
    min-width: 0;
    padding-bottom: 0;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] {
    min-width: 0;
    margin-bottom: 16px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] > div {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 3px;
    padding: 4px;
    border-radius: var(--ui-radius-control);
    background: var(--topup-section);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 46px;
    justify-content: center;
    padding: 6px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: transparent;
    box-shadow: none;
    color: var(--topup-muted);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button:not(:disabled):hover {
    background: rgb(255 255 255 / 4%);
    color: var(--topup-text);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button[data-topup-method-active="1"] {
    border: 0;
    color: var(--topup-text);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button::after {
    position: absolute;
    right: auto;
    bottom: 1px;
    left: 50%;
    width: min(64px, 70%);
    height: 2px;
    border-radius: var(--ui-radius-indicator);
    background: transparent;
    content: "";
    transform: translateX(-50%);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button[data-topup-method-active="1"]::after {
    background: var(--topup-accent);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-method-badge="1"] {
    border: 0;
    background: var(--topup-tile);
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-checkout="1"] {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "payment payment" "summary coupon" "submit submit";
    gap: 14px;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-checkout="1"] > * {
    min-width: 0;
    margin-top: 0;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-payment-column="1"] {
    grid-area: payment;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] {
    position: relative;
    min-height: 242px;
    padding: 22px 28px 24px;
    border: 0;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-gradient-topup-amount);
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img {
    position: absolute;
    width: 56px;
    height: auto;
    opacity: 0.19;
    filter: blur(1px);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(1) {
    top: 28px;
    left: -13px;
    transform: perspective(130px) rotateY(26deg) rotate(-29deg);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(2) {
    bottom: 43px;
    left: 10%;
    width: 28px;
    opacity: 0.11;
    transform: perspective(120px) rotateY(-19deg) rotate(18deg);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(3) {
    top: 15px;
    right: 19px;
    width: 75px;
    opacity: 0.25;
    filter: blur(0.5px);
    transform: perspective(150px) rotateY(-24deg) rotate(19deg);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(4) {
    right: 13%;
    bottom: 52px;
    width: 22px;
    opacity: 0.11;
    transform: perspective(100px) rotateY(32deg) rotate(-14deg);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-label="1"],
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] > .relative,
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add="1"] {
    position: relative;
    z-index: 1;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-label="1"] {
    color: var(--topup-muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] > .relative {
    height: 102px;
    margin-bottom: 13px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] {
    top: 42%;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span,
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span > span:first-child,
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] button {
    font-size: clamp(52px, 5.2vw, 70px);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span:last-child {
    width: 48px;
    height: 48px;
    margin-left: 8px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-meta="1"] {
    bottom: 0;
    color: var(--topup-gold);
    font-size: 15px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-meta="1"] > div > div {
    color: var(--topup-gold);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add="1"] {
    gap: 10px;
    padding: 0;
    background: transparent;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add-option="1"] {
    width: 100%;
    min-width: 0;
    height: 52px;
    border: 0;
    border-radius: var(--ui-radius-control-sm);
    background: var(--topup-tile);
    box-shadow: none;
    color: var(--topup-text);
    font-size: 16px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add-option="1"]:not(:disabled):hover {
    background: rgb(48 60 77);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-main-actions="1"] {
    display: contents;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-balance-summary="1"],
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon="1"] {
    min-width: 0;
    min-height: 104px;
    margin: 0;
    padding: 15px 18px;
    border: 0;
    border-radius: var(--ui-dialog-section-radius);
    background: var(--ui-gradient-topup-summary);
    box-shadow: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-balance-summary="1"] {
    grid-area: summary;
    display: grid;
    min-height: 104px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 8px;
    align-content: center;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-current-balance="1"] {
    grid-column: 1 / -1;
    color: var(--topup-muted);
    font-size: 13px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-balance-summary-heading="1"] {
    color: var(--topup-muted);
    font-size: 13px;
    text-transform: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-balance-values="1"] strong {
    color: var(--topup-text);
    font-size: 21px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon="1"] {
    grid-area: coupon;
    display: flex;
    align-items: center;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon="1"] > div {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon-icon="1"] {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: var(--ui-radius-control-sm);
    background: var(--topup-tile);
    color: var(--topup-muted);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon-label="1"] {
    color: var(--topup-muted);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon-action="1"] {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 3px;
    padding: 7px 0 7px 7px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--topup-accent);
    white-space: nowrap;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon-action="1"]:not(:disabled):hover {
    color: var(--topup-gold);
    background: transparent;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-submit="1"] {
    grid-area: submit;
    width: 100%;
    height: 60px;
    min-height: 60px;
    margin: 0;
    border: 0;
    border-radius: var(--ui-radius-control);
    background: var(--ui-gradient-topup-action);
    box-shadow: none;
    color: var(--topup-surface);
    font-size: 18px;
    font-weight: 700;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-submit="1"]:not(:disabled):hover {
    filter: brightness(1.06);
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    :is([data-topup-methods="1"] button, [data-topup-quick-add-option="1"], [data-topup-coupon-action="1"], [data-topup-submit="1"], [data-topup-amount-value="1"] button):focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
  }
}

@media screen and (min-width: 600px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-overlay="1"][data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"][data-dialog-system="2"] {
    --web-dialog-medium: 740px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-motion="1"] {
    width: min(740px, calc(100vw - 40px));
    max-width: 740px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-motion="1"] > div {
    max-height: min(90dvh, 780px);
  }
}

@media screen and (max-width: 599px) {
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-panel="1"] {
    border-radius: var(--ui-radius-panel) var(--ui-radius-panel) 0 0;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-header="1"]:has([data-bottom-sheet-title="1"]) {
    min-height: 62px;
    padding: 10px 16px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-title="1"] {
    font-size: 22px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-content="1"] {
    padding: 14px 16px 20px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button {
    min-height: 48px;
    height: auto;
    font-size: 12px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-methods="1"] button > span {
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-checkout="1"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "payment" "summary" "coupon" "submit";
    gap: 10px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] {
    min-height: 214px;
    padding: 18px 14px 20px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] > .relative {
    height: 88px;
    margin-bottom: 9px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span,
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span > span:first-child,
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] button {
    font-size: 48px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount-value="1"] > div > span:last-child {
    width: 36px;
    height: 36px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(2),
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(4) {
    display: none;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-decorative-coins="1"] img:nth-child(3) {
    right: -12px;
    width: 50px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add="1"] {
    gap: 6px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-quick-add-option="1"] {
    height: 44px;
    font-size: 13px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-balance-summary="1"],
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-coupon="1"] {
    min-height: 84px;
    padding: 12px 14px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-submit="1"] {
    height: 56px;
    min-height: 56px;
  }
}

@media screen and (max-width: 599px) and (max-height: 680px) {
  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-bottom-sheet-content="1"] {
    padding-block: 10px 14px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-checkout="1"] {
    gap: 8px;
  }

  html[data-standalone="1"]
    [data-bottom-sheet-variant="topup-main"][data-dialog-system="2"][data-bottom-sheet-overlay="1"]
    [data-topup-amount="1"] {
    min-height: 202px;
  }
}

/* Account and rewards artwork lives behind the existing functional content.
   The dark surface remains usable if an image is unavailable. */
@media screen {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-hero-shell="1"] {
    overflow: hidden;
    border-radius: var(--ui-radius-control);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-hero-shell="1"] [data-profile-dashboard="1"] {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    min-height: 232px;
    isolation: isolate;
    border-radius: 0;
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"]::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("/assets/promo/profile-hero.webp?v=20261020-3") right 35% / cover no-repeat;
    content: "";
    pointer-events: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"]::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ui-gradient-profile-hero-shade);
    content: "";
    pointer-events: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] > * {
    position: relative;
    z-index: 1;
  }

  /* Keep all account controls on the shaded left, leaving the artwork clear. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-identity-column="1"] {
    width: min(100%, 480px);
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-card="compact"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    min-height: 232px;
    height: 100%;
    gap: 18px;
    padding: 20px 24px 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-identity-main="1"] {
    align-items: flex-start;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-card="compact"] [data-profile-identity-main="1"] > div:first-child {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] > [data-profile-level-card] {
    width: 100%;
    min-height: 44px;
    height: auto;
    margin: 10px 0 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-rank-shield] {
    width: 30px;
    height: 34px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-profile-level-details="1"] {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-left: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-profile-level-label="1"] {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-profile-level-progress="1"] {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.2;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-profile-level-track="1"] {
    flex: 0 0 100%;
    height: 4px;
    margin: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-inline-rank="1"] [data-level-case-ready-dot="true"] {
    top: 0;
    right: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-metrics="compact-grid"] {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--web-border);
    gap: 4px 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-metric-tile="1"] {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-height: 32px;
    padding: 0;
    gap: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-metrics="compact-grid"] > * + * {
    padding-left: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-metric-label="1"] {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"] [data-profile-metric-value="1"] {
    margin: 0;
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-hero-shell="1"] [data-profile-trade-row="1"] {
    margin-top: 0;
    border-top: 1px solid var(--web-border);
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-profile-hero-shell="1"] [data-profile-trade-row="1"] > [data-web-inline-panel="1"] {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-page="1"] [data-tasks-summary="1"] {
    position: relative;
    display: flex;
    min-height: 202px;
    isolation: isolate;
    background: var(--web-surface-base);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"]::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("/assets/promo/tasks-hero.webp?v=20261020-3") right 18% / cover no-repeat;
    content: "";
    pointer-events: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"]::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ui-gradient-tasks-hero-shade);
    content: "";
    pointer-events: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-tasks-summary="1"] > .relative {
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
  }
}

@container profile-page (max-width: 700px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"]::before {
    opacity: 0.55;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-profile-dashboard="1"]::after {
    background: var(--ui-gradient-profile-hero-compact);
  }
}

@media screen and (max-width: 699px) {
  html[data-standalone="1"] [data-profile-hero-shell="1"] {
    display: contents;
  }

  html[data-standalone="1"] [data-tasks-summary="1"]::before {
    display: none;
  }
}
}
