/* Generated from Designs/design-assets (selected A2 direction) with mockup-only rules removed. */

.portal-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1700px;
  margin: auto;
}

.portal-content {
  min-width: 0;
  padding: 0 28px;
}

.portal-header {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid #29354b;
}

/* The 404 header holds nothing but the brand, so it appears only where the sidebar hides it. */
.not-found-header {
  display: none;
}

/* The sidebar carries the brand on wide screens; the header repeats it only on phones. */
.wordmark {
  display: none;
  font-size: var(--fs-2xl);
  letter-spacing: -1.5px;
  font-weight: 800;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.brand-dot {
  height: 6px;
  width: 6px;
  background: #7fa1ff;
  border-radius: 50%;
  margin-top: 12px;
}

.mobile-mark {
  display: none;
}

.catalog-search {
  width: 440px;
  background: #202c41;
  border: 1px solid #354460;
  border-radius: 10px;
  padding: 9px 13px;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8fa5c8;
}

.catalog-search .icon {
  height: 17px;
  width: 17px;
}

.catalog-search input {
  border: 0;
  background: transparent;
  color: #e4edff;
  font-size: var(--fs-md);
  outline: none;
  width: 100%;
  min-width: 0;
}

.catalog-search input::placeholder {
  color: #8fa1bf;
}

.search-hint {
  font-size: var(--fs-sm);
  color: #849ab6;
  white-space: nowrap;
}

.header-favorite {
  margin-left: auto; /* the header tagline used to fill this space */
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #223149;
  color: #9eb5d8;
  border: 1px solid #354862;
  flex-shrink: 0;
  margin-left: -13px;
}

.header-favorite .icon {
  height: 17px;
  width: 17px;
}

.header-favorite.active {
  background: #365282;
  color: #dce8ff;
}

.catalog-section {
  padding-top: 26px;
  scroll-margin-top: 20px;
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 19px;
}

.catalog-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-heading h1 {
  font-size: var(--fs-2xl);
  line-height: 1.25;
  letter-spacing: -0.9px;
}

.game-count {
  background: #233249;
  color: #89a1bf;
  font-size: var(--fs-xs);
  border: 1px solid #33435d;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}

.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.chips {
  gap: 6px;
}

.chips .chip {
  font-size: var(--fs-md);
  border-radius: 7px;
  padding: 9px 14px;
  background: #1e2a3f;
  color: #8ea5c6;
  border: 1px solid #2a3b55;
}

.chips .chip.active {
  background: #6287f4;
  border-color: #7395ff;
  color: white;
  box-shadow: 0 3px 10px #4b70d820;
}

.chips .chip:hover:not(.active) {
  background: #2a3c57;
  color: #c7d9f5;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  color: #738aa9;
  white-space: nowrap;
}

/* The native select arrow sits hard against the border, so the control draws its own chevron
   (the A2 icon set, down-facing) with room on both sides of it. */
.sort-control select {
  appearance: none;
  background-color: #1a2639;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb5d5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  color: #9fb5d5;
  border: 1px solid #31445f;
  border-radius: 7px;
  padding: 8px 40px 8px 11px;
  font-size: var(--fs-md);
  min-height: 40px;
  cursor: pointer;
}

.catalog-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px 17px;
}

.catalog-board .game-card {
  padding: 0;
  border: 1px solid #30415a;
  background: #1f2c41;
  border-radius: 12px;
  box-shadow: 0 4px 15px #080f1e0d;
  transition:
    border-color 0.18s,
    background 0.18s;
  overflow: visible;
  min-width: 0;
}

.catalog-board .game-card:hover {
  border-color: #7b96d0;
  background: #24354e;
}

.catalog-board .game-open {
  border-radius: 11px;
  overflow: hidden;
  height: 100%;
  padding-bottom: 14px;
}

.catalog-board .game-open .art {
  border-radius: 11px 11px 0 0;
  aspect-ratio: 1.7;
  width: 100%;
  transition: filter 0.2s;
}

.catalog-board .game-open:hover .art {
  transform: none;
  filter: brightness(1.06);
}

.catalog-board .game-title {
  font-size: var(--fs-base);
  letter-spacing: -0.2px;
  margin: 12px 13px 0;
  line-height: 1.3;
}

.catalog-board .game-meta {
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin: 5px 13px 0;
  color: #859dbf;
  padding-right: 35px;
  min-height: 20px;
}

.catalog-board .badge {
  top: 11px;
  left: 11px;
  font-size: var(--fs-xs);
  letter-spacing: 0.3px;
  background: #f9e8b5;
  color: #5c532f;
  border-radius: 5px;
  padding: 5px 9px;
}

.catalog-board .favorite {
  top: 11px;
  right: 11px;
  background: #ffffffdb;
  color: #405c53;
  opacity: 1;
  height: 32px;
  width: 32px;
}

.catalog-board .favorite[aria-pressed="true"] {
  background: #f7ce7e;
  color: #766235;
}

.catalog-board .favorite .icon {
  height: 16px;
  width: 16px;
}

.tile-play {
  position: absolute;
  bottom: 18px;
  right: 13px;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2b3c55;
  color: #7391bd;
  font-size: var(--fs-xs);
  pointer-events: none;
}

.tile-play svg {
  height: 12px;
  width: 12px;
}

.catalog-board .game-card:first-child .tile-play {
  background: #3a4f6f;
  color: #b5caff;
}

.catalog-board .game-card:hover .tile-play {
  background: #6c8fff;
  color: #fff;
}

.catalog-board .empty-state {
  padding: 56px 15px 35px;
  border: 1px dashed #3a4b65;
  border-radius: 12px;
  font-size: var(--fs-base);
  line-height: 1.7;
  background: #192438;
  color: #8ca3c6;
}

.empty-reset {
  text-align: center;
  margin-top: 17px;
}

.empty-reset button {
  background: #263d5e;
  border: 1px solid #3b5477;
  color: #bad0ef;
  border-radius: 8px;
  padding: 12px 18px;
  min-height: 44px;
  font-size: var(--fs-md);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.empty-reset .icon {
  width: 14px;
  height: 14px;
}

.portal-about {
  border-top: 1px solid #293b53;
  margin-top: 35px;
  padding-top: 25px;
  max-width: 100%;
}

.about-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.about-heading h2 {
  font-size: var(--fs-lg);
  letter-spacing: -0.3px;
  color: #a2b6d4;
}

.mini-brand {
  color: #627fa8;
}

.mini-brand .icon {
  width: 19px;
  height: 19px;
}

.portal-about > p {
  font-size: var(--fs-base);
  color: #738cb0;
  line-height: 1.6;
  max-width: 64ch;
}

.catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 83px;
  margin-top: 24px;
  border-top: 1px solid #26364f;
  font-size: var(--fs-sm);
  color: #708aae;
}

.catalog-footer > a {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #7e99bf;
}

.catalog-footer .icon {
  height: 12px;
  width: 12px;
}

.catalog-board[data-size="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1140px;
}

.catalog-board[data-size="3"] .game-open .art {
  aspect-ratio: 1.6;
}

.catalog-board[data-size="1"] {
  grid-template-columns: minmax(0, 650px);
}

.catalog-board[data-size="1"] .game-open .art {
  aspect-ratio: 1.9;
}

.catalog-board[data-size="1"] .game-title {
  font-size: var(--fs-xl);
  margin: 18px 20px 0;
}

.catalog-board[data-size="1"] .game-meta {
  font-size: var(--fs-md);
  margin: 8px 20px 0;
  color: #91a6c2;
}

.catalog-board[data-size="1"] .game-open {
  padding-bottom: 21px;
}

.catalog-board[data-size="1"] .tile-play {
  right: 20px;
  bottom: 25px;
  width: 38px;
  height: 38px;
  background: #5e86ee;
  color: #fff;
}

.catalog-board[data-size="1"] .tile-play svg {
  height: 18px;
  width: 18px;
}

.catalog-home[data-catalog-size="1"] .catalog-controls,
.catalog-home[data-catalog-size="3"] .catalog-controls {
  margin-bottom: 18px;
}

.catalog-home[data-catalog-size="1"] .portal-about {
  max-width: 900px;
}

.catalog-home[data-catalog-size="1"] .catalog-heading,
.catalog-home[data-catalog-size="1"] .catalog-controls {
  max-width: 650px;
}

.chips .chip {
  flex-shrink: 0;
}

.catalog-home[data-catalog-size="1"] .portal-content {
  max-width: 970px;
  width: 100%;
  margin: 0 auto;
}

.catalog-home[data-catalog-size="1"] .catalog-section,
.catalog-home[data-catalog-size="1"] .portal-about,
.catalog-home[data-catalog-size="1"] .catalog-footer {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-home[data-catalog-size="1"] .catalog-board {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-home[data-catalog-size="1"] .catalog-heading,
.catalog-home[data-catalog-size="1"] .catalog-controls,

.catalog-home[data-catalog-size="1"] .sort-control {
  display: none;
}

.catalog-home[data-catalog-size="1"] .catalog-search {
  flex: 1;
}

.catalog-home[data-catalog-size="1"] .header-favorite {
  margin-left: auto;
}

@media (min-width: 1500px) {
  .portal-content {
      padding: 0 35px;
    }

  .portal-header {
      height: 78px;
    }

  .catalog-board {
      gap: 23px 20px;
    }

  .catalog-section {
      padding-top: 29px;
    }
}

@media (max-width: 1100px) {
  .portal-shell {
      grid-template-columns: 196px minmax(0, 1fr);
    }

  .portal-content {
      padding: 0 22px;
    }

  .portal-header {
      gap: 24px;
    }

  .catalog-search {
      width: 360px;
    }

  .header-favorite {
      margin-left: -10px;
    }

  .search-hint {
      display: none;
    }

  .catalog-board {
      gap: 17px 13px;
    }

  .catalog-board .game-title {
      margin: 11px 11px 0;
    }

  .catalog-board .game-meta {
      margin: 5px 11px 0;
    }

  .catalog-board .game-open .art {
      aspect-ratio: 1.45;
    }

  .catalog-board .game-open {
      padding-bottom: 13px;
    }

  .catalog-board .tile-play {
      right: 10px;
      bottom: 17px;
      height: 22px;
      width: 22px;
    }

  .catalog-board .badge {
      padding: 5px 8px;
      top: 9px;
      left: 9px;
    }

  .catalog-board .favorite {
      width: 30px;
      height: 30px;
      top: 9px;
      right: 9px;
    }

  .catalog-board .favorite .icon {
      width: 14px;
      height: 14px;
    }

  .sort-control > span {
      display: none;
    }

  .catalog-controls {
      gap: 14px;
    }

  .chips {
      gap: 5px;
    }

  .chips .chip {
      padding: 9px 13px;
    }
}

@media (max-width: 850px) {

  .catalog-search {
      flex: 1;
      width: auto;
      max-width: 410px;
    }

  .header-favorite {
      margin: 0;
    }

  .catalog-board {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

  .catalog-board .game-open .art {
      aspect-ratio: 1.4;
    }

  .catalog-controls {
      align-items: flex-start;
      flex-direction: column;
      gap: 12px;
    }

  .sort-control {
      display: none;
    }

  .chips {
      flex-wrap: wrap;
    }

  .catalog-heading {
      margin-bottom: 16px;
    }

  .catalog-footer {
      gap: 15px;
    }

  .catalog-home[data-catalog-size="1"] .catalog-board .game-open .art {
      aspect-ratio: 1.9;
    }

  .catalog-home[data-catalog-size="3"] .catalog-board .game-open .art {
      aspect-ratio: 1.4;
    }
}

/* Phones stack the shell: header, the site menu as a strip, then the catalog. The page
   padding moves to the shell so the menu can span the full width. */
@media (max-width: 760px) {
  .portal-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding: 0 22px;
  }

  .portal-content {
    display: contents;
  }

  .portal-header {
    order: 1;
  }

  .not-found-header,
  .wordmark {
    display: flex;
  }

  .site-nav {
    order: 2;
    margin: 0 -22px;
  }

  .portal-content > main {
    order: 3;
  }

  .catalog-footer {
    order: 4;
  }
}

@media (max-width: 650px) {
  .portal-shell {
      padding: 0 17px;
    }

  .site-nav {
      margin: 0 -17px;
    }

  .portal-header {
      height: 67px;
      gap: 13px;
    }

  .wordmark {
      font-size: var(--fs-xl);
      gap: 6px;
      letter-spacing: -1.3px;
    }

  .brand-dot {
      display: none;
    }

  .mobile-mark {
      display: grid;
      place-items: center;
      height: 27px;
      width: 27px;
      border-radius: 9px;
      transform: rotate(-7deg);
      background: #7093ff;
      color: white;
    }

  .mobile-mark .icon {
      height: 19px;
      width: 19px;
    }

  .catalog-search {
      padding: 9px 12px;
      min-height: 44px;
      border-radius: 8px;
      gap: 7px;
    }

  .catalog-search .icon {
      height: 15px;
      width: 15px;
    }

  .header-favorite {
      height: 44px;
      width: 44px;
      border-radius: 8px;
    }

  .header-favorite .icon {
      height: 18px;
      width: 18px;
    }

  .catalog-section {
      padding-top: 22px;
    }

  .catalog-heading h1 {
      font-size: var(--fs-2xl);
      letter-spacing: -0.8px;
    }

  .catalog-title-group {
      gap: 10px;
    }

  .game-count {
      padding: 5px 8px;
    }

  .catalog-heading {
      margin-bottom: 15px;
    }

  .catalog-controls {
      margin-bottom: 18px;
    }

  .chips {
      flex-wrap: nowrap;
      overflow-x: auto;
      max-width: calc(100vw - 17px);
      width: calc(100vw - 17px);
      padding: 1px 17px 3px 1px;
      margin-left: -1px;
      scrollbar-width: none;
      gap: 6px;
    }

  .chips::-webkit-scrollbar {
      display: none;
    }

  .chips .chip {
      padding: 10px 14px;
      min-height: 44px;
      border-radius: 7px;
    }

  .catalog-board,
  .catalog-board[data-size="3"] {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px 12px;
    }

  .catalog-board .game-open .art,
  .catalog-board[data-size="3"] .game-open .art {
      aspect-ratio: 1.45;
    }

  .catalog-board .game-card {
      border-radius: 10px;
    }

  .catalog-board .game-open {
      border-radius: 9px;
      padding-bottom: 12px;
    }

  .catalog-board .game-open .art {
      border-radius: 9px 9px 0 0;
    }

  .catalog-board .game-title,
  .catalog-board[data-size="3"] .game-title {
      font-size: var(--fs-md);
      margin: 10px 11px 0;
      letter-spacing: -0.25px;
    }

  .catalog-board .game-meta,
  .catalog-board[data-size="3"] .game-meta {
      margin: 5px 11px 0;
      min-height: 19px;
      padding-right: 24px;
    }

  .catalog-board .badge {
      top: 8px;
      left: 8px;
      letter-spacing: 0.2px;
      padding: 4px 8px;
    }

  .catalog-board .favorite {
      top: 8px;
      right: 8px;
      width: 40px;
      height: 40px;
    }

  .catalog-board .favorite .icon {
      height: 18px;
      width: 18px;
    }

  .catalog-board .tile-play {
      width: 20px;
      height: 20px;
      bottom: 12px;
      right: 9px;
    }

  .catalog-board .tile-play svg {
      width: 10px;
      height: 10px;
    }

  .portal-about {
      margin-top: 27px;
      padding-top: 23px;
    }

  .about-heading {
      gap: 8px;
      margin-bottom: 12px;
    }

  .mini-brand .icon {
      height: 18px;
      width: 18px;
    }

  .catalog-footer {
      padding-top: 23px;
      margin-top: 24px;
      align-items: flex-start;
      justify-content: flex-start;
      gap: 12px;
      flex-wrap: wrap;
    }

  .catalog-footer > a {
      width: 100%;
    }

  .catalog-board[data-size="1"] {
      grid-template-columns: minmax(0, 1fr);
    }

  .catalog-home[data-catalog-size="1"] .catalog-board .game-open .art {
      aspect-ratio: 1.4;
    }

  .catalog-board[data-size="1"] .game-title {
      margin: 15px 16px 0;
    }

  .catalog-board[data-size="1"] .game-meta {
      margin: 8px 16px 0;
    }

  .catalog-board[data-size="1"] .game-open {
      padding-bottom: 18px;
    }

  .catalog-board[data-size="1"] .tile-play {
      right: 16px;
      bottom: 21px;
      width: 35px;
      height: 35px;
    }

  .catalog-board[data-size="1"] .badge {
      padding: 6px 8px;
      left: 12px;
      top: 12px;
    }

  .catalog-board[data-size="1"] .favorite {
      right: 12px;
      top: 12px;
      width: 30px;
      height: 30px;
    }

  .catalog-board[data-size="1"] .favorite .icon {
      width: 15px;
      height: 15px;
    }

  .catalog-home[data-catalog-size="1"] .catalog-controls {
      margin-bottom: 17px;
    }
}

@media (max-width: 360px) {
  .portal-shell {
      padding: 0 13px;
    }

  .site-nav {
      margin: 0 -13px;
    }

  .portal-header {
      gap: 9px;
    }

  .mobile-mark {
      height: 25px;
      width: 25px;
    }

  .mobile-mark .icon {
      height: 17px;
      width: 17px;
    }

  .catalog-search {
      padding: 9px 8px;
      gap: 5px;
    }

  .chips {
      width: calc(100vw - 13px);
      max-width: calc(100vw - 13px);
      padding-right: 13px;
    }

  .catalog-board {
      gap: 14px 10px;
    }

  .catalog-board .game-title,
  .catalog-board[data-size="3"] .game-title {
      margin-left: 8px;
      margin-right: 8px;
    }

  .catalog-board .game-meta,
  .catalog-board[data-size="3"] .game-meta {
      margin-left: 8px;
      margin-right: 8px;
    }

  .catalog-board .game-open .art {
      aspect-ratio: 1.3;
    }

  .catalog-board .badge {
      padding: 4px 7px;
      left: 6px;
      top: 7px;
    }

  .catalog-board .favorite {
      right: 6px;
      top: 6px;
    }

  .catalog-board .tile-play {
      right: 7px;
      bottom: 11px;
      width: 18px;
      height: 18px;
    }

}

/* ---------------------------------------------------------------------------
   PlayTree additions: the catalog is server-rendered, so chips, menu items and
   the sort control are links and a form instead of the mockup's buttons.
   --------------------------------------------------------------------------- */

.chip,
.header-favorite {
  text-decoration: none;
}

.header-favorite.active {
  background: #365282;
  color: #dce8ff;
}

.sort-control > label {
  cursor: pointer;
}

.sort-apply {
  background: #263d5e;
  border: 1px solid #3b5477;
  color: #bad0ef;
  border-radius: 7px;
  padding: 11px 16px;
  min-height: 44px;
  font-size: var(--fs-md);
}

.empty-reset > a {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: #263d5e;
  border: 1px solid #3b5477;
  color: #bad0ef;
  border-radius: 8px;
  padding: 12px 18px;
  min-height: 44px;
  font-size: var(--fs-md);
}

.catalog-board [data-game-card][hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .sort-control > label {
    display: none;
  }
}
