.games-page .games-hero .hero-grid {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  padding-bottom: 12px
}

.games-page .games-hero h1 {
  font-size: 37px
}

.games-hero-art {
  width: 210px;
  height: 195px;
  position: relative;
  transform: rotate(6deg)
}

.hero-game-tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: 79px;
  height: 79px;
  border: 1px solid #ffffffb0;
  border-radius: 20px;
  box-shadow: 0 8px 20px #69438b12
}

.hero-game-tile .icon {
  width: 37px;
  height: 37px;
  stroke-width: 1.5
}

.hero-slot-tile {
  left: 15px;
  top: 9px;
  background: linear-gradient(140deg, #fff2fa, #f8dbe9);
  color: #bb4386;
  transform: rotate(-10deg)
}

.hero-fish-tile {
  right: 13px;
  top: 15px;
  background: linear-gradient(140deg, #f2f8ff, #d8e8ff);
  color: #4473bf;
  transform: rotate(7deg)
}

.hero-cards-tile {
  left: 19px;
  bottom: 15px;
  background: linear-gradient(140deg, #f4edff, #e5d7fc);
  color: #8553c6;
  transform: rotate(2deg)
}

.hero-controller-tile {
  right: 10px;
  bottom: 8px;
  background: linear-gradient(140deg, #fff9ed, #f5e5c9);
  color: #ae7c2e;
  transform: rotate(-8deg)
}

.games-page .content-layout {
  display: block;
  padding-top: 30px
}

.games-page .main-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0
}

.games-page .games-library-section {
  min-width: 0;
  scroll-margin-top: 24px
}

.games-page .browse-intro {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px
}

.games-browser-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5deef;
  border-radius: 12px;
  margin-bottom: 25px
}

.game-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  min-width: 0;
  border: 1px solid #e3daee;
  background: #fbf9fe;
  border-radius: 8px;
  padding: 0 12px
}

.game-search-field>span {
  display: flex;
  color: #8a70a1
}

.game-search-field .icon {
  width: 19px;
  height: 19px
}

.game-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 12px 0;
  min-height: 46px
}

.game-search-field:focus-within {
  outline: 3px solid #c4ace84d;
  border-color: #a78bce
}

.game-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0
}

.game-category-filters button {
  min-height: 42px;
  border: 1px solid #e3d8f1;
  background: #fff;
  border-radius: 22px;
  color: #705b85;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer
}

.game-category-filters button[aria-pressed="true"] {
  background: #6035ce;
  border-color: #6035ce;
  color: #fff
}

.game-category-filters button:hover:not([aria-pressed="true"]) {
  background: #f6f0fd
}

.game-category-group {
  scroll-margin-top: 24px
}

.game-category-group+.game-category-group {
  margin-top: 30px
}

.game-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  line-height: 1.6;
  margin: 0 0 17px
}

.game-group-heading>span {
  display: flex;
  color: #7542be
}

.game-group-heading .icon {
  width: 24px;
  height: 24px
}

.library-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start
}

.library-game-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid #e3dced;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px #40315604;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  scroll-margin-top: 20px
}

.library-game-card[hidden],
.game-category-group[hidden],
.games-page [hidden] {
  display: none !important
}

.library-game-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px
}

.library-game-header h4 {
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
  letter-spacing: -.25px;
  min-width: 0;
  overflow-wrap: break-word
}

.library-game-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 13px;
  background: #f9e8f1;
  color: #bb4083
}

.library-game-icon .icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.5
}

[data-game-category="fishing"] .library-game-icon {
  background: #e7f0fe;
  color: #3e78b9
}

[data-game-category="table-games"] .library-game-icon {
  background: #eee6fb;
  color: #7b49bd
}

[data-game-category="arcade"] .library-game-icon {
  background: #fff0d7;
  color: #a87421
}

.games-page .library-game-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 20px;
  flex: 1
}

.library-game-details {
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: auto
}

.library-game-details>summary {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  padding: 15px 25px 0 0;
  min-height: 40px;
  color: #6a3fb2
}

.library-game-details>summary:after {
  top: 9px;
  font-size: 20px
}

.game-details-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  line-height: 1.75;
  margin-top: 17px
}

.game-details-table th,
.game-details-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere
}

.game-details-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
  color: #8a759a;
  border-bottom: 1px solid #dbceeb
}

.game-details-table th:first-child,
.game-details-table td:first-child {
  width: 38%;
  padding-right: 13px
}

.game-details-table td:first-child {
  color: #7a658c
}

.game-details-table tr:last-child>* {
  border-bottom: 0
}

