/* Generated from public/desktop-css modules. */
@layer desktop {
/* Source section: 01-shell-and-primary-pages.css */
/* Desktop-only presentation layer. Existing component classes and mobile geometry stay intact. */
@media screen {
  html[data-desktop-layout="1"][data-desktop-chrome="1"] {
    --desktop-live-logo-gap: 36px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-app-shell="1"] {
    width: min(100vw, var(--desktop-shell-max));
    max-width: var(--desktop-shell-max);
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-app-shell-content="1"] {
    box-sizing: border-box;
    padding-left: var(--desktop-content-offset);
    padding-right: var(--desktop-gutter);
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-app-route^="/craft"]
    [data-topbar-root="1"] {
    padding-right: 0;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-app-topbar="1"] {
    padding-left: var(--desktop-gutter);
    padding-right: 0;
    padding-top: max(20px, var(--app-inset-top));
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-root="1"] {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    min-height: 48px;
    gap: 12px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"] {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"]
    [data-topbar-leading="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-leading="1"] {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  /* Detail and legal routes share the same centered title axis as games.
     The back action stays at the start without pushing the title sideways. */
  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-leading="1"] {
    position: relative;
    min-height: 34px;
    overflow: visible;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-title-stack="1"] {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    width: max-content;
    max-width: min(60%, 640px);
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  /* The case name is already visible in the action rail. Keep it out of the
     utility bar so the opening workspace does not repeat the same title. */
  html[data-desktop-layout="1"][data-desktop-chrome="1"][data-desktop-focus="case"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-title-stack="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-middle="1"] {
    display: block;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin-inline-start: calc(
      var(--desktop-logo-width) + var(--desktop-live-logo-gap) - var(--desktop-rail-width) -
        var(--desktop-gutter)
    );
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"]
    [data-topbar-actions="1"] {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-root="1"] {
    box-sizing: border-box;
    padding-right: max(
      0px,
      calc(
        min(50vw, var(--desktop-current-shell-half)) - min(50vw, var(--desktop-header-track-half))
      )
    );
  }

  html[data-desktop-layout="1"] [data-topbar-leading="1"] {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
    overflow: hidden;
  }

  html[data-desktop-layout="1"] [data-topbar-home-logo="1"] {
    display: inline-flex;
    width: var(--desktop-logo-width);
    height: 40px;
    padding: 6px 0;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-home-logo="1"] {
    display: none;
  }

  html[data-desktop-layout="1"]
    [data-topbar-leading="1"][data-topbar-home-title="1"]
    [data-topbar-title="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-title="1"] {
    position: static;
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: auto;
    clip-path: none;
    border: 0;
    color: var(--web-text-primary);
    font-size: var(--desktop-topbar-title-size, clamp(20px, 1.7vw, 24px));
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-title-icon="1"]
    [data-topbar-title-stack="1"] {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-title-icon="1"]
    [data-topbar-title-icon="1"] {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: rgb(var(--ui-accent-rgb) / 0.96);
  }

  html[data-desktop-layout="1"][data-app-route^="/contests"] [data-topbar-title="1"],
  html[data-desktop-layout="1"][data-app-route^="/profile"] [data-topbar-title="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-app-route^="/contests"] [data-topbar-title-icon="1"],
  html[data-desktop-layout="1"][data-app-route^="/profile"] [data-topbar-title-icon="1"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-app-shell="1"] {
    font-family: var(--ui-font-sans);
    letter-spacing: -0.008em;
  }

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

  html[data-desktop-layout="1"] [data-topbar-root="1"] {
    min-height: 44px;
  }

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

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

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

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

  html[data-desktop-layout="1"] [data-topbar-secondary-balances="1"] [data-topbar-balance-segment] {
    height: 18px;
    padding-inline: 4px;
    font-size: 11px;
  }

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

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

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

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

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

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

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

  html[data-desktop-layout="1"] [data-topbar-balance-label="1"] {
    display: none;
    color: var(--ui-text-muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

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

  html[data-desktop-layout="1"] [data-topbar-profile="1"] {
    /* A percentage-sized photo must not determine the button's intrinsic width. */
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    flex: 0 0 38px;
    aspect-ratio: 1 / 1;
  }

  html[data-desktop-layout="1"]
    :is([data-topbar-balance="1"], [data-topbar-topup="1"], [data-topbar-login="1"]) {
    height: 42px;
    border: 1px solid var(--web-border);
    border-radius: var(--web-radius-md);
    box-shadow: none;
  }

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

  html[data-desktop-layout="1"] :is([data-topbar-topup="1"], [data-topbar-login="1"]) {
    min-width: 42px;
    padding-inline: 12px;
    border-color: transparent;
    color: var(--ui-primary-foreground);
    background: rgb(var(--ui-accent-rgb));
  }

  html[data-desktop-layout="1"] [data-topbar-login="1"] {
    min-width: 110px;
    gap: 8px;
    padding-block: 4px;
    padding-inline: 14px;
    border-color: transparent;
    background: rgb(var(--ui-accent-rgb));
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-topbar-login-icon="1"] {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    line-height: 0;
    border-radius: calc(var(--web-radius-md) - 4px);
    color: var(--web-text-primary);
    background: transparent;
    box-shadow: none;
    transition: transform var(--ui-motion-fast) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"] [data-topbar-login-icon="1"] svg {
    display: block;
  }

  html[data-desktop-layout="1"] [data-topbar-login-label="1"] {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: 0.01em;
  }

  @media (hover: hover) {
    html[data-desktop-layout="1"][data-standalone="1"]
      [data-topbar-actions="1"]
      [data-topbar-login="1"]:not(:disabled):hover {
      border-color: transparent;
      background: rgb(var(--ui-accent-rgb));
      box-shadow: none;
    }

    html[data-desktop-layout="1"]
      [data-topbar-login="1"]:not(:disabled):hover
      [data-topbar-login-icon="1"] {
      transform: translateX(1px);
    }
  }

  html[data-desktop-layout="1"] [data-topbar-topup-wrap="1"] {
    margin-left: 0;
  }

  html[data-desktop-layout="1"] [data-topbar-profile="1"] {
    margin-left: 0;
  }

  html[data-desktop-layout="1"] [data-topbar-account-copy-id="1"] {
    width: 30px;
    height: 30px;
  }

  html[data-desktop-layout="1"] [data-topbar-account-copy-id="1"] svg {
    width: 16px;
    height: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] {
    display: inline-flex;
    width: auto;
    height: 34px;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 4px;
    border: 0;
    border-radius: 0;
    color: var(--ui-text-secondary);
    background: transparent;
    box-shadow: none;
    line-height: 1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-topbar-back="1"]:is(:hover, :focus-visible) {
    color: var(--ui-text-primary);
    background: transparent;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] > svg {
    display: block;
    width: 16px;
    height: 16px;
    margin: 0;
    transform: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] > svg path:last-child {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back-label="1"] {
    display: block;
    font-size: 14px;
    font-weight: var(--ui-font-weight-medium);
    line-height: 1;
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-app-main="1"]:not(.px-0) {
    padding-left: var(--desktop-gutter);
    padding-right: var(--desktop-main-edge-padding, 0px);
  }

  html[data-desktop-layout="1"] [data-app-main="1"] {
    scrollbar-width: none;
  }

  html[data-desktop-layout="1"] [data-app-main="1"] :is(p, li, dd, dt) {
    user-select: text;
  }

  html[data-desktop-layout="1"] [data-tournament-page="1"] > :not([hidden]) ~ :not([hidden]) {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-tournament-hero="1"] {
    border-radius: var(--ui-radius-dialog);
  }

  html[data-desktop-layout="1"] [data-tournament-hero-layout="1"] {
    display: grid;
    align-items: center;
    column-gap: 30px;
    row-gap: 12px;
    text-align: left;
  }

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

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

  html[data-desktop-layout="1"] [data-tournament-countdown="1"] {
    grid-area: countdown;
    justify-self: start;
    margin: 0;
    padding: 6px 10px;
  }

  html[data-desktop-layout="1"] [data-tournament-hero-title="1"] {
    max-width: 560px;
    margin-left: 0;
    margin-right: 0;
  }

  html[data-desktop-layout="1"] [data-tournament-hero-body="1"] {
    margin-left: 0;
    margin-right: 0;
  }

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

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

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

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

  html[data-desktop-layout="1"] [data-tournament-rule-label="1"] {
    margin-top: 2px;
    font-size: 11px;
    line-height: 15px;
  }

  html[data-desktop-layout="1"] [data-tournament-rules-link="1"] {
    margin-top: 8px;
    font-size: 13px;
  }

  html[data-desktop-layout="1"] [data-tournament-my-standing="1"] {
    border-radius: var(--ui-radius-dialog);
  }

  html[data-desktop-layout="1"] [data-tournament-my-standing-layout="1"] {
    display: grid;
    grid-template-columns: 76px minmax(160px, 1fr) minmax(180px, 0.72fr) minmax(250px, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 18px;
    min-height: 82px;
  }

  html[data-desktop-layout="1"] [data-tournament-my-standing-rank="1"] {
    grid-column: 1;
    grid-row: 1;
    width: 72px;
    height: 72px;
    border-radius: var(--ui-radius-panel);
  }

  html[data-desktop-layout="1"] [data-tournament-my-standing-score="1"] {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"] [data-tournament-next-place="1"] {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
    padding-left: 18px;
    border-left: 1px solid var(--web-border-strong);
    font-size: 12px;
  }

  html[data-desktop-layout="1"] [data-tournament-my-prize="1"] {
    grid-column: 4;
    grid-row: 1;
    justify-content: end;
  }

  html[data-desktop-layout="1"] [data-tournament-my-prize-copy="1"] {
    display: block;
  }

  html[data-desktop-layout="1"] [data-tournament-my-prize-visual="1"] {
    width: 108px;
    height: 76px;
  }

  html[data-desktop-layout="1"] [data-tournament-leaderboard="1"] > :first-child {
    align-items: center;
  }

  html[data-desktop-layout="1"] [data-tournament-participant-count="1"] {
    padding: 7px 12px;
  }

  html[data-desktop-layout="1"] [data-tournament-table-head="1"] {
    display: grid;
    grid-template-columns: 72px minmax(0, 1.45fr) 120px minmax(220px, 0.9fr);
    align-items: center;
    gap: 16px;
    padding: 0 18px 4px;
    color: var(--web-text-tertiary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  html[data-desktop-layout="1"] [data-tournament-table-head="1"] > :last-child {
    text-align: center;
  }

  html[data-desktop-layout="1"] [data-tournament-leaderboard-row="1"] {
    padding: 9px 18px;
    box-shadow: none;
  }

  html[data-desktop-layout="1"]
    [data-tournament-leaderboard-row="1"][data-tournament-top-three="1"] {
    background: transparent;
  }

  html[data-desktop-layout="1"] [data-tournament-row-layout="1"] {
    display: grid;
    grid-template-columns: 72px minmax(0, 1.45fr) 120px minmax(220px, 0.9fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 16px;
  }

  html[data-desktop-layout="1"] [data-tournament-row-rank="1"] {
    grid-column: 1;
    grid-row: 1;
    width: 54px;
    height: 46px;
    font-size: 17px;
  }

  html[data-desktop-layout="1"] [data-tournament-row-player="1"] {
    grid-column: 2;
    grid-row: 1;
  }

  html[data-desktop-layout="1"] [data-tournament-row-player="1"] > :first-child {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  html[data-desktop-layout="1"] [data-tournament-row-player="1"] > :last-child {
    font-size: 15px;
  }

  html[data-desktop-layout="1"] [data-tournament-row-score="1"] {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--web-text-secondary);
  }

  html[data-desktop-layout="1"] [data-tournament-row-prize="1"] {
    grid-column: 4;
    grid-row: 1;
    justify-content: flex-end;
  }

  html[data-desktop-layout="1"] [data-tournament-row-prize-title="1"] {
    display: -webkit-box;
  }

  html[data-desktop-layout="1"] [data-tournament-row-prize-visual="1"] {
    width: 82px;
    height: 54px;
  }

  html[data-desktop-layout="1"] .bottom-nav-main[data-bottom-nav="1"] {
    position: fixed;
    inset: max(24px, var(--app-inset-top)) auto 24px
      max(
        var(--desktop-rail-edge, var(--desktop-gutter)),
        calc(50vw - var(--desktop-shell-half) + var(--desktop-rail-edge, var(--desktop-gutter)))
      );
    width: var(--desktop-rail-width);
    height: auto;
    padding-bottom: 0;
    justify-content: flex-start;
    overflow: visible;
    contain: layout style;
    transform: none;
    transition: opacity var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"] .bottom-nav-main[data-bottom-nav="1"] {
    --bottom-nav-force-translate: 0%;
    opacity: 1;
    visibility: visible;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-shell="1"] {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin-bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-home-logo="1"] {
    display: inline-flex;
    width: var(--desktop-logo-width);
    height: 40px;
    margin: 0 0 14px;
    flex: 0 0 auto;
    padding: 6px 0;
    opacity: 0.96;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-primary="1"] {
    width: 100%;
    height: auto;
    min-height: 0;
    flex: var(--desktop-nav-primary-flex, 1 1 auto);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    border: 0;
    border-radius: var(--web-radius-lg);
    background: var(--web-surface-base);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

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

  html[data-desktop-layout="1"]
    [data-bottom-nav-primary="1"]
    :is(
      .bottom-nav-glass__milk,
      .bottom-nav-glass__shade,
      .bottom-nav-glass__shine,
      .bottom-nav-glass__shadow
    ) {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-active-indicator="1"],
  html[data-desktop-layout="1"] .bottom-nav-underlay {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-grid="1"] {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, 44px);
    gap: 4px;
    padding: 4px;
  }

  html[data-desktop-layout="1"] a[data-bottom-nav-item] {
    width: 100%;
    height: var(--desktop-nav-item-height, 44px);
    border: 0;
    border-radius: var(--ui-radius-indicator);
    color: var(--web-text-secondary);
    font-size: 13px;
    transition:
      color var(--ui-motion-normal) var(--ui-motion-ease-standard),
      background-color var(--ui-motion-normal) var(--ui-motion-ease-standard),
      transform var(--ui-motion-normal) var(--ui-motion-ease-standard);
  }

  html[data-desktop-layout="1"] a[data-bottom-nav-item][aria-current="page"] {
    color: var(--web-text-primary);
    background: rgb(var(--ui-accent-rgb) / 0.095);
    box-shadow: inset 3px 0 0 rgb(var(--ui-accent-rgb) / 0.86);
  }

  html[data-desktop-layout="1"]
    a[data-bottom-nav-item][aria-current="page"]
    [data-bottom-nav-icon-layer="1"] {
    color: rgb(var(--ui-accent-rgb));
  }

  html[data-desktop-layout="1"] [data-desktop-nav-item="1"] {
    display: flex;
  }

  html[data-desktop-layout="1"] a[data-bottom-nav-item="friends"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tab-layer="1"] {
    width: 100%;
    flex-direction: var(--desktop-nav-direction, row);
    justify-content: flex-start;
    gap: 8px;
    padding: 0 8px;
    transform: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-icon-layer="1"] {
    width: 28px;
    flex: 0 0 28px;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-label="1"] {
    font-family: var(--ui-font-sans);
    font-size: 13px;
    font-weight: var(--ui-font-weight-medium);
    line-height: 1.08;
    letter-spacing: 0;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tournament="1"] {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin-top: 0;
    padding: 0 18px;
    justify-content: flex-start;
    gap: 12px;
    border: 0;
    border-radius: var(--ui-radius-indicator);
    color: var(--web-text-secondary);
    background: transparent;
  }

  html[data-desktop-layout="1"]
    [data-bottom-nav-tournament="1"]
    :is(
      .bottom-nav-glass__milk,
      .bottom-nav-glass__shade,
      .bottom-nav-glass__shine,
      .bottom-nav-glass__shadow,
      [data-bottom-nav-tournament-indicator="1"]
    ) {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tournament="1"][aria-current="page"] {
    color: var(--web-text-primary);
    background: rgb(var(--ui-accent-rgb) / 0.095);
    box-shadow: inset 3px 0 0 rgb(var(--ui-accent-rgb) / 0.86);
  }

  html[data-desktop-layout="1"] [data-bottom-nav-new-badge="1"] {
    display: none;
  }

  /* The rail uses the viewport height; only its route list may scroll. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-shell="1"] {
    overflow: visible;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-grid="1"] {
    display: flex;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: clamp(4px, calc(2vh - 12px), 12px);
    padding: 5px;
  }

  /* Cap list spacing, leaving excess height to the banner's auto margin.
     A short viewport still scrolls the list, never the entire rail. */
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-primary="1"] {
    --desktop-nav-primary-flex: 0 1 auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label] {
    display: block;
    margin: clamp(13px, 2vh, 24px) 10px 4px;
    color: var(--web-text-tertiary);
    font-size: 10px;
    font-weight: var(--ui-font-weight-bold);
    line-height: 1;
    letter-spacing: 0.075em;
    text-transform: uppercase;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label="play"] {
    margin-top: 7px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-item="contests"] {
    --bottom-nav-tournament-icon-size: var(--bottom-nav-icon-size, 19.95px);
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-tournament="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item] {
    position: relative;
    min-height: 42px;
    padding-inline: var(--desktop-nav-item-padding, 11px);
    transition:
      color var(--web-action-fast) var(--web-action-ease),
      background-color var(--web-action-fast) var(--web-action-ease);
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-desktop-game-nav-item="1"] {
    --desktop-nav-item-height: 36px;
    min-height: 36px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-desktop-game-nav-item="1"]
    [data-bottom-nav-icon-layer="1"] {
    width: 24px;
    flex-basis: 24px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item][aria-current="page"] {
    background: var(--ui-gradient-nav-active);
    box-shadow: inset 2px 0 0 rgb(var(--ui-accent-rgb) / 0.92);
  }

  /* The persistent desktop rail already communicates keyboard focus through
     its surface and leading marker. Avoid a large rounded focus outline that
     visually doubles the selected navigation item. */
  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item]:focus-visible {
    outline: none;
    outline-offset: 0;
    background: var(--web-surface-interactive);
    box-shadow: var(--ui-neutral-focus-edge);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-bottom-nav-item][aria-current="page"]:focus-visible {
    background: var(--ui-gradient-nav-active);
    box-shadow: var(--ui-neutral-focus-edge);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-bottom-nav-item]
    [data-bottom-nav-icon-layer="1"] {
    opacity: 0.78;
    transition:
      opacity var(--web-action-fast) var(--web-action-ease),
      color var(--web-action-fast) var(--web-action-ease);
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-bottom-nav-item]:is(:hover, [aria-current="page"])
    [data-bottom-nav-icon-layer="1"] {
    opacity: 1;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tournament="1"]::after {
    content: attr(aria-label);
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
  }

  html[data-desktop-layout="1"] .bottom-nav-up {
    --back-to-top-padding-bottom: 0px;
    --back-to-top-container-width: auto;
    --back-to-top-container-max-width: none;
    --back-to-top-margin-bottom: 0px;
    --back-to-top-hidden-extra: 32px;
    left: auto;
    right: var(--desktop-edge);
    bottom: 24px;
    width: auto;
    justify-content: flex-end;
  }

  html[data-desktop-layout="1"] [data-web-back-to-top="1"] {
    width: 44px;
    height: 44px;
    border: 1px solid var(--ui-border-subtle);
    border-radius: var(--ui-radius-control);
    color: var(--web-text-primary);
    background: var(--web-surface-raised);
    box-shadow: var(--web-card-shadow-hover);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  html[data-desktop-layout="1"] [data-web-back-to-top="1"]:hover {
    border-color: var(--ui-border-strong);
    background: var(--web-surface-hover);
  }

  html[data-desktop-layout="1"] [data-games-feature-grid="1"] {
    height: clamp(300px, calc(100dvh - 340px), 380px);
    gap: 10px;
  }

  html[data-desktop-layout="1"] [data-games-small-grid="1"] {
    margin-top: 10px;
    gap: 10px;
  }

  html[data-desktop-layout="1"] [data-games-small-grid="1"] > button {
    height: clamp(108px, 18dvh, 132px);
    aspect-ratio: auto;
  }

  html[data-desktop-layout="1"] [data-levels-daily-cases="true"] [data-level-daily-case] {
    height: clamp(176px, 20dvh, 206px);
  }

  html[data-desktop-layout="1"]
    [data-levels-daily-cases="true"]
    [data-level-daily-case-visual="true"] {
    height: clamp(118px, calc(20dvh - 58px), 148px);
  }

  html[data-desktop-layout="1"] [data-raffle-card="1"][data-raffle-card-variant="active"] {
    display: grid;
    grid-template-columns: minmax(230px, 0.78fr) minmax(390px, 1.22fr);
    align-items: stretch;
    gap: 24px;
    padding: 18px;
    border: 1px solid var(--web-border-hairline);
  }

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

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-visual="1"] {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 4px 12px 2px;
  }

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-prize-stack="1"] {
    position: absolute;
    top: 50%;
    left: 50%;
    justify-content: center;
    transform-origin: center;
    transform: translate(-50%, -50%);
  }

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

  html[data-desktop-layout="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.52;
  }

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

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-prize-item="1"] {
    --raffle-prize-scale: 0.5673758865;
  }

  html[data-desktop-layout="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;
    gap: 12px;
    padding: 6px 0;
  }

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

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-card-status="1"]
    > div {
    padding: 9px 14px;
    font-size: 12px;
  }

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

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-stat="1"] {
    display: flex;
    min-height: 74px;
    flex-direction: column;
    justify-content: center;
    padding: 11px 14px;
    border-radius: var(--ui-radius-card);
  }

  html[data-desktop-layout="1"]
    [data-raffle-card="1"][data-raffle-card-variant="active"]
    [data-raffle-stat="1"]
    > :first-child {
    font-size: 11px;
  }

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

  @keyframes desktop-dialog-enter {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.975);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes desktop-dialog-exit {
    from {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    to {
      opacity: 0;
      transform: translateY(6px) scale(0.985);
    }
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-positioner="1"] {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-motion="1"] {
    width: min(var(--web-dialog-default), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-dialog-default);
    margin: 0;
    transform: none;
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-bottom-sheet-phase="opening"]
    [data-bottom-sheet-motion="1"]
    > div {
    animation-name: desktop-dialog-enter;
    animation-duration: var(--ui-motion-normal);
    animation-timing-function: var(--ui-motion-ease-emphasized);
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-bottom-sheet-phase="closing"]
    [data-bottom-sheet-motion="1"]
    > div {
    animation-name: desktop-dialog-exit;
    animation-duration: var(--ui-motion-fast);
    animation-timing-function: var(--ui-motion-ease-exit);
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-motion="1"] > div {
    max-height: min(80dvh, 760px);
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-panel="1"] {
    background-position: 0 0;
    background-size: auto;
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-handle="1"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-header="1"] {
    min-height: 68px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--web-border);
  }

  html[data-desktop-layout="1"] [data-bottom-sheet-header="1"] > div {
    font-size: 20px;
  }

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

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

  html[data-desktop-layout="1"] [data-bottom-sheet-footer="1"] {
    margin-top: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--web-border);
    background: var(--ui-dialog-surface);
  }

  @keyframes desktop-drawer-enter {
    from {
      opacity: 0;
      transform: translateX(28px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes desktop-drawer-exit {
    from {
      opacity: 1;
      transform: translateX(0);
    }
    to {
      opacity: 0;
      transform: translateX(22px);
    }
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-positioner="1"] {
    align-items: stretch;
    justify-content: flex-end;
    padding: 18px;
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-motion="1"] {
    width: min(var(--web-drawer-width), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-drawer-width);
    height: calc(100dvh - 36px);
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-motion="1"]
    > div {
    height: 100%;
    max-height: none;
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"]
    [data-bottom-sheet-panel="1"] {
    height: 100%;
    border-radius: var(--ui-radius-panel);
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"][data-bottom-sheet-phase="opening"]
    [data-bottom-sheet-motion="1"]
    > div {
    animation-name: desktop-drawer-enter;
  }

  html[data-desktop-layout="1"]
    [data-bottom-sheet-overlay="1"][data-desktop-presentation="drawer"][data-bottom-sheet-phase="closing"]
    [data-bottom-sheet-motion="1"]
    > div {
    animation-name: desktop-drawer-exit;
  }

  html[data-desktop-layout="1"] [data-modal-content="1"] {
    width: min(var(--web-field-max), calc(100vw - var(--web-dialog-gutter)));
    max-width: var(--web-field-max);
    padding-left: 0;
    padding-right: 0;
  }
}

/* Native 4K keeps the persistent application chrome proportional to the
   enlarged workspace. Values are capped at this tier rather than growing
   continuously with the viewport. */
@media (min-width: 3000px) and (min-height: 1600px) {
  html[data-desktop-layout="1"][data-standalone="1"] .bottom-nav-main[data-bottom-nav="1"] {
    inset-block: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-app-shell="1"] > .app-static-bg {
    width: 100vw;
    height: 100lvh;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-home-logo="1"] {
    height: 56px;
    margin-bottom: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-grid="1"] {
    padding: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label] {
    margin: 24px 14px 6px;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label="play"] {
    margin-top: 9px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item] {
    --desktop-nav-item-height: 52px;
    min-height: 52px;
    padding-inline: 14px;
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-desktop-game-nav-item="1"] {
    --desktop-nav-item-height: 48px;
    min-height: 48px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-tab-layer="1"] {
    gap: 12px;
    padding-inline: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-icon-layer="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-desktop-game-nav-item="1"]
    [data-bottom-nav-icon-layer="1"] {
    width: 32px;
    flex-basis: 32px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-label="1"] {
    font-size: 16px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-root="1"] {
    min-height: 64px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] {
    height: 44px;
    gap: 10px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] > svg {
    width: 20px;
    height: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back-label="1"] {
    font-size: 16px;
  }
}

@media screen and (max-width: 1199px) {
  html[data-desktop-layout="1"] [data-bottom-nav-home-logo="1"] {
    width: var(--desktop-logo-width);
    height: 52px;
    margin-inline: auto;
    padding: 4px;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-home-logo-full="1"] {
    display: block;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-home-logo-compact="1"] {
    display: none;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tab-layer="1"] {
    justify-content: var(--desktop-nav-align, flex-start);
    padding-inline: var(--desktop-nav-item-padding, 8px);
  }

  html[data-desktop-layout="1"] [data-bottom-nav-icon-layer="1"] {
    width: 30px;
    flex-basis: 30px;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-label="1"] {
    display: block;
  }

  html[data-desktop-layout="1"] [data-bottom-nav-tournament="1"] {
    align-self: stretch;
  }
}

@media screen and (max-width: 599px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-topbar-back="1"] {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

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

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-title-stack="1"] {
    max-width: calc(100% - 80px);
  }

  html[data-desktop-layout="1"][data-desktop-chrome="1"]
    [data-topbar-root="1"][data-topbar-has-middle="1"][data-topbar-has-context="1"]
    [data-topbar-title="1"] {
    font-size: 16px;
  }
}

@media screen and (hover: hover) {
  html[data-desktop-layout="1"] :is(a[data-bottom-nav-item], [data-bottom-nav-tournament="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"] a[data-bottom-nav-item]:hover {
    color: var(--web-text-primary);
    background: var(--web-surface-soft);
    transform: none;
  }

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

@media (min-width: 1800px) {
  html[data-desktop-layout="1"][data-desktop-chrome="1"] [data-topbar-title="1"] {
    font-size: 26px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-label="1"] {
    font-size: 14px;
  }
}

/* Source section: 02-secondary-pages.css */
/* Remaining content pages that still used a stretched mobile composition. */
@media screen {
  html[data-desktop-layout="1"] [data-settings-page="1"] {
    display: grid;
    width: min(100%, 980px);
    max-width: 980px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }

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

  html[data-desktop-layout="1"] [data-settings-primary="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"] [data-settings-preferences="1"] {
    min-width: 0;
    overflow: hidden;
  }

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

  html[data-desktop-layout="1"] [data-achievement-card] {
    contain-intrinsic-size: 0 204px;
  }

  html[data-desktop-layout="1"] [data-achievement-image="1"] {
    height: 68px;
    margin-top: 6px;
  }

  html[data-desktop-layout="1"] [data-achievement-copy="1"] {
    margin-top: 6px;
  }

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

  html[data-desktop-layout="1"] [data-tasks-section] > :first-child,
  html[data-desktop-layout="1"] [data-tasks-section] > .text-center {
    grid-column: 1 / -1;
  }

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

@media screen and (hover: hover) {
  html[data-desktop-layout="1"] [data-cases-grid="1"] > *,
  html[data-desktop-layout="1"] [data-inventory-grid="1"] > * {
    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-cases-grid="1"] > *:hover,
  html[data-desktop-layout="1"] [data-inventory-grid="1"] > *:hover {
    transform: translateY(-2px);
    filter: var(--ui-effect-hover-brightness);
  }
}

/* Standalone desktop pages that do not use the authenticated application chrome. */
@media screen {
  html[data-desktop-layout="1"] [data-pay-cards-layout="1"] {
    max-width: 1040px;
    padding-top: 24px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-scroll="1"] {
    padding-inline: 24px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-header="1"] {
    min-height: 48px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-header="1"] img {
    width: 174px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-heading="1"] {
    margin: 12px 0 24px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-heading="1"] h1 {
    font-size: 30px;
    line-height: 1.2;
  }

  html[data-desktop-layout="1"] [data-pay-cards-heading="1"] p {
    max-width: 640px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--web-text-muted);
  }

  html[data-desktop-layout="1"] [data-pay-cards-form="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
  }

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

  html[data-desktop-layout="1"] [data-pay-cards-column] {
    padding: 24px;
    border-radius: var(--ui-radius-panel);
    background: var(--web-surface-base);
    box-shadow: none;
  }

  html[data-desktop-layout="1"] [data-pay-cards-section="amount"] {
    margin-top: 24px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-label="1"] {
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    color: var(--web-text-primary);
  }

  html[data-desktop-layout="1"] [data-pay-cards-login-field="1"] {
    min-height: 48px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"] #pay-cards-username {
    font-size: 16px;
    line-height: 1.5;
  }

  html[data-desktop-layout="1"] [data-pay-cards-amount-field="1"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-amount-value="1"] {
    min-height: 56px;
    padding: 12px 14px;
    border-radius: var(--ui-radius-control);
  }

  html[data-desktop-layout="1"] #pay-cards-amount {
    font-size: 24px;
    line-height: 1.25;
  }

  html[data-desktop-layout="1"] [data-pay-cards-presets="1"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-presets="1"] button {
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding-inline: 6px;
    gap: 4px;
    border-radius: var(--ui-radius-control-sm);
    font-size: 13px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    height: auto;
    min-height: 60px;
    padding: 12px;
    border-radius: var(--ui-radius-control);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] button:not([aria-pressed="true"]) {
    background: var(--web-surface-quiet);
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] button[aria-pressed="true"] {
    background: rgb(var(--ui-accent-rgb) / 0.12);
    color: var(--ui-accent);
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] [data-topup-card-method-icon="1"],
  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] svg {
    width: 24px;
    height: 24px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-method-options="1"] button > span:first-child {
    flex-shrink: 0;
  }

  html[data-desktop-layout="1"] [data-pay-cards-submit="1"] {
    width: 100%;
    margin-top: 20px;
    min-height: 48px;
    height: auto;
    padding: 12px 16px;
    border-radius: var(--ui-radius-control);
    font-size: 16px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-error="1"] {
    margin-top: 12px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-result-layout="1"] {
    max-width: 720px;
    padding-top: 32px;
  }

  html[data-desktop-layout="1"] [data-referral-welcome-layout="1"] {
    display: grid;
    width: min(100%, 940px);
    max-width: 940px;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    grid-template-areas:
      "copy visual"
      "action visual";
    align-content: center;
    align-items: center;
    column-gap: 54px;
    padding-block: 32px;
  }

  html[data-desktop-layout="1"] [data-referral-welcome-copy="1"] {
    grid-area: copy;
    align-self: end;
    padding-top: 0;
  }

  html[data-desktop-layout="1"] [data-referral-welcome-visual="1"] {
    grid-area: visual;
    width: 440px;
    height: 440px;
    margin: 0;
  }

  html[data-desktop-layout="1"] [data-referral-welcome-action="1"] {
    grid-area: action;
    align-self: start;
    width: min(360px, 100%);
    margin: 30px auto 0;
  }
}

@media screen and (max-width: 740px) {
  html[data-desktop-layout="1"] [data-pay-cards-form="1"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-scroll="1"] {
    padding-inline: 16px;
  }

  html[data-desktop-layout="1"] [data-pay-cards-column] {
    padding: 16px;
  }
}

/* Source section: 03-referrals-and-profile.css */
/* Referral dashboard: summary and invitation tools share the first viewport. */
@media screen {
  html[data-desktop-layout="1"] [data-referrals-page="1"] {
    width: min(100%, 1080px);
  }

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

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

  html[data-desktop-layout="1"] [data-referrals-summary-card="1"] > *,
  html[data-desktop-layout="1"] [data-referrals-invite-card="1"] > * {
    height: 100%;
  }

  html[data-desktop-layout="1"] [data-referrals-metrics="1"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-desktop-layout="1"] [data-referrals-overview="1"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 18px;
  }

  html[data-desktop-layout="1"] [data-referrals-levels-card="1"] {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"] [data-referrals-level-grid="1"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  html[data-desktop-layout="1"] [data-referrals-stats-header="1"],
  html[data-desktop-layout="1"] [data-referrals-stats-row="1"] {
    display: grid;
    align-items: center;
    column-gap: 18px;
  }

  html[data-desktop-layout="1"] [data-referrals-stats-row="1"] > :nth-child(2) {
    text-align: left;
  }
}

/* Profile dashboard: keep identity compact and use the wide desktop column for status. */
@media screen {
  html[data-desktop-layout="1"] [data-profile-dashboard="1"] {
    display: grid;
    align-items: stretch;
  }

  html[data-desktop-layout="1"] [data-profile-identity-column="1"],
  html[data-desktop-layout="1"] [data-profile-status-column="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"] [data-profile-card="compact"] {
    box-sizing: border-box;
    display: flex;
    height: 100%;
    flex-direction: column;
  }

  html[data-desktop-layout="1"] [data-profile-status-column="1"] {
    display: flex;
    flex-direction: column;
  }

  html[data-desktop-layout="1"] [data-profile-status-column="1"] > [data-profile-level-card] {
    flex: 1 1 auto;
  }

  html[data-desktop-layout="1"] [data-profile-status-column="1"] > [data-steam-trade-link-card] {
    flex: 0 0 auto;
  }

  html[data-desktop-layout="1"] [data-profile-inventory="1"] {
    margin-top: 14px;
  }

  html[data-desktop-layout="1"]
    [data-profile-inventory="1"]
    [data-inventory-page-content="1"]
    > :not([hidden])
    ~ :not([hidden]) {
    margin-top: 10px;
  }

  html[data-desktop-layout="1"] [data-profile-inventory="1"] [data-inventory-tabs="1"] {
    height: 46px;
  }

  html[data-desktop-layout="1"] [data-profile-inventory="1"] [data-inventory-browse-controls="1"] {
    gap: 10px;
  }
}
/* Keep the desktop rail fully visible on shorter browser windows. The list
   progressively tightens its vertical rhythm before falling back to an
   invisible, still keyboard- and wheel-accessible overflow area. */
@media screen and (max-height: 940px) {
  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-shell="1"] {
    gap: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-home-logo="1"] {
    height: 34px;
    margin-bottom: 6px;
    padding-block: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-grid="1"] {
    gap: clamp(2px, calc(2vh - 12px), 6px);
    padding: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label] {
    margin: clamp(7px, calc(2vh - 8px), 12px) 9px 2px;
    font-size: 9px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label="play"] {
    margin-top: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item] {
    --desktop-nav-item-height: 34px;
    min-height: 34px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-desktop-game-nav-item="1"] {
    --desktop-nav-item-height: 30px;
    min-height: 30px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-tab-layer="1"] {
    gap: 6px;
    padding-inline: 6px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-icon-layer="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-desktop-game-nav-item="1"]
    [data-bottom-nav-icon-layer="1"] {
    width: 22px;
    flex-basis: 22px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-label="1"] {
    font-size: 12px;
  }
}

/* Keep every route directly visible when the enabled game list is long or
   the browser is short. Game links share rows first; the other sections keep
   their familiar full-width layout until vertical space is truly tight. */
@media screen and (max-height: 1100px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    gap: clamp(1px, calc(2vh - 12px), 10px) 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    :is([data-desktop-nav-group-label], a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"])) {
    grid-column: 1 / -1;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"] a[data-bottom-nav-item],
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"] [data-bottom-nav-tab-layer="1"] {
    min-width: 0;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-desktop-game-nav-item="1"] [data-bottom-nav-icon-layer="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-desktop-game-nav-item="1"] [data-bottom-nav-tab-layer="1"] {
    justify-content: center;
    padding-inline: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-desktop-game-nav-item="1"] [data-bottom-nav-label="1"] {
    text-align: center;
    font-size: 12px;
  }
}

@media screen and (max-height: 720px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) {
    grid-column: auto;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) [data-bottom-nav-icon-layer="1"] {
    display: none;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) [data-bottom-nav-tab-layer="1"] {
    justify-content: center;
    padding-inline: 3px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) [data-bottom-nav-label="1"] {
    text-align: center;
    font-size: 12px;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    .bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
  }
}

/* The 192px tablet rail cannot carry two readable text columns. Keep the
   routes directly accessible as labelled icon buttons instead of ellipses. */
@media screen and (max-width: 1023px) and (max-height: 1100px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-desktop-game-nav-item="1"] [data-bottom-nav-icon-layer="1"] {
    display: flex;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-desktop-game-nav-item="1"] [data-bottom-nav-label="1"] {
    display: none;
  }
}

@media screen and (max-width: 1023px) and (max-height: 720px) {
  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) [data-bottom-nav-icon-layer="1"] {
    display: flex;
  }

  html[data-desktop-layout="1"][data-standalone="1"]
    [data-bottom-nav-grid="1"][data-desktop-nav-many-games="1"]
    a[data-bottom-nav-item]:not([data-desktop-game-nav-item="1"]) [data-bottom-nav-label="1"] {
    display: none;
  }
}

@media screen and (max-height: 640px) {
  html[data-desktop-layout="1"][data-standalone="1"] .bottom-nav-main[data-bottom-nav="1"] {
    top: max(8px, var(--app-inset-top));
    bottom: 8px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-shell="1"] {
    gap: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-home-logo="1"] {
    height: 28px;
    margin-bottom: 2px;
    padding-block: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-grid="1"] {
    gap: 0;
    padding: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label] {
    margin: 4px 7px 1px;
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-desktop-nav-group-label="play"] {
    margin-top: 2px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-bottom-nav-item] {
    --desktop-nav-item-height: 29px;
    min-height: 29px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] a[data-desktop-game-nav-item="1"] {
    --desktop-nav-item-height: 26px;
    min-height: 26px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-tab-layer="1"] {
    gap: 4px;
    padding-inline: 4px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-icon-layer="1"],
  html[data-desktop-layout="1"][data-standalone="1"]
    a[data-desktop-game-nav-item="1"]
    [data-bottom-nav-icon-layer="1"] {
    width: 20px;
    flex-basis: 20px;
  }

  html[data-desktop-layout="1"][data-standalone="1"] [data-bottom-nav-label="1"] {
    font-size: 11px;
  }
}
}
