/* YAO mobile lobby — single system, phone only (≤480) */

.wap-main.wap-egame {
  --eg-ink: var(--text-primary, #f4efe4);
  --eg-mute: var(--text-muted, #8b8478);
  --eg-gold: var(--color-gold, #c9a84c);
  --eg-gold-hi: var(--color-gold-bright, #e8d59a);
  --eg-line: var(--wap-line, rgba(255, 255, 255, 0.08));
  --eg-pad: 16px;
  position: relative;
  margin: 0;
  padding: 0 env(safe-area-inset-right, 0px) calc(var(--wap-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 72px) env(safe-area-inset-left, 0px);
  overflow-x: clip;
  overflow-y: visible;
  color: var(--eg-ink);
  background: var(--bg-main, #090a0e);
}

/* ===== Hero ===== */
.wap-egame__hero {
  position: relative;
  isolation: isolate;
  min-height: min(58vh, 460px);
  padding: 0;
  overflow: hidden;
  background: var(--bg-deep, var(--bg-main, #0b0d12));
}

.wap-egame__hero--compact {
  min-height: min(36vh, 250px);
}

.wap-egame__hero-atmosphere, .wap-egame__hero-game {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wap-egame__hero-atmosphere {
  z-index: 0;
}

.wap-egame__hero-atmosphere img, .wap-egame__hero-game img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wap-egame__hero-atmosphere img {
  object-position: center top;
  opacity: 0.88;
  transform: scale(1.02);
  animation: none;
}

.wap-egame__hero-game {
  z-index: 1;
  left: 34%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%, #000 100%);
}

.wap-egame__hero-game img {
  object-position: center center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.06);
  animation: egm-game-in 0.7s ease both;
}

.wap-egame__hero--compact .wap-egame__hero-game {
  left: 42%;
  opacity: 0.9;
}

.wap-egame__hero--compact .wap-egame__hero-game img {
  object-fit: contain;
  padding: 24px 16px;
  transform: none;
  animation: none;
}

.wap-egame__hero-scrim {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.96) 0%, rgba(8, 9, 12, 0.72) 42%, rgba(8, 9, 12, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 9, 12, 0.2) 0%, rgba(8, 9, 12, 0.12) 40%, rgba(8, 9, 12, 0.92) 100%);
  pointer-events: none;
}

.wap-egame__watermark {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 8px;
  margin: 0;
  color: rgba(232, 213, 154, 0.08);
  font-family: var(--wap-font-display, "Syne", sans-serif);
  font-size: clamp(64px, 18vw, 96px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.85;
  pointer-events: none;
  user-select: none;
}

.wap-egame__hero-top {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  min-height: inherit;
  padding: 54px var(--eg-pad) 22px;
}

.wap-egame__back {
  position: absolute;
  top: 14px;
  left: var(--eg-pad);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(232, 213, 154, 0.22);
  border-radius: 999px;
  color: #d8c994;
  background: rgba(10, 11, 15, 0.42);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
}

.wap-egame__back::before {
  content: "‹";
  margin-right: 4px;
  font-size: 16px;
  line-height: 1;
}

.wap-egame__brand {
  display: grid;
  gap: 8px;
  max-width: min(92%, 100%);
  min-width: 0;
}

.wap-egame__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(232, 213, 154, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.wap-egame__mark img {
  width: 28px;
  height: 28px;
}

.wap-egame__eyebrow {
  margin: 0;
  color: var(--eg-gold-hi);
  font-family: var(--wap-font-display, "Syne", sans-serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.wap-egame__title {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(30px, 8.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.wap-egame__lead {
  margin: 0;
  max-width: 100%;
  color: rgba(244, 239, 228, 0.78);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wap-egame__hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  margin-top: 4px;
  padding: 4px 5px 4px 14px;
  border: 1px solid rgba(232, 213, 154, 0.28);
  border-radius: 999px;
  color: #f3ebda;
  background: rgba(12, 13, 18, 0.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: egm-rise 0.55s 0.12s both;
}

.wap-egame__hero-cta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.wap-egame__hero-cta strong {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 52px;
  height: 30px;
  border-radius: 999px;
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c 58%, #8f6f24);
  font-size: 11px;
  font-weight: 800;
}

/* ===== Tabs ===== */
.wap-egame-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: -16px var(--eg-pad) 0;
  padding: 6px 10px 6px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(14, 16, 22, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.wap-egame-tabs::after {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 1px;
}

.wap-egame-tabs::-webkit-scrollbar, .wap-egame-hot__rail::-webkit-scrollbar, .wap-egame-recent__rail::-webkit-scrollbar {
  display: none;
}

.wap-egame-tabs__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 52px;
  height: 34px;
  padding: 0 12px;
  border-radius: 11px;
  color: #7f786e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wap-egame-tabs__item.is-active {
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c 60%, #8f6f24);
  box-shadow: 0 8px 18px rgba(201, 168, 76, 0.28);
}

/* ===== Sections ===== */
.wap-egame-hot, .wap-egame-plats, .wap-egame-recent {
  position: relative;
  z-index: 1;
}

.wap-egame-hot {
  margin-top: 22px;
}

.wap-egame-plats {
  margin-top: 26px;
  padding: 0 var(--eg-pad);
}

.wap-egame-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wap-egame-hot > .wap-egame-section-head, .wap-egame-recent > .wap-egame-section-head {
  padding: 0 var(--eg-pad);
}

.wap-egame-recent > .wap-egame-section-head {
  align-items: baseline;
}

.wap-egame-section-head__title {
  margin: 0;
  color: #f5f0e6;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wap-egame-section-head__hint {
  color: #6f695f;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Hot rail ===== */
.wap-egame-hot__rail {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0 var(--eg-pad) 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--eg-pad);
  scroll-padding-right: var(--eg-pad);
  scrollbar-width: none;
}

.wap-egame-hot__rail::after {
  content: "";
  flex: 0 0 var(--eg-pad);
  width: var(--eg-pad);
  height: 1px;
}

.wap-egame-poster {
  position: relative;
  display: grid;
  flex: 0 0 38%;
  min-width: 128px;
  overflow: hidden;
  border: 1px solid var(--eg-line);
  border-radius: 16px;
  background: var(--card-bg, var(--wap-surface, #12151b));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  scroll-snap-align: start;
  animation: egm-rise 0.45s calc(var(--stagger, 0) * 40ms) both;
}

.wap-egame-hot__rail .wap-egame-poster.is-feature {
  flex-basis: 62%;
  min-width: 220px;
}

.wap-egame-poster__cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--wap-surface-2, #141821);
}

.wap-egame-hot__rail .is-feature .wap-egame-poster__cover {
  aspect-ratio: 16 / 11;
}

.wap-egame-poster__cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(6, 8, 12, 0.86));
  pointer-events: none;
}

.wap-egame-poster__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.wap-egame-poster__cover.is-contain img {
  object-fit: contain;
  padding: 8px;
}

.wap-egame-poster__name {
  display: block;
  min-width: 0;
  padding: 10px 11px 12px;
  overflow: hidden;
  color: var(--eg-ink, var(--text-primary, #eee8dc));
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wap-egame-hot__rail .is-feature .wap-egame-poster__name {
  font-size: 14px;
}

.wap-egame-poster:active {
  transform: scale(0.975);
}

/* ===== Platforms ===== */
.wap-egame-platgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wap-egame-platcard {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--eg-line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--wap-surface-2, #171b23), var(--card-bg, #10131a));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  animation: egm-rise 0.48s calc(var(--stagger, 0) * 40ms) both;
}

.wap-egame-platcard.is-wide {
  grid-column: 1 / -1;
  grid-template-columns: 42% 1fr;
  min-height: 128px;
  border-color: rgba(201, 168, 76, 0.22);
}

.wap-egame-platcard__art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 108px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--wap-gold-rgb, 201, 168, 76), 0.14), transparent 55%),
    var(--wap-surface-2, #12161e);
}

.wap-egame-platcard.is-wide .wap-egame-platcard__art {
  min-height: 128px;
}

.wap-egame-platcard__art::before {
  content: attr(data-mark);
  position: absolute;
  color: rgba(255, 255, 255, 0.05);
  font-family: var(--wap-font-display, "Syne", sans-serif);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.wap-egame-platcard__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 10, 14, 0.55));
  pointer-events: none;
}

.wap-egame-platcard__cover {
  display: none;
}

.wap-egame-platcard__logo {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 78%;
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.wap-egame-platcard__art.has-logo::before {
  opacity: 0.28;
  font-size: 28px;
}

.wap-egame-platcard__art.has-logo::after {
  display: none;
}

.wap-egame-platcard__art.has-cover::before {
  display: none;
}

.wap-egame-platcard__art.has-cover img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  filter: none;
}

.wap-egame-platcard.is-wide .wap-egame-platcard__logo {
  max-height: 64px;
}

.wap-egame-platcard__body {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wap-egame-platcard.is-wide .wap-egame-platcard__body {
  padding: 16px;
  border-top: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.wap-egame-platcard__name {
  overflow: hidden;
  color: #f2ece1;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wap-egame-platcard.is-wide .wap-egame-platcard__name {
  font-size: 17px;
}

.wap-egame-platcard__meta {
  color: #a58d4f;
  font-size: 10px;
  font-weight: 650;
}

/* 仅 PG 大卡 —— 按用户截图像素比例：扁卡 2.2:1 / Logo ~卡片宽 58% 居中偏上 / 左下文案 */
.wap-egame-platcard.wap-egame-platcard--pg.is-wide {
  display: block;
  grid-template-columns: none;
  aspect-ratio: 2.2 / 1;
  min-height: 0;
  height: auto;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: none;
  overflow: hidden;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__art {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  background: #000;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__art::before, .wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__art::after {
  content: none;
  display: none;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__logo {
  position: absolute !important;
  left: 50% !important;
  top: 44% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1;
  width: 58% !important;
  height: auto !important;
  max-width: 58% !important;
  max-height: 62% !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translate(-50%, -50%);
  object-fit: contain !important;
  object-position: center center;
  filter: none !important;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__body {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 2;
  display: grid;
  gap: 2px;
  border: 0 !important;
  padding: 0 14px 12px !important;
  background: transparent !important;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__name {
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 800;
  line-height: 1.15;
}

.wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__meta {
  color: #c9a84c !important;
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.15;
}

.wap-egame-platcard.is-dim {
  opacity: 0.58;
}

.wap-egame-platcard:active {
  transform: scale(0.98);
}

/* ===== Factory toolbar ===== */
.wap-egame-toolbar {
  position: sticky;
  z-index: 20;
  top: calc(var(--wap-header-h, 52px) + env(safe-area-inset-top, 0px) + 6px);
  display: grid;
  gap: 8px;
  margin: 16px var(--eg-pad) 14px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(14, 16, 22, 0.92);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.wap-egame-search {
  position: relative;
  display: flex;
  align-items: center;
}

.wap-egame-search__ico {
  position: absolute;
  z-index: 2;
  left: 14px;
  width: 14px;
  height: 14px;
  border: 1.8px solid #8f8778;
  border-radius: 50%;
  pointer-events: none;
}

.wap-egame-search__ico::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: #8f8778;
}

.wap-egame-search__input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 38px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  outline: 0;
  color: #f4efe4;
  background: #0b0e13;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

.wap-egame-search__input:focus {
  border-color: rgba(201, 168, 76, 0.5);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.wap-egame-search__input::-webkit-search-cancel-button {
  display: none;
}

.wap-egame-search__clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #a9afba;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.wap-egame-search__clear[hidden] {
  display: none !important;
}

.wap-egame-suggest {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  list-style: none;
  background: var(--card-bg, var(--wap-surface, #171b23));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.wap-egame-suggest[hidden] {
  display: none;
}

.wap-egame-suggest__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #e8e5dd;
  background: transparent;
  text-align: left;
}

.wap-egame-suggest__code {
  color: #777f8e;
  font-size: 10px;
}

.wap-egame-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wap-egame-filter__btn {
  min-width: 60px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #7e8695;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.wap-egame-filter__btn.is-active {
  border-color: rgba(201, 168, 76, 0.2);
  color: var(--eg-gold-hi);
  background: rgba(201, 168, 76, 0.1);
}

.wap-egame-count {
  margin-left: auto;
  padding-right: 4px;
  color: #777f8e;
  font-size: 10px;
}

/* ===== Game grid ===== */
.wap-egame-gamegrid, .wap-egame-skel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 var(--eg-pad);
}

.wap-egame-gamegrid .wap-egame-poster {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.wap-egame-gamegrid .wap-egame-poster__name {
  padding: 8px 8px 10px;
  font-size: 11px;
}

.wap-egame-skel > span {
  display: block;
  aspect-ratio: 0.78;
  border-radius: 14px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.05) 42%, transparent 64%),
    #141820;
  background-size: 220% 100%;
  animation: egm-shimmer 1.2s infinite linear;
}

.wap-egame-recent {
  margin: 0 0 16px;
}

.wap-egame-recent[hidden] {
  display: none;
}

.wap-egame-recent__clear {
  -webkit-appearance: none;
  appearance: none;
  margin: 0 0 0 auto;
  padding: 8px 4px 0;
  min-height: 44px;
  border: 0;
  background: none;
  color: #6f695f;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.wap-egame-recent__clear:active {
  color: #c9a84c;
}

.wap-egame-recent__rail {
  display: flex;
  gap: 10px;
  padding: 0 var(--eg-pad);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.wap-egame-recent__rail::after {
  content: "";
  flex: 0 0 var(--eg-pad);
  width: var(--eg-pad);
  height: 1px;
}

.wap-egame-recent__rail .wap-egame-poster {
  flex-basis: 112px;
  min-width: 112px;
}

.wap-egame-more {
  margin: 18px var(--eg-pad) 0;
  padding: 11px;
  border-radius: 12px;
  color: #727a88;
  background: rgba(255, 255, 255, 0.03);
  font-size: 10px;
  text-align: center;
}

.wap-egame-more[hidden] {
  display: none;
}

.wap-egame-empty {
  margin: 18px var(--eg-pad);
  padding: 28px 18px;
  border: 1px dashed rgba(201, 168, 76, 0.22);
  border-radius: 16px;
  color: #8d95a3;
  background: rgba(201, 168, 76, 0.04);
  text-align: center;
}

.wap-egame-platgrid > .wap-egame-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.wap-egame-empty strong {
  display: block;
  color: #e9e5dc;
  font-size: 15px;
}

.wap-egame-empty p {
  margin: 8px 0 0;
  font-size: 12px;
}

.wap-egame-empty__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.wap-egame-empty__btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #c8c4bc;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
}

.wap-egame-empty__btn--primary {
  border-color: transparent;
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c);
}

/* ===== Guest CTA ===== */
/* 厂牌大厅首屏已有顶栏登录 + Hero 主推，悬浮条会盖热门卡，故隐藏 */
.wap-egame--plats .wap-egame-guestbar {
  display: none;
}

.wap-egame-guestbar {
  position: fixed;
  z-index: 38;
  left: auto;
  right: max(12px, calc((100% - 480px) / 2 + 12px));
  bottom: calc(var(--wap-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  max-width: 118px;
  min-height: 46px;
  padding: 5px;
  border: 1px solid rgba(232, 213, 154, 0.28);
  border-radius: 14px;
  background: rgba(16, 18, 24, 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.wap-egame-guestbar__hint {
  display: none;
}

.wap-egame-guestbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border-radius: 11px;
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c 58%, #8f6f24);
  font-size: 12px;
  font-weight: 800;
}

/* White theme */

@media (max-width: 360px) {
  .wap-egame__title {
    font-size: 28px;
  }

  .wap-egame-tabs {
    gap: 4px;
    padding: 5px;
  }

  .wap-egame-tabs__item {
    min-width: 44px;
    height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .wap-egame-hot__rail .wap-egame-poster.is-feature {
    flex-basis: 68%;
    min-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wap-egame__hero-atmosphere img, .wap-egame__hero-game img, .wap-egame-poster, .wap-egame-platcard, .wap-egame-skel > span, .wap-egame__hero-cta {
    animation: none !important;
  }
}

@keyframes egm-ken {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(-0.6%, 0.4%, 0); }
}

@keyframes egm-game-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1.03); }
}

@keyframes egm-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes egm-shimmer {
  to { background-position: -120% 0; }
}

/* 20260811 go-live polish: readability + touch targets */
.wap-egame__eyebrow, .wap-egame__lead, .wap-egame-toolbar, .wap-egame-search__input, .wap-egame-filter, .wap-egame-platcard__name, .wap-egame-poster__name, .wap-egame-gamecard__name, .wap-egame-empty, .wap-egame-guestbar {
  font-size: max(12px, 1em);
}

.wap-egame-search__input, .wap-egame-filter button, .wap-egame__back, .wap-egame__hero-cta, .wap-egame-platcard, .wap-egame-poster, .wap-egame-gamecard {
  min-height: 44px;
}

/* =========================================================
   20260816lobby1 — 顶级大厅：先摸到游戏 / 进厂检索 / 厂牌手感
   ========================================================= */

.wap-main.wap-egame {
  padding-bottom: calc(var(--wap-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 28px);
  overflow-x: visible;
}

.wap-egame__hero {
  min-height: 210px;
  max-height: 38vh;
}

.wap-egame__hero--compact {
  min-height: 148px;
  max-height: 26vh;
}

.wap-egame__hero-top {
  min-height: inherit;
  padding: 48px var(--eg-pad) 18px;
}

.wap-egame__hero--compact .wap-egame__hero-top {
  padding: 42px var(--eg-pad) 14px;
}

.wap-egame__back {
  top: 14px;
  min-height: 44px;
}

.wap-egame__title {
  font-size: clamp(26px, 7.2vw, 34px);
}

.wap-egame__hero--compact .wap-egame__title {
  font-size: clamp(20px, 5.6vw, 26px);
}

.wap-egame__lead {
  font-size: 12px;
  max-width: 78%;
}

.wap-egame__hero-cta {
  max-width: min(92%, 280px);
}

.wap-egame__hero-cta span {
  max-width: 160px;
}

.wap-egame-tabs {
  position: sticky;
  top: calc(var(--wap-header-h, 52px) + env(safe-area-inset-top, 0px));
  z-index: 12;
  margin-top: -18px;
}

.wap-egame--games .wap-egame-tabs {
  position: static;
  margin-top: -14px;
  margin-bottom: 4px;
}

.wap-egame-poster__cover img {
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.wap-egame-poster__cover img.is-loaded {
  opacity: 1;
}

.wap-egame-poster__play {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: auto;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c 58%, #8f6f24);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.wap-egame-hot__rail .is-feature {
  border-color: rgba(201, 168, 76, 0.42);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(201, 168, 76, 0.16);
}

.wap-egame-poster__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #17130a;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c);
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.wap-egame-gamegrid .wap-egame-poster, .wap-egame-recent__rail .wap-egame-poster {
  display: block;
  aspect-ratio: 1 / 1;
}

.wap-egame-gamegrid .wap-egame-poster__cover, .wap-egame-recent__rail .wap-egame-poster__cover {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: 100%;
}

.wap-egame-gamegrid .wap-egame-poster__name, .wap-egame-recent__rail .wap-egame-poster__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 18px 6px 8px;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 12, 0.88));
  color: #f3ebda;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wap-egame-search__input {
  height: 44px;
  font-size: 16px;
}

.wap-egame-filter__btn {
  min-height: 36px;
}

.wap-egame-suggest {
  max-height: min(240px, 42vh);
}

.wap-egame-suggest__item {
  min-height: 44px;
}

.wap-egame-platcard.is-dim {
  opacity: 0.92;
}

.wap-egame-platcard__name {
  min-width: 0;
}

.wap-egame--games.wap-egame--guest {
  padding-bottom: calc(var(--wap-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 88px);
}

.wap-egame--games .wap-egame-guestbar {
  left: 16px;
  right: 16px;
  width: auto;
  max-width: none;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 14px;
}

.wap-egame--games .wap-egame-guestbar__hint {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: rgba(244, 239, 228, 0.72);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wap-egame--games .wap-egame-guestbar__btn {
  width: auto;
  min-width: 92px;
  flex: 0 0 auto;
}

.wap-egame-skel > span {
  aspect-ratio: 1 / 1;
}

.wap-egame-hot:not(:has(.wap-egame-poster)) {
  display: none;
}

@media (max-width: 360px) {
  .wap-egame__hero {
    min-height: 188px;
  }
  .wap-egame__hero-cta span {
    max-width: 120px;
  }
  .wap-egame-hot__rail .wap-egame-poster.is-feature {
    min-width: 188px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wap-egame-poster__cover img {
    opacity: 1;
    transition: none;
  }
}

/* =========================================================
   20260816lobby2 — 大厅胶囊滑块 + 裂图兜底（不改 PG 厂牌卡）
   ========================================================= */

.wap-egame-tabs__thumb {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 0;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f0dc9a, #c9a84c 60%, #8f6f24);
  box-shadow: 0 8px 18px rgba(201, 168, 76, 0.28);
  transform: translate3d(0, 0, 0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.wap-egame-tabs__item {
  position: relative;
  z-index: 1;
}

.wap-egame-tabs.is-thumb-ready .wap-egame-tabs__item.is-active {
  background: transparent;
  box-shadow: none;
}

.wap-egame-poster {
  box-shadow:
    inset 0 0 0 0.5px rgba(212, 175, 55, 0.38),
    0 12px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease;
}

.wap-egame-poster:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 0 0 0.5px rgba(212, 175, 55, 0.7),
    0 8px 24px rgba(212, 175, 55, 0.2);
}

.wap-egame-poster__cover.is-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.22), transparent 58%),
    var(--card-bg, #10131a);
}

.wap-egame-poster__cover.is-fallback img {
  width: 42%;
  height: 42%;
  object-fit: contain;
  opacity: 1;
  padding: 0;
}

@keyframes lobby-sheen {
  0%, 55% { transform: translateX(-120%) rotate(12deg); }
  80%, 100% { transform: translateX(220%) rotate(12deg); }
}

.wap-egame-hot--desire .wap-egame-poster.is-feature::after {
  content: "";
  position: absolute;
  inset: -40% 60%;
  z-index: 3;
  background: linear-gradient(115deg, transparent 30%, rgba(243, 229, 171, 0.2), transparent 70%);
  transform: translateX(-120%) rotate(12deg);
  animation: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wap-egame-tabs__thumb, .wap-egame-hot--desire .wap-egame-poster.is-feature::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   20260816quiet2 — 大厅收口：少 / 齐 / 快
   ========================================================= */

.wap-main.wap-egame {
  padding-bottom: calc(var(--wap-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 16px);
}

.wap-egame__watermark, .wap-egame-section-head__hint, .wap-egame-guestbar, .wap-egame--games .wap-egame-tabs {
  display: none !important;
}

.wap-egame__hero--quiet {
  min-height: 168px;
  max-height: 28vh;
}

.wap-egame__hero--quiet .wap-egame__hero-top {
  padding: 20px var(--eg-pad) 30px;
}

.wap-egame__hero--quiet .wap-egame__title {
  font-size: clamp(24px, 6.6vw, 32px);
}

.wap-egame__hero--compact .wap-egame__hero-top {
  padding: 42px var(--eg-pad) 16px;
}

.wap-egame--games .wap-egame-toolbar {
  margin-top: 12px;
}

.wap-egame-hot__rail .wap-egame-poster, .wap-egame-hot__rail .wap-egame-poster.is-feature {
  flex: 0 0 44%;
  min-width: 148px;
}

.wap-egame-hot__rail .is-feature .wap-egame-poster__cover {
  aspect-ratio: 1 / 1;
}

.wap-egame-poster__play, .wap-egame-hot--desire .wap-egame-poster.is-feature::after {
  display: none !important;
  content: none;
  animation: none;
}

.wap-egame-poster__cover img, .wap-egame-poster__cover img.is-loaded {
  opacity: 1;
}

.wap-egame-platcard.is-wide, .wap-egame-platcard.wap-egame-platcard--pg.is-wide {
  display: grid;
  grid-column: auto;
  grid-template-columns: none;
  aspect-ratio: auto;
  min-height: 0;
  height: auto;
  background: linear-gradient(160deg, var(--wap-surface-2, #171b23), var(--card-bg, #10131a));
  border: 1px solid var(--eg-line);
  border-radius: 16px;
}

.wap-egame-platcard.is-wide .wap-egame-platcard__art, .wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__art {
  position: relative;
  inset: auto;
  min-height: 108px;
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--wap-gold-rgb, 201, 168, 76), 0.14), transparent 55%),
    var(--wap-surface-2, #12161e);
}

.wap-egame-platcard.is-wide .wap-egame-platcard__logo, .wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__logo {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  max-width: 72% !important;
  max-height: 52px !important;
  transform: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)) !important;
}

.wap-egame-platcard.is-wide .wap-egame-platcard__body, .wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__body {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  padding: 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-left: 0 !important;
}

.wap-egame-platcard.is-wide .wap-egame-platcard__name, .wap-egame-platcard.wap-egame-platcard--pg.is-wide .wap-egame-platcard__name {
  font-size: 13px !important;
}

.wap-egame-platcard.is-dim {
  opacity: 1;
}

/* =========================================================
   20260816lobby33 — 本周热玩：3×3 人气九宫格
   ========================================================= */

.wap-egame-hot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 var(--eg-pad);
}

.wap-egame-hot__grid .wap-egame-poster {
  display: block;
  flex: none;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: unset;
}

.wap-egame-hot__grid .wap-egame-poster__cover {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: 100%;
}

.wap-egame-hot__grid .wap-egame-poster__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px 4px 7px;
  overflow: hidden;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 12, 0.88));
  color: #f3ebda;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 宝盈封面铺满方卡，吃掉 1px 黑线；其它厂不动 */
.wap-egame-gamegrid .wap-egame-poster[data-plat="BBIN"] .wap-egame-poster__cover img, .wap-egame-recent__rail .wap-egame-poster[data-plat="BBIN"] .wap-egame-poster__cover img {
  transform: scale(1.04);
}

/* 开元封面铺满方卡，吃掉裁完仍剩的 1px 黑线；其它厂不动 */
.wap-egame-gamegrid .wap-egame-poster[data-plat="KY"] .wap-egame-poster__cover img, .wap-egame-recent__rail .wap-egame-poster[data-plat="KY"] .wap-egame-poster__cover img {
  transform: scale(1.08);
}

/* V8 棋牌：裁完仍可能剩圆角黑边，只放大这一家 */
.wap-egame-gamegrid .wap-egame-poster[data-plat="V8"] .wap-egame-poster__cover img, .wap-egame-recent__rail .wap-egame-poster[data-plat="V8"] .wap-egame-poster__cover img {
  transform: scale(1.12);
}