.games-page .more-games {
  display: block;
  width: 100%;
  max-width: 350px;
  margin: 25px auto 0;
  min-height: 46px;
  font-size: 16px
}

.games-page .game-search-status {
  padding: 26px;
  text-align: center;
  font-size: 16px;
  background: #fff;
  border: 1px solid #e6dff0;
  border-radius: 10px;
  margin: 0
}

.games-page .game-catalogue-note {
  font-size: 14px;
  line-height: 1.8;
  color: #79658a;
  background: #ede8f6;
  border-radius: 9px;
  padding: 15px 19px;
  margin: 24px 0 0
}

.game-controls-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  line-height: 1.85;
  margin: 4px 0 22px
}

.game-controls-table th,
.game-controls-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: break-word
}

.game-controls-table th {
  font-size: 14px;
  background: #f3edf9;
  color: #644d81
}

.game-controls-table td:first-child,
.game-controls-table th:first-child {
  width: 24%
}

.game-controls-table td:first-child {
  font-weight: 600;
  color: #5f4678
}

.game-controls-table td {
  color: var(--muted)
}

.game-control-guide>summary h3 {
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1.6
}

.game-control-guide>summary {
  padding: 20px 28px 20px 0
}

.game-control-guide>summary:after {
  top: 16px
}

.games-page .controls-note {
  font-size: 14px;
  line-height: 1.8;
  color: #79698b;
  margin-top: 19px
}

.games-page .game-control-guide>p {
  padding-bottom: 0
}

.games-page #faq {
  max-width: none
}

@media(max-width:1100px) {
  .library-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .games-browser-tools {
    align-items: stretch
  }

  .game-search-field {
    flex-basis: 100%
  }

  .game-category-filters {
    gap: 8px
  }

  .games-page .games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 30px
  }

  .games-hero-art {
    width: 180px;
    transform: scale(.86) rotate(6deg);
    transform-origin: center
  }

  .games-page .games-hero h1 {
    font-size: 33px
  }
}

@media(max-width:800px) {
  .games-page .content-layout {
    display: block;
    padding-top: 23px
  }

  .games-page .main-column {
    display: flex;
    gap: 22px
  }

  .games-page #games-library {
    order: 0
  }

  .games-page #game-controls {
    order: 1
  }

  .games-page #faq {
    order: 2
  }

  .games-page .games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 135px;
    gap: 20px
  }

  .games-page .games-hero h1 {
    font-size: 29px
  }

  .games-hero-art {
    width: 135px;
    height: 160px;
    transform: rotate(6deg)
  }

  .hero-game-tile {
    width: 58px;
    height: 58px;
    border-radius: 16px
  }

  .hero-game-tile .icon {
    width: 29px;
    height: 29px
  }

  .hero-slot-tile {
    left: 0;
    top: 12px
  }

  .hero-fish-tile {
    right: 0;
    top: 17px
  }

  .hero-cards-tile {
    left: 4px;
    bottom: 15px
  }

  .hero-controller-tile {
    right: -3px;
    bottom: 9px
  }

  .library-game-grid {
    gap: 17px
  }

  .library-game-card {
    padding: 20px;
    min-height: 320px
  }

  .library-game-header {
    gap: 10px
  }

  .library-game-header h4 {
    font-size: 18px
  }

  .library-game-icon {
    width: 42px;
    height: 44px
  }

  .library-game-icon .icon {
    width: 25px;
    height: 25px
  }

  .game-category-filters button {
    min-height: 44px
  }

  .game-details-table {
    font-size: 14px
  }

  .games-page .game-controls-table {
    font-size: 15px
  }

  .game-control-guide>summary h3 {
    font-size: 17px !important
  }

  .games-page .game-catalogue-note {
    font-size: 14px
  }
}

