.mobileGameNavigation { display: none; }
@media (max-width: 760px) {
  /* Leave vertical scrolling available on short screens and with enlarged text. */
  #root section.page.gamesPage, #root section.page.detail {
    margin-top: 8px !important;
    padding: 8px 12px 16px !important;
    max-width: 440px !important;
    width: 100%;
    min-width: 0;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .gamesPage .pageTitle { margin: 0 0 8px !important; padding: 0 !important; text-align: center; }
  .gamesPage .pageTitle .eyebrow { display: none; }
  .gamesPage .pageTitle h1 { font-size: 25px !important; line-height: 1.1; margin: 0 0 5px !important; }
  .gamesPage .pageTitle p { font-size: 12px !important; line-height: 1.35 !important; margin: 0 !important; white-space: normal !important; }
  .gamesPage .gameGrid {
    display: flex !important;
    align-items: flex-start;
    gap: 12px !important;
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .gamesPage .gameGrid::-webkit-scrollbar { display: none; }
  .gamesPage .gameGrid > .gameCard.gameAccessCard {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px !important;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia > div {
    flex: 0 0 auto;
    width: clamp(60px, 12svh, 90px) !important;
    height: clamp(60px, 12svh, 90px) !important;
    aspect-ratio: 1 !important;
    border-radius: 6px;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia img { object-fit: contain !important; }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia h3 {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 21px !important;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .gamesPage .gameCardMedia i { display: none !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccessControls { padding: 8px 12px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine {
    padding: 6px 8px !important;
    margin-bottom: 5px !important;
    gap: 4px !important;
  }
  .gamesPage .gameCard.gameAccessCard .accountReady {
    margin: 0 !important;
    font-size: 14px !important;
    gap: 6px !important;
  }
  .gamesPage .gameCard.gameAccessCard .gameActionRow { padding: 6px !important; gap: 2px !important; }
  .gamesPage .gameCard.gameAccessCard .miniBtn.detailActionButton,
  .detail .gameDetailActionPanel > .detailActionButton {
    width: min(100%, clamp(200px, 36svh, 280px)) !important;
    aspect-ratio: 4 / 1 !important;
    height: auto !important;
    min-height: 44px !important;
    flex-shrink: 0;
    margin: 0 auto !important;
  }
  .gamesPage .copyAccount, .detail .copyAccount {
    min-height: 32px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
  .mobileGameNavigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: #f6d87d;
    font-size: 13px;
  }
  .mobileGameNavigation button {
    min-height: 44px;
    padding: 8px 16px;
    background: #11130f;
    color: #f6d87d;
    border: 1px solid #806820;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .mobileGameNavigation button:disabled { opacity: .4; cursor: default; }
  .mobileGameNavigation button:focus-visible { outline: 2px solid #f6d87d; outline-offset: 2px; }
  .detail .detailImage {
    width: clamp(70px, 13svh, 110px) !important;
    margin: 0 auto 8px !important;
  }
  .detail .detailImage img { object-fit: contain; border-radius: 6px; }
  .detail .detailAccountBox {
    gap: 3px !important;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    max-width: 340px;
  }
  .detail .detailPasswordLabel { margin-top: 4px !important; }
  .detail .detailAccountBox .accountReady, .detail .detailAccountBox .accountPending {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.3;
  }
  .detail .gameDetailActionPanel { max-width: 340px; padding: 8px !important; gap: 2px; margin-bottom: 8px !important; }
  .detail .partner { max-width: 340px; font-size: 12px !important; line-height: 1.4 !important; margin: 4px auto 0 !important; }
  .gamesPage .notice, .gamesPage .error, .detail .notice, .detail .error { font-size: 13px; padding: 8px; margin: 6px 0; }
}
@media (max-width: 760px) {
  body:has(.gamesPage, .detail) header { height: 72px !important; }
  body:has(.gamesPage, .detail) header .brand {
    width: 100px !important;
    height: 72px !important;
    margin-top: 0 !important;
    align-self: center !important;
  }
  body:has(.gamesPage, .detail) header .brand img {
    width: 100px !important;
    height: 82px !important;
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine {
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine:has(.requestGameIdBtn),
  .gamesPage .gameCard.gameAccessCard .gameAccountLine:has(.miniBtn.request) { grid-template-columns: 1fr; }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine b,
  .detail .detailAccountBox b { font-size: 10px !important; line-height: 1.2; }
  .gamesPage .gameCard.gameAccessCard .accountReady,
  .detail .detailAccountBox .accountReady {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
    padding: 0 !important;
    min-height: 32px !important;
    background: transparent !important;
    border: 0 !important;
  }
  .detail .detailAccountBox { grid-template-columns: 78px minmax(0, 1fr); align-items: center; }
  .detail .detailPasswordLabel { margin: 0 !important; }
  .gamesPage .copyAccount, .detail .copyAccount { margin-left: 0 !important; }
}
.mobileGameHint { display: none; }
@media (max-width: 760px) {
  .gamesPage .pageTitle p:not(.mobileGameHint) { display: none; }
  .gamesPage .pageTitle .mobileGameHint { display: block; font-size: 11px !important; line-height: 1.3 !important; }
  .mobileGameNavigation button {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia { padding: 6px !important; }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia > div {
    width: clamp(56px, 10svh, 76px) !important;
    height: clamp(56px, 10svh, 76px) !important;
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine { padding: 2px 6px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccessControls { padding: 4px 10px !important; }
}

/* Mobile game layout: full-width controls below a centered game identity. */
@media (max-width: 760px) {
  #root section.page.gamesPage, #root section.page.detail {
    padding: 8px 10px 18px !important;
    background: #050605 !important;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    padding: 12px 10px 10px !important;
    gap: 8px;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia > div,
  .detail .detailImage {
    width: clamp(88px, 16svh, 144px) !important;
    height: clamp(88px, 16svh, 144px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  .detail .detailImage { margin-bottom: 8px !important; }
  .detail .detailImage img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    aspect-ratio: 1 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia h3,
  .detail h1 {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    font-size: clamp(19px, 6vw, 25px) !important;
    line-height: 1.12 !important;
    text-align: center;
    color: #f6d87d;
    overflow-wrap: anywhere;
  }
  .detail h1 { order: -1; margin-bottom: 12px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccessControls { padding: 8px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine,
  .detail .detailAccountBox {
    display: grid !important;
    grid-template-columns: minmax(74px, 31%) minmax(0, 1fr);
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 6px 8px !important;
    gap: 4px 8px !important;
    box-sizing: border-box;
    background: #11130f !important;
    border: 1px solid #383324 !important;
    border-radius: 6px;
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine:has(+ .passwordLine) {
    border-bottom: 0 !important;
    border-radius: 6px 6px 0 0;
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine.passwordLine {
    border-top-color: #302e24 !important;
    border-radius: 0 0 6px 6px;
  }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine b,
  .detail .detailAccountBox b {
    min-width: 0;
    margin: 0 !important;
    font-size: clamp(9px, 2.5vw, 11px) !important;
    letter-spacing: .03em !important;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .gamesPage .gameCard.gameAccessCard .accountReady,
  .detail .detailAccountBox .accountReady {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: clamp(11px, 3.2vw, 14px) !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .gamesPage .copyAccount, .detail .copyAccount {
    grid-column: 2;
    grid-row: 1;
    min-height: 32px !important;
    min-width: 42px;
    margin: 0 !important;
    padding: 6px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap;
  }
  .gamesPage .gameCard.gameAccessCard .accountPending,
  .detail .detailAccountBox .accountPending {
    min-width: 0;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 6px !important;
    font-size: 12px !important;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .detail .detailPasswordLabel,
  .detail .detailPasswordLabel + span {
    border-top: 1px solid #302e24 !important;
    padding-top: 6px !important;
  }
  .gamesPage .gameCard.gameAccessCard .gameActionRow,
  .detail .gameDetailActionPanel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px auto 0 !important;
    padding: 6px !important;
    box-sizing: border-box;
    gap: 2px !important;
  }
  .gamesPage .gameCard.gameAccessCard .miniBtn.detailActionButton,
  .detail .gameDetailActionPanel > .detailActionButton {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 44px !important;
    height: auto !important;
    aspect-ratio: 4 / 1 !important;
    margin: 0 !important;
  }
  .detail .partner {
    width: 100%;
    max-width: 100%;
    margin: 10px auto 0 !important;
    padding: 0 6px;
    font-size: 11px !important;
    line-height: 1.4 !important;
    text-align: center;
    box-sizing: border-box;
  }
}
/* The games are standalone screens; the menu provides site navigation. */
body:has(.gamesPage, .detail) footer,
body:has(.gamesPage, .detail) .floatingHome { display: none !important; }
body:has(.gamesPage, .detail) main { padding-bottom: 0 !important; margin-bottom: 0 !important; }
@media (max-width: 760px) {
  #root section.page.gamesPage, #root section.page.detail { min-height: 0 !important; }
  body:has(.gamesPage, .detail) { min-height: 100svh; }
}
/* Compact the game itself on shorter phones instead of clipping the controls. */
@media (max-width: 760px) and (max-height: 740px) {
  body:has(.gamesPage, .detail) header { height: 60px !important; }
  body:has(.gamesPage, .detail) header .brand { height: 60px !important; }
  body:has(.gamesPage, .detail) header .brand img { height: 66px !important; }
  #root section.page.gamesPage, #root section.page.detail { margin-top: 0 !important; padding-top: 4px !important; padding-bottom: 8px !important; }
  .gamesPage .pageTitle { margin-bottom: 4px !important; }
  .gamesPage .pageTitle h1 { font-size: 21px !important; margin-bottom: 0 !important; }
  .gamesPage .pageTitle .mobileGameHint { display: none; }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia { min-height: 0; padding: 6px !important; gap: 4px; }
  .gamesPage .gameCard.gameAccessCard > .gameCardMedia h3,
  .detail h1 { font-size: 18px !important; }
  .detail h1 { margin-bottom: 6px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccessControls { padding: 4px 8px !important; }
  .gamesPage .gameCard.gameAccessCard .gameAccountLine,
  .detail .detailAccountBox { padding: 3px 6px !important; }
  .gamesPage .gameCard.gameAccessCard .gameActionRow,
  .detail .gameDetailActionPanel { margin-top: 4px !important; padding: 4px !important; }
  .gamesPage .gameCard.gameAccessCard .miniBtn.detailActionButton,
  .detail .gameDetailActionPanel > .detailActionButton { width: min(100%, 250px) !important; margin: 0 auto !important; }
  .detail .partner { margin-top: 6px !important; font-size: 10px !important; }
  .mobileGameNavigation { margin-top: 4px; }
}
