/* 用途 玩家端基础样式，包括首页排版、卡片、轮播、详情弹窗、落地页和响应式规则。 */
@font-face {
  font-family: "Gamia Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/inter-latin-variable.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --bg: #f8fbff;
  --ink: #153153;
  --muted: #5d708a;
  --cyan: #1468d5;
  --surface: #ffffff;
  --border: #dce7f5;
  --on-media: #ffffff;
  --media-surface: #eaf1fa;
  --card-shadow: 0 4px 16px #1f4a780a;
  --play-gradient: linear-gradient(110deg, #1769df 0%, #0959c9 100%);
  --ui-font: "Gamia Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --rail-poster-size: clamp(160px, 46vw, 184px);
  --carousel-poster-size: clamp(168px, 50vw, 200px);
}
.recommendation-placeholder { aspect-ratio: 1; min-height: 80px; background: var(--media-surface); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: #edf4fc;
  font: 13px/1.45 var(--ui-font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, .carousel-track:focus-visible,
.module[data-display-style="poster_rail"] > :is(.grid3, .icon-grid):focus-visible,
.grid2[tabindex]:focus-visible {
  outline: 2px solid #1769df;
  outline-offset: 2px;
}
.page {
  max-width: 460px;
  margin: auto;
  min-height: 100vh;
  padding: 0 16px 24px;
  background: radial-gradient(ellipse 460px 300px at 0 0, #dcecff, transparent 90%), var(--bg);
}
.brand-header { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: baseline; gap: 7px; }
.brand img { display: block; width: 32px; height: auto; }
.brand strong {
  /* The rounded controller grips need a small overshoot below the flat letterforms. */
  transform: translateY(-1px);
  color: #1d56d8;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.7px;
  font-style: normal;
  font-weight: 800;
}
@supports (background-clip: text) {
  .brand strong {
    background: linear-gradient(100deg, #1742bc 5%, #2059db 54%, #0875cb 100%);
    background-clip: text;
    color: transparent;
  }
}
@media (forced-colors: active) {
  .brand strong { color: LinkText; }
}
.brand-header > span { font-size: 12px; color: var(--muted); }
.module { position: relative; isolation: isolate; margin: 0 0 16px; }
.module h2 { color: #153c85; font-size: 17px; font-weight: 700; line-height: 24px; margin: 0 0 8px; letter-spacing: -.025em; }
/* Sections share the page backdrop: no enclosing card, outline or surface.
   Artwork keeps its own rounding and fixed template geometry. */
.module:has(+ .recent-games:not([hidden])) { margin-bottom: 12px; }
.game-card, .feature-info, .grid-meta { min-width: 0; }
.game-card img[data-src] { opacity: 0; }
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--slot, 1);
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  background: var(--media-surface);
  isolation: isolate;
}
.media > .poster-link { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; }
.media > img, .media > a, .media > a > img, .media > .poster-link, .poster-link > img {
  display: block;
  width: 100%;
  height: 100%;
}
.media img { object-fit: contain; object-position: center; }
.media-unavailable { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: var(--muted); font-size: 12px; }
.media.is-loading::before {
  content: ""; position: absolute; z-index: 1; left: 50%; top: 50%;
  width: clamp(32px, 16%, 52px); aspect-ratio: 596/466;
  background: url('/gamia-brand-d51abc8d8bf472c4.webp') center/contain no-repeat;
  transform: translate(-50%, -50%); pointer-events: none; opacity: .72;
}
.media.is-loading.is-loading-visible::before { animation: gamia-media-breathe 2.2s ease-in-out infinite; }
@keyframes gamia-media-breathe {
  0%,100% { transform: translate(-50%,-50%) scale(.94); opacity: .55; }
  50% { transform: translate(-50%,-50%) scale(1.03); opacity: 1; }
}
.media .poster-motion {
  position: absolute;
  inset: 0;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.media .poster-motion.is-playing { opacity: 1; }
.game-label {
  --label-width: 35px;
  --label-height: 16px;
  --label-inset: 5px;
  position: absolute;
  z-index: 2;
  top: var(--label-inset);
  right: var(--label-inset);
  width: var(--label-width);
  height: var(--label-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 3px;
  background: #102044;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.game-label:not(.game-label--ribbon) {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}
.game-label:not(.game-label--ribbon)::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #27d4f2;
}
.game-label[data-game-label="HOT"]::before { background: #ffad49; }
.game-label--ribbon {
  top: 0;
  right: 0;
  width: clamp(65px, 21vw, 82px);
  height: auto;
  aspect-ratio: 240 / 108;
  border-radius: 0;
  background: url('/game-label-hot.png') top right / 100% auto no-repeat;
  font-size: 0;
}
.game-label--ribbon[data-game-label="NEW"] { background-image: url('/game-label-new.png'); }
:is(.grid2, .portrait-grid, .poster-carousel) .game-label--compact {
  --label-width: 42px;
  --label-height: 19px;
  --label-inset: 7px;
  font-size: 10px;
}
.feature .game-label--compact { --label-width: 37px; --label-height: 17px; }
@media (forced-colors: active) {
  .game-label.game-label--ribbon { background: Canvas; color: CanvasText; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .media .poster-motion { transition: none; } }
.hero .media { --slot: 16/9; border-radius: 16px; }
.grid2 .media { --slot: 1; border-radius: 12px; }
.portrait-grid .media { --slot: 2/3; border-radius: 16px; }
.feature .media { --slot: 1; align-self: center; width: 100%; border-radius: 12px; }
.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 800;
  line-height: 18px;
  color: var(--cyan);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.media .rating, .recent-art .rating { color: #21c5ff; text-shadow: 0 1px 3px #000e, 0 0 6px #00142c; }
.rating .star { font-size: 1em; line-height: 1; }
.media-rating, .media-caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(transparent, #030b21df);
}
.media-rating { justify-content: center; padding: 16px 5px 4px; }
.media-caption { gap: 8px; padding: 20px 10px 7px; }
.hero-caption {
  gap: 10px;
  padding: 25px 14px 8px;
  background: linear-gradient(transparent, #030b21 110%);
}
.hero-caption .overlay-name {
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.016em;
  color: #fff;
}
.hero-caption .rating { font-size: 14px; font-weight: 800; }
.hero-caption .play {
  min-width: 56px;
  min-height: 30px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}
.portrait-caption { padding: 18px 9px 8px; gap: 5px; }
.media-caption .play { pointer-events: auto; }
.media-caption .rating { flex-shrink: 0; }
.game-name, .overlay-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: var(--ink);
}
.overlay-name { flex: 1; font-size: 14px; color: var(--on-media); text-shadow: 0 1px 3px #000; }
.portrait-caption .overlay-name { font-size: 12px; }
.play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 55px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--play-gradient);
  color: #ffffff;
  font: 600 14px/22px var(--ui-font);
  white-space: nowrap;
}
.play::before { content: ""; position: absolute; inset: -7px -1px; }
.play:hover { filter: brightness(1.1); }
.play:active { filter: brightness(.92); }
button[data-action="poster"] { padding: 0; border: 0; background: none; }
html:has(#game-detail) { scrollbar-gutter: stable; }
.detail-open { overflow: hidden; }
.detail-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 460px);
  max-width: none;
  max-height: 100%;
  max-height: calc(100dvh - 12px);
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -12px 48px #163d762b;
  overscroll-behavior: contain;
}
.detail-sheet[open] { animation: detail-enter .24s ease-out; }
.detail-sheet::backdrop { background: #10284480; }
.detail-panel { padding: 16px 16px 0; }
.detail-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.detail-icon { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; }
.detail-header h2 { margin: 0; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
#detail-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.detail-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 14px;
  background: #070e1c;
}
.has-portrait-video .detail-media {
  aspect-ratio: auto;
  height: min(56vh, 480px, calc(100vh - 240px));
  height: min(56dvh, 480px, calc(100dvh - 240px - env(safe-area-inset-bottom, 0px)));
}
.detail-media img, .detail-media video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-media video { background: #070e1c; opacity: 0; }
.detail-media video.is-playing { opacity: 1; }
.detail-retry { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); min-height: 44px; padding: 8px 16px; border: 1px solid #ffffff80; border-radius: 24px; background: #102844e8; color: var(--on-media); white-space: nowrap; }
.detail-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
}
.detail-footer .play { width: 100%; min-height: 48px; }
.detail-footer .play::before { content: none; }
.detail-description, .detail-launch-hint { margin: 0; color: var(--muted); }
.detail-description { margin-top: 10px; font-size: 12px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-launch-hint { margin-top: 8px; text-align: center; font-size: 12px; line-height: 18px; }
.detail-score-label { color: var(--muted); font-size: 12px; }
.recent-games { position: relative; isolation: isolate; margin: 0 0 14px; padding: 4px 0 12px; }
.recent-games::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -16px;
  border-radius: 0; pointer-events: none;
  background: linear-gradient(135deg, #d8e9ff 0%, #cde2ff 55%, #bdd8ff 100%);
}
.recent-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recent-heading h2 { margin: 0; color: #153c85; font-size: 17px; font-weight: 700; line-height: 24px; letter-spacing: -.025em; }
.recent-heading button, .recent-footer button { min-height: 44px; padding: 6px 0 6px 12px; color: #4059a2; background: none; border: 0; font-size: 12px; font-weight: 500; }
.recent-grid { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 4); justify-content: start; gap: 8px; overflow-x: auto; padding: 6px 0 0; overscroll-behavior-inline: contain; scrollbar-width: none; }
.recent-grid::-webkit-scrollbar { display: none; }
.recent-card { display: block; width: 100%; min-width: 0; padding: 0; text-align: center; color: var(--ink); background: none; border: 0; }
.recent-art { position: relative; display: block; width: 100%; height: auto; margin-inline: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface); }
.recent-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recent-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; margin: 6px 0 2px; font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
.recent-card time { display: block; color: var(--muted); font-size: 12px; }
.recent-games:not(.is-expanded) .recent-name, .recent-games:not(.is-expanded) time { display: none; }
.recent-games.is-expanded .recent-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; overflow-x: visible; }
.recent-footer { display: flex; justify-content: flex-end; margin-top: 4px; }
.recent-status:empty { display: none; }
.recent-status { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.embedded-game { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; border: 0; background: var(--bg); color: var(--ink); }
.embedded-game[open] { display: flex; flex-direction: column; }
.embedded-game::backdrop { background: var(--bg); }
.embedded-game__header { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 60px; padding: max(6px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) 6px max(10px,env(safe-area-inset-left,0px)); border-bottom: 1px solid var(--border); }
.embedded-game__header h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embedded-game__header button { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 14px; color: var(--ink); background: var(--surface); font-size: 24px; }
.embedded-game__body { position: relative; flex: 1; min-height: 0; padding-bottom: env(safe-area-inset-bottom,0px); }
.embedded-game iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.embedded-game__loading { position: absolute; inset: 0; display: grid; place-content: center; background: var(--bg); }
.catalog-more { display: grid; justify-items: center; gap: 6px; margin-top: 12px; }
.catalog-more p { margin: 0; color: var(--muted); }
.catalog-more .play { min-height: 44px; }
.catalog-pagination[data-catalog-next] {
  display: flex;
  align-items: center;
  overflow-x: auto;
  min-height: 24px;
  margin-top: 10px;
  overflow-anchor: none;
}
.catalog-pagination > .catalog-hint,
.catalog-pagination > .catalog-loading {
  flex: none;
  margin-inline: auto;
}
.catalog-hint {
  display: inline-flex;
  align-items: center;
  gap: .46em;
  white-space: nowrap;
  color: #365b8a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.385;
}
.catalog-hint__chevrons {
  position: relative;
  flex: 0 0 1.23em;
  height: 1.23em;
}
.catalog-hint__chevrons::before,
.catalog-hint__chevrons::after {
  content: "";
  position: absolute;
  left: .31em;
  width: .615em;
  height: .615em;
  border: solid currentColor;
  border-width: 0 .115em .115em 0;
  transform: rotate(45deg);
}
.catalog-hint__chevrons::before { top: 0; }
.catalog-hint__chevrons::after { top: .385em; }
.catalog-loading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3d5675;
  font-size: 12px;
  font-weight: 600;
}
.catalog-loading__logo {
  width: 18px;
  height: 14px;
  background: url('/gamia-brand-d51abc8d8bf472c4.webp') center / contain no-repeat;
  animation: catalog-logo-breathe .85s ease-in-out infinite alternate;
}
@keyframes catalog-logo-breathe {
  from { transform: scale(.98); opacity: .9; }
  to { transform: scale(1.05); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .catalog-loading__logo { animation: none; } }
.page:has([data-home-catalog]) > #footer { display: none; }
@keyframes detail-enter { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .detail-sheet[open] { animation: none; } }
.game-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 2px;
}
.grid2, .grid3, .icon-grid, .portrait-grid { display: grid; }
.grid2 {
  grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 8px) / 2); gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; overscroll-behavior-inline: contain; scrollbar-width: none;
}
.grid2::-webkit-scrollbar { display: none; }
.grid2 > .game-card { scroll-snap-align: start; }
.grid3, .icon-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 8px; }
.grid3 .media, .icon-grid .media { --slot: 1; }
.portrait-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.grid3 .game-name, .icon-grid .game-name { margin: 6px 0 0; text-align: center; height: 18px; }
.grid3 .game-name, .icon-grid .game-name, .grid-info .game-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; -webkit-line-clamp: unset; }
.icon-grid .rating { font-size: 14px; }
.grid3 .media img, .icon-grid .media img { object-fit: cover; }
.icon-grid .media-rating { padding-top: 12px; }
/* A CMS-selectable large-poster rail; the full catalog keeps its normal grid. */
.module[data-display-style="poster_rail"] > :is(.grid3, .icon-grid) {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: var(--rail-poster-size);
  align-items: start;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 4px;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.module[data-display-style="poster_rail"] > :is(.grid3, .icon-grid)::-webkit-scrollbar { display: none; }
.module[data-display-style="poster_rail"] .game-card { scroll-snap-align: start; }
.module[data-display-style="poster_rail"] .recommendation-placeholder { aspect-ratio: auto; height: calc(var(--rail-poster-size) + 26px); }
.module[data-display-style="poster_rail"] .game-name { height: 20px; font-size: 14px; line-height: 20px; text-align: left; }
.module[data-display-style="poster_rail"] .rating { font-size: 15px; }
.grid2 .game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}
.grid-info { flex: 1; display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 8px; gap: 8px; }
.rail-hint { margin: 4px 0 0; color: var(--muted); text-align: right; font-size: 11px; line-height: 16px; }
.grid-info .game-name, .feature-info .game-name { font-weight: 600; line-height: 18px; }
.grid-info-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; }
.grid-meta { flex: 1; display: grid; gap: 3px; }
.feature {
  display: grid;
  grid-template-columns: min(58%, 196px) minmax(0,1fr);
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}
.feature-info { display: flex; align-self: stretch; flex-direction: column; gap: 5px; padding: 0; }
.feature-info .game-name { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; white-space: normal; font-size: 14px; line-height: 20px; }
.feature-info .description { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; white-space: normal; }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; color: #2461a9; font-size: 11px; line-height: 16px; }
.feature-tags li { min-width: 0; max-width: 100%; padding: 2px 7px; border: 1px solid #c5dbf8; border-radius: 999px; background: #edf5ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-actions { display: flex; margin-top: auto; padding-top: 5px; }
.feature-actions .play { width: 100%; min-width: 0; min-height: 32px; }
.feature-actions .play::before { inset: -6px 0; }
.description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.grid-meta .description { -webkit-line-clamp: 1; }
.game-tags { display: flex; gap: 3px; overflow: hidden; }
.game-tags:empty { display: none; }
.game-tags span {
  display: block;
  min-width: 0;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 9px;
  line-height: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poster-carousel {
  position: relative;
  --center-width: var(--carousel-poster-size);
  --carousel-gap: 12px;
}
.hero-carousel { --center-width: 100%; }
.hero-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 26px;
}
.hero-indicator {
  display: grid;
  place-items: center;
  width: 17px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.hero-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #b5c8e2;
}
.hero-indicator[aria-current="true"]::before { width: 13px; background: #1769df; }
.hero-carousel .carousel-arrow { top: calc((100% - 32px) / 2); }
.carousel-footer { position: relative; display: flex; justify-content: center; align-items: center; min-height: 32px; }
.carousel-motion-toggle { position: absolute; right: 0; min-height: 32px; padding: 4px 0 4px 8px; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-sliding { scroll-snap-type: none; }
.carousel-track::before, .carousel-track::after { content: ""; flex: 0 0 max(0px, calc((100% - var(--center-width))/2 - var(--carousel-gap))); }
.hero-carousel .carousel-track::before, .hero-carousel .carousel-track::after { content: none; }
.carousel-track > .game-card { flex: 0 0 var(--center-width); scroll-snap-align: center; }
.carousel-track .media { border-radius: 12px; }
.poster-carousel:not(.hero-carousel) .media { transition: transform 240ms ease; }
.poster-carousel:not(.hero-carousel) .game-card[data-position=before] .media { transform: scale(.89); transform-origin: right center; }
.poster-carousel:not(.hero-carousel) .game-card[data-position=after] .media { transform: scale(.89); transform-origin: left center; }
.poster-carousel .carousel-track.is-repositioning .media { transition: none; }
.carousel-arrow {
  position: absolute;
  z-index: 1;
  top: calc((100% - 32px) / 2);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #ffffffb3;
  background: #ffffffed;
  box-shadow: 0 2px 8px #15315329;
  opacity: 0;
  pointer-events: none;
}
.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }
.carousel-arrow img { width: 16px; filter: brightness(0) saturate(100%); }
.carousel-prev img { transform: rotate(-90deg); }
.carousel-next img { transform: rotate(90deg); }
.carousel-arrow:focus-visible { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .poster-carousel:hover .carousel-arrow:not(:disabled) { opacity: 1; pointer-events: auto; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.review-note { font-size: 12px; color: #315d91; background: #eaf3ff; border: 1px solid #cddff5; padding: 8px 10px; border-radius: 8px; margin: 0 0 13px; }
.status { padding: 30px 5px; text-align: center; color: var(--muted); }
footer { font-size: 12px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.retry { border: 1px solid #cddff5; background: #eaf3ff; color: #1557b8; padding: 8px 12px; border-radius: 7px; }
.gamia-loader {
  display: grid; justify-items: center; align-content: center; gap: 12px;
  min-height: calc(100vh - 112px); min-height: clamp(260px, calc(100svh - 112px), 720px);
  padding: 32px 18px; text-align: center;
  color: var(--muted);
}
.gamia-loader__brand { position: relative; isolation: isolate; display: grid; place-items: center; width: 104px; height: 88px; }
.gamia-loader__brand::before {
  content: ""; position: absolute; inset: 15px 8px; z-index: -1;
  border-radius: 50%; background: linear-gradient(120deg,#7829ff88,#00bfff66);
  filter: blur(22px); animation: gamia-halo-breathe 2.2s ease-in-out infinite;
}
.gamia-loader__logo { width: 80px; height: auto; animation: gamia-logo-breathe 2.2s ease-in-out infinite; }
.gamia-loader__wordmark { font-size: 19px; font-style: normal; font-weight: 800; color: #1d56d8; letter-spacing: .035em; }
.gamia-loader p { margin: 0; max-width: 280px; font-size: 13px; line-height: 20px; }
.gamia-loader .retry { margin-top: 4px; min-height: 44px; padding: 10px 22px; }
.gamia-loader--compact { min-height: 0; gap: 7px; padding: 14px; }
.gamia-loader--compact .gamia-loader__brand { width: 70px; height: 58px; }
.gamia-loader--compact .gamia-loader__logo { width: 52px; }
.gamia-loader--compact .gamia-loader__wordmark { font-size: 14px; }
.gamia-loader--compact p { font-size: 12px; }
.detail-media > .gamia-loader { position: absolute; inset: 0; z-index: 1; background: var(--media-surface); pointer-events: none; }
.detail-media > .gamia-loader .gamia-loader__logo { position: static; inset: auto; height: auto; }
.gamia-loader[data-loading-state="error"] .gamia-loader__logo,
.gamia-loader[data-loading-state="error"] .gamia-loader__brand::before { animation: none; }
@keyframes gamia-logo-breathe { 0%,100% { transform: scale(.93); opacity: .6; } 50% { transform: scale(1.035); opacity: 1; } }
@keyframes gamia-halo-breathe { 0%,100% { transform: scale(.85); opacity: .4; } 50% { transform: scale(1.15); opacity: .85; } }
@media (prefers-reduced-motion: reduce) {
  .gamia-loader__logo, .gamia-loader__brand::before, .media.is-loading.is-loading-visible::before { animation: none; }
}
.landing { padding-top: 24px; }
.landing .landing-icon { width: 88px; height: 88px; border-radius: 20px; margin: 24px auto 12px; }
.landing h1 { text-align: center; font-size: 24px; }
.landing p { text-align: center; color: var(--muted); }
.landing-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 24px 0; }
.landing-actions .play { min-width: 180px; padding: 12px 20px; }
.landing-note { font-size: 11px; }
.back-link { font-size: 12px; color: #1468d5; }
.inline-error { color: #b42338; }
@media (max-width: 350px) {
  .brand-header { height: 58px; }
  .hero-caption { gap: 6px; padding-inline: 8px; }
  .hero-caption .rating { font-size: 14px; }
  .portrait-caption .rating { font-size: 13px; }
}
.feature-icon-link { display: block; align-self: flex-start; }
.footer-note { margin: 10px 0 0; text-align: center; }
@media (max-width: 600px) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; }
}

#game-action-status:not([hidden]){position:fixed;z-index:25;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(92vw,390px);margin:0;padding:12px 16px;background:#fff;border:1px solid #d9e7f5;border-radius:12px;box-shadow:0 4px 18px #13304c24}
.detail-footer .native-launch:not([hidden]){margin-bottom:8px}

/* A normal second-screen link, separate from game cards and their tracking. */
.more-games-entry { margin: 2px 0 16px; }
.more-games-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid #bed6f5; border-radius: 14px;
  background: #edf5ff; color: #1557b8;
  font-size: 14px; line-height: 22px; font-weight: 600;
}
.more-games-link svg { flex: 0 0 20px; width: 20px; height: 20px; }
.more-games-link .more-games-arrow { margin-left: auto; }
.more-games-link:hover { background: #dfedff; border-color: #8cb8ef; }
.more-games-link:active { background: #d2e5ff; }