@media(max-width:550px) {
  .games-page .games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 80px;
    gap: 14px
  }

  .games-page .games-hero .hero-copy {
    display: contents
  }

  .games-page .games-hero h1 {
    grid-column: 1;
    grid-row: 1;
    font-size: 27px;
    align-self: center;
    margin: 0
  }

  .games-hero-art {
    grid-column: 2;
    grid-row: 1;
    width: 80px;
    height: 103px
  }

  .hero-game-tile {
    width: 36px;
    height: 36px;
    border-radius: 10px
  }

  .hero-game-tile .icon {
    width: 20px;
    height: 20px
  }

  .hero-slot-tile {
    top: 4px;
    left: 1px
  }

  .hero-fish-tile {
    top: 10px;
    right: 0
  }

  .hero-cards-tile {
    bottom: 15px;
    left: 3px
  }

  .hero-controller-tile {
    bottom: 7px;
    right: -3px
  }

  .library-game-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px
  }

  .library-game-card {
    padding: 21px;
    min-height: 0
  }

  .library-game-header h4 {
    font-size: 20px
  }

  .library-game-icon {
    width: 46px;
    height: 46px
  }

  .games-page .library-game-description {
    font-size: 16px
  }

  .games-browser-tools {
    padding: 15px;
    gap: 13px
  }

  .game-category-filters {
    width: 100%;
    gap: 7px
  }

  .game-category-filters button {
    font-size: 13px;
    padding: 8px 11px
  }

  .game-group-heading {
    font-size: 20px;
    margin-bottom: 15px
  }

  .game-details-table {
    font-size: 15px
  }

  .game-details-table th {
    font-size: 12px
  }

  .library-game-details>summary {
    font-size: 15px;
    min-height: 44px
  }

  .game-controls-table td:first-child,
  .game-controls-table th:first-child {
    width: 28%
  }

  .game-controls-table th,
  .game-controls-table td {
    padding: 12px 9px
  }

  .game-controls-table td {
    font-size: 14px;
    line-height: 1.85
  }

  .game-controls-table th {
    font-size: 13px
  }

  .game-control-guide>summary h3 {
    font-size: 16px !important
  }

  .games-page .game-catalogue-note {
    padding: 14px 16px
  }
}

/* Four-column catalogue with a dedicated illustration area on each card. */
.games-page .library-game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px
}

.games-page .library-game-card {
  padding: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 13px
}

.library-game-art {
  height: 120px;
  display: grid;
  place-items: center;
  background: #e7e0f3;
  color: #8a68b6;
  border-bottom: 1px solid #e5dced
}

.library-game-art .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.5
}

[data-game-category="fishing"] .library-game-art {
  background: #e3edf9;
  color: #567eaf
}

[data-game-category="table-games"] .library-game-art {
  background: #ebe5f5;
  color: #8462b0
}

[data-game-category="arcade"] .library-game-art {
  background: #f9eedb;
  color: #ae8849
}

.library-game-body {
  display: flex;
  flex-direction: column;
  padding: 17px;
  min-width: 0
}

.games-page .library-game-header {
  margin-bottom: 8px
}

.games-page .library-game-header h4 {
  font-size: 17px;
  line-height: 1.5
}

.games-page .library-game-category {
  font-size: 13px;
  line-height: 1.6;
  color: #8a68a1;
  margin: 0 0 8px
}

.games-page .library-game-description {
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 14px
}

.games-page .library-game-details {
  border: 0
}

.games-page .library-game-details>summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 9px;
  min-height: 35px;
  border: 1px solid #ded6e8;
  border-radius: 22px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: #736579
}

.games-page .library-game-details>summary:after {
  content: none
}

.library-game-details>summary>span {
  display: flex
}

.library-game-details>summary .icon {
  width: 16px;
  height: 16px
}

.library-game-details[open]>summary .icon {
  transform: rotate(180deg)
}

.game-controls-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 19px 0 0
}

.game-controls-buttons button {
  padding: 9px 14px;
  min-height: 42px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #e1d7ec;
  border-radius: 8px;
  background: #fff;
  color: #715781;
  cursor: pointer
}

.game-controls-buttons button:hover {
  background: #f7f2fc
}

.game-controls-buttons button[aria-expanded="true"] {
  background: #6035ce;
  border-color: #6035ce;
  color: #fff
}

.game-control-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line)
}

.game-control-panel>h3 {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 16px
}

.game-control-panel .game-controls-table {
  margin-bottom: 0
}

@media(max-width:1100px) {
  .games-page .library-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media(max-width:800px) {
  .games-page .library-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .library-game-art {
    height: 115px
  }

  .games-page .library-game-details>summary,
  .game-controls-buttons button {
    min-height: 44px
  }

  .games-page .library-game-description {
    font-size: 15px
  }

  .games-page .library-game-header h4 {
    font-size: 18px
  }
}

@media(max-width:550px) {
  .games-page .library-game-grid {
    grid-template-columns: minmax(0, 1fr)
  }

  .library-game-body {
    padding: 18px
  }

  .library-game-art {
    height: 125px
  }

  .games-page .library-game-description {
    font-size: 15px
  }

  .games-page .library-game-header h4 {
    font-size: 19px
  }

  .game-controls-buttons {
    gap: 8px
  }

  .game-controls-buttons button {
    font-size: 13px;
    padding: 9px 12px
  }
}

.games-page .library-game-grid {
  align-items: stretch
}

.library-game-body {
  flex: 1
}

/* Consistent, slightly smaller descriptions across the game collection. */
.games-page .library-game-description {
  font-size: 14px;
  line-height: 1.75
}

.games-page .game-controls-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin: 20px 0 16px;
  background: #ede8f6;
  border: 1px solid #e2d9ef;
  border-radius: 11px
}

