/* ===============================================
   PHONE FRAME - the same rules on every game page, on a phone (768px and less)
     1. the page title is fixed and always on ONE line (the size follows the width of the screen)
     2. the game steps and the guide boxes under it are fixed too (they are outside the scroll area)
     3. only the rest of the page scrolls, with the same thin scroll bar everywhere (the colour of the game, see Game-Accent.css)
     4. the main picture of the game (the 6 x 5 slot box, the 3 x 3 or 3 x 2 cards) is made to fit the room that is left,
        so it shows complete in one frame; the things under it (bet slips, trust box) scroll
   Loaded AFTER the page's own CSS and after Game-Accent.css. Looks only. To go back, remove this one <link> from the page.
   =============================================== */

@media (max-width: 768px) {

  /* ---------- the space between the title, the steps, the guide and the play area is small and the same everywhere ---------- */
  main[class$="-body"] {
    gap: 10px;
  }

  /* ---------- a page with a Fix & Next button: room under it, so the button never sits on the footer line ---------- */
  main[class$="-body"]:has([class*="fix-btn"]) {
    padding-bottom: 34px;
  }

  /* ---------- 1. the title: one line ---------- */
  main[class$="-body"] h1:not(.rt-title) {
    font-size: min(30px, calc((100vw - 42px) / 11.8));
    white-space: nowrap;
    overflow: visible;
  }

  /* ---------- 4. the slot box fits the room (width and height), always complete ---------- */
  .dr-scroll-wrap:has(.ss-stage) {
    container-type: size;
  }

  .dr-scroll-wrap .ss-stage {
    flex: 0 0 auto;
    width: 100%;
    height: min(100cqh, calc(100cqw * 1140 / 1300));
  }

  /* ---------- 4. the cards fit the room: 3 rows in the height that is left ---------- */
  .cf-scroll-wrap {
    container-type: size;
  }

  .cf-scroll-col {
    --cf-cell: min(104px, calc((100vw - 66px) / 3), calc((100cqh - 48px) / 3));
    gap: 8px;
  }

  /* ---------- coin prediction pages: the scroll bar sits at the right side of the page like on the other pages
                 (it was glued to the coin boxes in the middle) ---------- */
  .cp-scroll-inner,
  .c6-scroll-inner {
    width: 100%;
  }

  .cp-scroll-wrap,
  .c6-scroll-wrap {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  /* ---------- Coin-6: 6 coins in 3 lines, 2 coins in each line, sized to the room that is left ---------- */
  .c6-scroll-wrap {
    container-type: size;
  }

  .c6-scroll-col {
    padding: 10px 0;
  }

  .c6-coins-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
  }

  .c6-coin-card {
    width: 100%;
    height: clamp(84px, calc((100cqh - 40px) / 3), 120px);
    padding: 0 10px;
    justify-content: space-evenly;
  }

  .c6-coin-icon {
    width: 56px;
    height: 56px;
  }

  .c6-coin-num {
    font-size: 32px;
  }

  /* the empty status line and the extra bottom space are given back to the cards */
  .cf-status:empty {
    display: none;
  }

  .cf-content {
    padding-bottom: 6px;
  }
}
