/* 用途 图标墙、游戏列表、紧凑栏和更多游戏入口等首页布局的样式。 */
:root {
  --home-browse-bottom: max(48px, env(safe-area-inset-bottom));
  --home-browse-height: 46px;
}
.page[data-home-browse],
.detail-sheet {
  --play-gradient: linear-gradient(108deg, #4438cb, #145ad4 58%, #0075b8);
}
.page[data-home-browse] {
  position: relative;
  isolation: isolate;
  max-width: 430px;
  padding-bottom: calc(
    var(--home-browse-bottom) + var(--home-browse-height) + 12px
  );
  background:
    radial-gradient(ellipse 250px 220px at 100% 0, #cfe8ff, transparent 85%),
    radial-gradient(ellipse 220px 180px at 0 0, #e4e4ff, transparent 86%),
    radial-gradient(
      ellipse 280px 360px at 100% 1250px,
      #dceaff,
      transparent 90%
    ),
    linear-gradient(
      #edf4ff,
      #fafbfd 330px,
      #fafbfd 690px,
      #eaf3ff 1060px,
      #e6f0ff 1520px,
      #dce9fa
    );
}
.page[data-home-browse]::before {
  content: '';
  position: absolute;
  inset: 0 0 auto auto;
  z-index: -1;
  width: 142px;
  height: 95px;
  background: url('/gamia-brand-d51abc8d8bf472c4.webp') right -14px top -28px /
    135px auto no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.page[data-home-browse] .brand-header {
  height: 60px;
}
.page[data-home-browse] .brand-header > span {
  color: #234ab0;
}
.page[data-home-browse] .module {
  margin-bottom: 15px;
}
.page[data-home-browse] .module h2 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 750;
}
.page[data-home-browse] [data-module='picks_main'] h2 {
  font-size: 20px;
  line-height: 25px;
}
.page[data-home-browse] .hero .media {
  border-radius: 15px;
  box-shadow: 0 5px 13px #1730531a;
}
.page[data-home-browse] .hero-caption {
  padding: 22px 10px 8px 12px;
}
.page[data-home-browse] .hero-caption .rating {
  font-size: 13px;
}
.page[data-home-browse] .recent-games {
  margin-bottom: 13px;
  padding: 0;
}
.page[data-home-browse] .recent-games::before {
  content: none;
}
.page[data-home-browse] .recent-heading button {
  min-height: 32px;
}
.page[data-home-browse] .recent-games:not(.is-expanded) .recent-grid {
  grid-auto-columns: 52px;
  gap: 7px;
  padding-top: 3px;
}
.page[data-home-browse] .recent-art {
  border-radius: 10px;
}
.page[data-home-browse] .feature {
  grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  background: linear-gradient(115deg, #fff 12%, #eff5ff);
  border: 0;
  border-radius: 15px;
  box-shadow: 0 2px 9px #1d3c680f;
}
.page[data-home-browse] .feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.page[data-home-browse] .feature-info {
  gap: 4px;
}
.page[data-home-browse] .feature-actions {
  justify-content: flex-end;
}
.page[data-home-browse] .feature-actions .play {
  width: fit-content;
  min-width: 82px;
  min-height: 34px;
}

.home-compact-rail,
.home-icon-lane {
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
}
.home-compact-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  justify-content: start;
  gap: 8px;
  padding-bottom: 2px;
}
.home-compact-rail .game-card > .game-name {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
}
.home-art {
  position: relative;
  display: block;
  padding: 0;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--media-surface);
}
.home-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-art:focus-visible {
  outline-offset: -3px;
}
.home-wall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.page[data-home-browse] .home-wall-header h2 {
  margin: 0;
}
.home-wall-toggle {
  margin-inline-start: auto;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #234ab0;
  font-size: 12px;
}
.home-browser-wall {
  display: grid;
  gap: 7px;
  padding-block: 8px;
  border-radius: 13px;
  background: #dbeaff96;
}
.home-icon-track,
.home-icon-set {
  display: flex;
  width: max-content;
}
.home-icon-set {
  gap: 7px;
  padding-right: 7px;
}
.home-icon-set .game-card {
  width: 52px;
}
.home-compact-rail .game-label {
  --label-width: 32px;
  --label-height: 14px;
  --label-inset: 3px;
}
.home-icon-set .game-label {
  --label-width: 30px;
  --label-height: 14px;
  --label-inset: 3px;
  font-size: 8px;
}
.home-game-list .game-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #dae7f7;
}
.home-game-list .game-card:last-child {
  border-bottom: 0;
}
.home-game-list .home-art {
  aspect-ratio: 4/3;
}
.home-list-info .game-name {
  font-size: 13px;
  margin: 0;
}
.home-list-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-list-name .game-name {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.game-label--inline {
  position: static;
  flex: none;
}
.home-list-info .description {
  margin: 3px 0 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-game-list .play {
  min-width: 52px;
}
.home-browse-action {
  position: fixed;
  z-index: 18;
  bottom: var(--home-browse-bottom);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 176px;
  min-height: var(--home-browse-height);
  max-width: calc(100vw - 32px);
  padding: 6px 25px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f15308 0%, #d24103 22%, #c83b00 100%);
  box-shadow: 0 4px 10px #a23c172e;
  color: #fff;
  white-space: nowrap;
}
.home-browse-action:active {
  filter: brightness(0.94);
}
.home-browse-label {
  display: grid;
  justify-items: center;
}
.home-browse-title {
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;
}
.home-browse-subtitle {
  color: #fff7ef;
  font-size: 10px;
  line-height: 12px;
  font-weight: 500;
}
.home-browse-external {
  position: absolute;
  top: 10px;
  right: 13px;
  width: 14px;
  height: 14px;
  color: #fff7ef;
}
body:has(dialog[open]) .home-browse-action {
  visibility: hidden;
}