.games-page .game-controls-buttons[hidden] {
  display: none
}

.games-page .game-controls-buttons button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #776585;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer
}

.games-page .game-controls-buttons button[aria-selected="true"] {
  background: #fff;
  border-color: #e4d9f3;
  color: #6035ce;
  box-shadow: 0 2px 5px #38244908
}

.games-page .game-controls-buttons button:hover:not([aria-selected="true"]) {
  background: #ffffff70
}

.games-page .game-control-panel {
  margin: 0;
  padding: 22px;
  border: 1px solid #e4dced;
  border-radius: 11px;
  background: #fff
}

.games-page .game-control-panel>h3 {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 18px
}

@media(max-width:650px) {
  .games-page .game-controls-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .games-page .game-controls-buttons button {
    font-size: 14px;
    min-height: 46px
  }

  .games-page .game-control-panel {
    padding: 16px
  }

  .games-page .game-control-panel>h3 {
    font-size: 18px
  }
}

.game-filter-scroll-shell {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%
}

.games-page .game-category-filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  min-width: 0;
  scrollbar-width: none;
  overscroll-behavior-x: contain
}

.game-category-filters::-webkit-scrollbar {
  display: none
}

.game-category-filters button {
  flex-shrink: 0;
  white-space: nowrap
}

.game-filter-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6839c0;
  cursor: pointer
}

.game-filter-arrow .icon {
  width: 17px;
  height: 17px
}

.game-filter-arrow[hidden] {
  display: none
}

.game-filter-arrow:disabled {
  opacity: .25;
  cursor: default
}

.game-filter-arrow:hover:enabled {
  background: #f3ecfc
}

@media(max-width:1100px) {
  .game-filter-scroll-shell {
    width: 100%
  }

  .games-page .game-category-filters {
    width: auto;
    flex: 1
  }
}

.game-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 27px 0 0
}

.game-page-numbers {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px
}

.game-pagination button {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 44px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid #ded2ed;
  border-radius: 8px;
  background: #fff;
  color: #704b9b;
  cursor: pointer
}

.game-pagination button:hover:enabled {
  background: #f1e9fb
}

.game-pagination button[aria-current="page"] {
  background: #6035ce;
  border-color: #6035ce;
  color: #fff;
  font-weight: 700
}

.game-pagination button[aria-current="page"]:hover {
  background: #5128b4
}

.game-pagination button:disabled {
  opacity: .4;
  cursor: default
}

@media(max-width:550px) {
  .game-pagination {
    gap: 12px;
    margin-top: 22px
  }

  .game-page-numbers {
    order: 0;
    flex-basis: 100%;
    gap: 6px
  }

  .game-page-numbers button {
    min-width: 36px;
    padding: 9px
  }

  .game-page-previous,
  .game-page-next {
    order: 1;
    flex: 1;
    max-width: 145px
  }
}

.games-page .library-game-art {
  height: auto;
  aspect-ratio: 4/3;
  overflow: hidden
}

.library-game-cover {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover
}

.games-page .download-hero.games-hero {
  position: relative;
  isolation: isolate;
  background: #f0edff url("games-hero-glow-background.webp") center/cover no-repeat;
  border-bottom: 1px solid #e2d6f0
}

.games-page .download-hero.games-hero::before {
  content: none
}

.games-page .download-hero.games-hero .hero-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: center;
  padding-bottom: 8px
}

.games-page .games-hero-art {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  min-width: 0;
  transform: none
}

.games-collection-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  filter: saturate(.78) contrast(.94)
}

@media(min-width:801px) and (max-width:1100px) {
  .games-page .download-hero.games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 24px
  }
}

@media(max-width:800px) {
  .games-page .download-hero.games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 20px
  }

  .games-collection-art {
    max-height: 190px
  }
}

@media(max-width:550px) {
  .games-page .download-hero.games-hero .hero-grid {
    grid-template-columns: minmax(0, 1fr) 115px;
    gap: 14px
  }

  .games-page .games-hero-art {
    grid-column: 2;
    grid-row: 1;
    width: 115px;
    height: auto;
    align-self: center
  }

  .games-collection-art {
    max-height: 130px
  }
}
