/* v1.4.31.8-RC1 — isolated presentation corrections. */

/* Homepage: the hero now has its own landscape composition; the lower heroes section stays unchanged. */
.rs-home-hero-card__image-wrap .rs14313-picture {
  display: block;
  width: 100%;
}

.rs-home-hero-card__image--family {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  object-fit: cover;
  object-position: center;
}

/* The historical 720px minimum is explicitly cancelled for the parent history cards. */
@media (max-width: 760px) {
  .rs14317-parent-dashboard .rs1324-history,
  .rs14317-parent-dashboard .rs14317-history-wrap,
  .rs14317-parent-dashboard .rs14317-history-table,
  .rs14317-parent-dashboard .rs14317-history-table tbody,
  .rs14317-parent-dashboard .rs14317-history-table tr,
  .rs14317-parent-dashboard .rs14317-history-table td {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .rs14317-parent-dashboard .rs1324-history {
    overflow: hidden !important;
    padding-inline: clamp(14px, 4vw, 22px) !important;
  }

  .rs14317-parent-dashboard .rs14317-history-table tbody td {
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr) !important;
  }

  .rs14317-parent-dashboard .rs14317-history-table tbody td:not(:last-child) {
    overflow: hidden;
  }

  .rs14317-parent-dashboard .rs14317-history-table tbody td:last-child {
    overflow: visible !important;
  }

  .rs14317-parent-dashboard .rs14317-history-table .button,
  .rs14317-parent-dashboard .rs14317-history-table a.button {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 48px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 11px 16px !important;
    overflow: visible !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-align: center !important;
    text-indent: 0 !important;
    white-space: normal !important;
    font-size: .96rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
  }
}

@media (max-width: 360px) {
  .rs14317-parent-dashboard .rs14317-history-table tbody td {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
  }
}

/* Arena game: board width is based on its content column, not on the viewport. */
.rs-game-live-layout > div:first-child {
  min-width: 0;
}

.rs-game-live .rs-live-board-wrap {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  margin-inline: auto !important;
}

@media (max-width: 900px) {
  .rs-game-live {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(12px, 4vw, 22px);
    overflow: hidden;
    box-sizing: border-box;
  }

  .rs-game-live-layout,
  .rs-game-live-layout > div:first-child {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .rs-game-live .rs-live-board-wrap {
    width: min(100%, 560px) !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box !important;
  }

  .rs-game-live-status,
  .rs-game-engine-status {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .rs-game-actions {
    width: min(100%, 560px);
    margin-inline: auto;
  }

  .rs-game-actions .rs-btn {
    flex: 1 1 100%;
    width: 100%;
    min-height: 48px;
    justify-content: center;
    text-align: center;
  }
}
