/* Catalog-first home. See DESIGN.md for reference and intentional differences. */
.portal-home {
  min-height: 100vh;
  --bg: #101015;
  --panel: #20202e;
  --muted: #b8b8cd;
  --subtle: #aaaabe;
  --line: #30303e;
  --lime: #aa91ff;
  --text: #f7f7fb;
  background: var(--bg);
  font-family:
    ui-rounded,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.portal-home [hidden] {
  display: none !important;
}
.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 200px minmax(200px, 1fr) auto;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 20px 0 12px;
  background: #20202e;
}
.portal-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-toggle {
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 23px;
  cursor: pointer;
}
.portal-header .brand {
  gap: 7px;
  font:
    900 15px/0.95 system-ui,
    sans-serif;
  letter-spacing: -0.5px;
}
.portal-header .brand-mark {
  color: white;
  background: #7552e8;
  border-radius: 12px;
}
.portal-header .search-wrap {
  justify-self: center;
  width: min(100%, 460px);
  height: 40px;
  border: 0;
  border-radius: 24px;
  background: #333348;
  padding: 0 18px;
}
.portal-header .search-wrap input {
  font-size: 14px;
}
.portal-header .search-wrap input::placeholder {
  color: #b8b8cd;
}
.portal-header .search-wrap:focus-within {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.creator-link {
  padding: 10px 16px;
  border-radius: 24px;
  background: #343443;
  font-size: 13px;
  font-weight: 700;
}
.category-sidebar {
  position: fixed;
  z-index: 20;
  top: 60px;
  bottom: 0;
  width: 200px;
  padding: 12px 12px;
  overflow-y: auto;
  border-right: 1px solid #282833;
  background: var(--bg);
}
.category-sidebar a,
.category-sidebar .filter-button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #f0f0f7;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
.category-sidebar a:hover,
.category-sidebar .filter-button:hover {
  background: #252532;
}
.category-sidebar a span,
.category-sidebar button span {
  width: 20px;
  color: #a592f2;
  text-align: center;
  font-size: 19px;
}
.category-sidebar .sidebar-home {
  color: #baa5ff;
}
.category-sidebar .filter-button.active {
  color: #cfbfff;
  background: #302642;
}
.sidebar-label {
  margin: 16px 10px 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 10px;
  letter-spacing: 1px;
}
.category-sidebar .filters {
  display: grid;
  width: 100%;
  padding: 0;
  gap: 2px;
}
.sidebar-bottom {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 12px;
}
.sidebar-bottom small {
  display: block;
  margin: 0 10px 8px;
  color: var(--subtle);
  font-size: 11px;
}
.portal-main {
  min-width: 0;
  margin-left: 200px;
  padding: 24px 20px;
}
.portal-home .discovery {
  width: 100%;
  padding: 0;
  border: 0;
}
.portal-home .section-topline {
  flex-direction: row;
  text-align: left;
  align-items: center;
  margin-bottom: 18px;
}
.portal-home h1,
.portal-home h2 {
  margin: 0;
  font:
    750 23px/1.3 system-ui,
    sans-serif;
  letter-spacing: -0.5px;
}
.portal-home .library-note {
  margin: 0;
  white-space: nowrap;
}
.portal-home .game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.portal-home .game-card {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: transparent;
}
.portal-home .game-card:hover {
  transform: translateY(-3px);
  box-shadow: none;
}
.portal-home .game-card-link {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  border-radius: 14px;
  background: #272737;
}
.portal-home .game-card-link:focus-visible {
  outline-offset: 4px;
}
.portal-home .game-art {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: transparent;
}
.portal-home .game-art:after {
  display: none;
}
.portal-home .game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal-home .game-card-content {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 12px 10px;
  background: linear-gradient(transparent, #080812ee);
}
.portal-home .game-card h3 {
  margin: 0;
  color: white;
  font:
    750 14px/1.3 system-ui,
    sans-serif;
  letter-spacing: 0;
}
.portal-home .game-card-meta,
.portal-home .game-card p,
.portal-home .card-play {
  display: none;
}
.portal-collection {
  margin-top: 30px;
}
.portal-home .row-heading {
  align-items: center;
  margin-bottom: 18px;
}
.portal-home .text-link {
  color: #c6b5ff;
  font-size: 13px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.cover-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16/10;
  border-radius: 14px;
  transition: transform 0.15s ease;
}
.cover-link:hover {
  transform: translateY(-3px);
}
.cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-link span {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 12px 10px;
  color: white;
  background: linear-gradient(transparent, #080812ee);
  font-size: 14px;
  font-weight: 750;
}
.portal-home .recent-section {
  margin: 0 0 28px;
}
.portal-home .recent-section h2 {
  font-size: 23px;
}
.portal-home .recent-chip {
  background: #272735;
  border-color: #454559;
  color: white;
}
.portal-about {
  max-width: 760px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.portal-about h2 {
  font-size: 18px;
}
.portal-about p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.portal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  padding: 20px 0;
  color: var(--subtle);
  font-size: 12px;
}
.portal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.sidebar-collapsed .category-sidebar {
  display: none;
}
.sidebar-collapsed .portal-main {
  margin-left: 0;
}
@media (min-width: 1600px) {
  .portal-home .game-grid,
  .collection-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .portal-header {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
  }
  .creator-link {
    display: none;
  }
  .portal-home .game-grid,
  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .portal-header {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 106px;
    gap: 6px;
    padding: 6px 12px 10px;
  }
  .portal-identity {
    height: 40px;
  }
  .portal-header .search-wrap {
    width: 100%;
    max-width: none;
  }
  .category-sidebar {
    top: 106px;
    width: 220px;
    box-shadow: 12px 0 32px #0009;
  }
  .portal-main,
  .sidebar-collapsed .portal-main {
    margin-left: 0;
    padding: 18px 12px;
  }
  .portal-home h1,
  .portal-home h2,
  .portal-home .recent-section h2 {
    font-size: 20px;
  }
  .portal-home .game-grid,
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .portal-home .game-card h3,
  .cover-link span {
    font-size: 12px;
  }
  .portal-home .game-card-link,
  .cover-link {
    border-radius: 10px;
  }
  .portal-home .row-heading {
    gap: 12px;
  }
  .portal-about {
    margin-top: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-home *,
  .portal-home *:before,
  .portal-home *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
