/*
Theme Name: PixelPlay 游戏导航
Author: PixelPlay
Description: HTML5 小游戏平台主题，包含推荐拼贴、游戏轮播、分类搜索、沉浸式播放页，并集成 Game Platform 后台。
Version: 3.10.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pixelplay
*/

:root {
  --brand-100: #6842ff;
  --brand-80: #7c5cff;
  --brand-60: #a48eff;
  --green: #39d98a;
  --red: #ff4f70;
  --orange: #ff9f43;
  --black-100: #0c0d14;
  --black-90: #13141e;
  --black-80: #1a1b28;
  --black-70: #212233;
  --black-60: #28293d;
  --black-50: #2f3148;
  --black-40: #373952;
  --white-100: #f9faff;
  --white-80: #d9dbea;
  --white-50: #aaadbe;
  --white-30: #777b92;
  --header-height: 60px;
  --sidebar-width: 60px;
  --sidebar-expanded: 200px;
  --bottom-nav-height: 56px;
  --tile-radius: 16px;
  --page-gap: 16px;
  --shadow-lg: 0 20px 50px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 12px); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(104,66,255,.075), transparent 26rem),
    var(--black-100);
  color: var(--white-100);
  font-family: Nunito, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}
body, button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; }
button { border: 0; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin-top: 0; }
.site-shell { min-height: 100vh; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-fill { fill: currentColor; stroke-width: 1.35; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 0; padding: 10px 14px;
  left: 8px; top: 8px; z-index: 10000; background: #fff; color: #111; border-radius: 8px;
}

/* Fixed header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--black-80);
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
}
.site-brand {
  width: 188px;
  min-width: 188px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -.5px;
  text-transform: uppercase;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-100), #9f45ff);
  box-shadow: 0 7px 20px rgba(104,66,255,.32);
}
.brand-mark:before, .brand-mark i {
  content: ""; position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.28); transform: rotate(45deg); border-radius: 5px;
}
.brand-mark i { width: 11px; height: 11px; border-color: rgba(255,255,255,.18); }
.brand-mark b { position: relative; z-index: 2; font-size: 17px; line-height: 1; }
.brand-name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-brand-logo { display: block; width: auto; max-width: 178px; max-height: 42px; object-fit: contain; }
.search-form {
  position: relative;
  height: 40px;
  width: min(460px, calc(100vw - 520px));
  margin-left: auto;
  margin-right: auto;
}
.search-form > .icon {
  position: absolute; left: 15px; top: 9px; z-index: 2;
  color: var(--white-50); width: 20px; height: 20px;
}
.search-form input[type="search"] {
  width: 100%; height: 40px;
  border: 2px solid transparent;
  border-radius: 30px;
  outline: 0;
  background: var(--black-40);
  color: var(--white-100);
  padding: 0 18px 0 44px;
  font-weight: 700;
  font-size: 15px;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.search-form input::placeholder { color: var(--white-50); opacity: 1; }
.search-form input:focus { background: var(--black-50); border-color: var(--brand-60); box-shadow: 0 0 0 3px rgba(104,66,255,.18); }
.header-actions { min-width: 188px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.header-action {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; color: var(--white-80); background: var(--black-70);
  cursor: pointer; transition: background .15s, color .15s, transform .15s;
}
.header-action:hover { color: #fff; background: var(--black-40); transform: translateY(-1px); }
.header-action-primary { color: #fff; background: var(--brand-100); }
.header-action-primary:hover { background: var(--brand-80); }
.header-action.is-vip { color: #1b1606; background: linear-gradient(135deg,#ffd86b,#ffad3d); }
.pwa-install-button[hidden] { display: none !important; }
.pwa-install-button.is-available { color: #fff; background: linear-gradient(135deg,#6842ff,#9f45ff); box-shadow: 0 7px 20px rgba(104,66,255,.26); }

/* Installable web app */
.pwa-install-sheet[hidden] { display: none; }
.pwa-install-sheet { position: fixed; z-index: 10010; inset: 0; display: grid; place-items: center; padding: 20px; }
.pwa-install-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(4,5,10,.76); backdrop-filter: blur(9px); cursor: default; }
.pwa-install-dialog { position: relative; width: min(100%,420px); padding: 28px; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 26px; background: linear-gradient(155deg,#25273a,#151620 72%); box-shadow: 0 30px 80px rgba(0,0,0,.56); text-align: center; }
.pwa-install-dialog:before { content:""; position:absolute; width:210px; height:210px; top:-125px; left:-75px; border-radius:50%; background:rgba(104,66,255,.28); filter:blur(12px); pointer-events:none; }
.pwa-install-dialog img { position: relative; width: 72px; height: 72px; margin: 0 auto 13px; border-radius: 18px; box-shadow: 0 12px 32px rgba(65,35,209,.42); }
.pwa-install-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; color: var(--white-50); background: var(--black-50); cursor: pointer; font-size: 26px; line-height: 1; }
.pwa-install-close:hover,.pwa-install-close:focus-visible { color:#fff; background:var(--black-40); }
.pwa-install-eyebrow { margin: 0 0 4px; color: var(--brand-60); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.pwa-install-dialog h2 { margin: 0; font-size: 24px; line-height: 1.25; }
.pwa-install-copy { margin: 9px auto 20px; max-width: 330px; color: var(--white-50); font-size: 13px; }
.pwa-install-steps { display: grid; gap: 8px; margin: 0 0 18px; text-align: left; }
.pwa-install-steps li { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--black-50); border-radius: 14px; background: rgba(12,13,20,.56); color: var(--white-80); font-weight: 750; }
.pwa-install-steps b { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #fff; background: var(--brand-100); font-size: 12px; }
.pwa-install-done { width: 100%; min-height: 46px; border-radius: 14px; color: #fff; background: var(--brand-100); cursor: pointer; font-weight: 900; }
.pwa-install-done:hover,.pwa-install-done:focus-visible { background: var(--brand-80); }
body.pwa-sheet-open { overflow: hidden; }
body.pixelplay-learning-app .pwa-install-sheet,body.pixelplay-learning-app .pwa-install-button { display:none!important; }

/* Collapsible desktop navigation */
.site-sidebar {
  position: fixed;
  top: var(--header-height); bottom: 0; left: 0;
  z-index: 90;
  width: var(--sidebar-width);
  background: var(--black-100);
  border-right: 1px solid var(--black-60);
  overflow: hidden;
  transition: width .18s ease, box-shadow .18s ease;
}
.site-sidebar:hover, .site-sidebar:focus-within { width: var(--sidebar-expanded); box-shadow: 14px 0 30px rgba(0,0,0,.32); }
.side-nav { width: var(--sidebar-expanded); height: 100%; overflow-x: hidden; overflow-y: auto; padding: 8px 0 14px; scrollbar-width: thin; scrollbar-color: var(--black-50) transparent; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: var(--black-50); border-radius: 8px; }
.side-nav-item {
  width: var(--sidebar-expanded); height: 34px;
  display: flex; align-items: center;
  border-left: 6px solid transparent;
  color: var(--white-50);
  font-size: 14px; font-weight: 700;
  transition: color .13s, background .13s, border-color .13s;
}
.side-nav-item:hover { color: #fff; background: var(--black-80); }
.side-nav-item.is-active { color: #fff; border-left-color: var(--brand-100); background: linear-gradient(90deg, rgba(104,66,255,.2), transparent); }
.side-icon { width: 54px; min-width: 54px; height: 34px; display: grid; place-items: center; }
.side-icon .icon { width: 21px; height: 21px; }
.side-label { padding-right: 12px; white-space: nowrap; opacity: 0; transform: translateX(-5px); transition: opacity .12s, transform .16s; }
.site-sidebar:hover .side-label, .site-sidebar:focus-within .side-label { opacity: 1; transform: none; }
.side-divider { height: 1px; margin: 8px 10px; background: var(--black-60); }
.side-section-label { color: var(--white-30); font-size: 10px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; padding: 4px 14px 7px 60px; opacity: 0; white-space: nowrap; }
.site-sidebar:hover .side-section-label, .site-sidebar:focus-within .side-section-label { opacity: 1; }
.category-icon { font-size: 17px; filter: saturate(.9); }

/* Main layout */
.site-main {
  min-height: calc(100vh - var(--header-height));
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 14px) var(--page-gap) 48px;
  transition: margin-left .18s;
}
.site-footer {
  margin-left: var(--sidebar-width);
  min-height: 72px;
  padding: 24px 18px 30px;
  border-top: 1px solid var(--black-60);
  color: var(--white-30);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px;
  font-size: 12px;
}

/* Carousel headings */
.game-section, .spotlight-section, .recent-section, .vibe-section { margin: 0 0 18px; }
.carousel-heading { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; }
.carousel-title { min-width: 0; display: inline-flex; align-items: center; gap: 2px; color: var(--white-100); }
.carousel-title h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 800; letter-spacing: -.35px; }
.carousel-title .icon { width: 20px; height: 20px; color: var(--white-50); transition: transform .15s, color .15s; }
a.carousel-title:hover .icon { color: #fff; transform: translateX(3px); }
.carousel-controls { display: flex; gap: 6px; }
.carousel-heading-actions{display:flex;align-items:center;gap:7px}
.carousel-more{min-height:34px;padding:0 8px 0 11px;display:inline-flex;align-items:center;justify-content:center;gap:1px;border-radius:10px;color:var(--white-50);font-size:13px;font-weight:900;touch-action:manipulation}
.carousel-more:hover,.carousel-more:focus-visible{color:#fff;background:var(--black-50)}
.carousel-more .icon{width:17px;height:17px}
.carousel-button {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--white-80); background: var(--black-70);
  transition: color .14s, background .14s, opacity .14s;
}
.carousel-button .icon { width: 18px; height: 18px; }
.carousel-button:hover { color: #fff; background: var(--black-40); }
.carousel-button:disabled { opacity: .28; cursor: default; }
.game-carousel, .spotlight-carousel { overflow: hidden; }
.carousel-track, .spotlight-track {
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
}
.carousel-track::-webkit-scrollbar, .spotlight-track::-webkit-scrollbar { display: none; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4px) / 2);
  gap: 4px; padding: 12px 0 14px;
}

/* Standard game tile */
.game-tile { min-width: 0; scroll-snap-align: start; }
.game-tile-link { display: block; min-width: 0; border-radius: var(--tile-radius); }
.game-tile-media {
  position: relative; display: block; overflow: hidden;
  width: 100%; aspect-ratio: 178 / 100;
  border-radius: var(--tile-radius);
  background: var(--black-70);
  transform: translateZ(0);
  box-shadow: 0 7px 18px rgba(0,0,0,.16);
}
.game-tile-media > img, .game-tile-media > .game-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease, filter .25s ease; }
.game-tile-link:hover .game-tile-media > img, .game-tile-link:hover .game-tile-media > .game-placeholder { transform: scale(1.045); filter: saturate(1.08); }
.tile-overlay {
  position: absolute; z-index: 3; inset: auto 0 0;
  min-height: 52%; padding: 30px 11px 9px;
  display: flex; align-items: flex-end; gap: 7px;
  background: linear-gradient(0deg, rgba(8,9,15,.93) 0, rgba(8,9,15,.66) 46%, transparent 100%);
  transform: translateY(30%); opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
.tile-overlay strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 18px; font-weight: 800; }
.tile-overlay small { margin-left: auto; color: #ffd86b; font-size: 10px; font-weight: 800; white-space: nowrap; }
.game-tile-link:hover .tile-overlay, .game-tile-link:focus-visible .tile-overlay { opacity: 1; transform: none; }
.tile-badge {
  position: absolute; z-index: 4; top: 8px; left: 8px;
  border-radius: 7px; padding: 4px 7px;
  color: #fff; background: var(--red);
  font-size: 10px; line-height: 13px; font-weight: 900;
  box-shadow: 0 4px 12px rgba(0,0,0,.24);
}
.badge-featured { background: var(--brand-100); }
.badge-learning { background: #168a55; }
.badge-new { background: #19a974; }
.badge-hot { background: #ff4f50; }

/* Locally generated fallback covers */
.game-placeholder {
  position: relative; display: grid; place-items: center; overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg,#42308d,#182e66);
}
.game-placeholder:before, .game-placeholder:after {
  content: ""; position: absolute; z-index: -1; border-radius: 999px; filter: blur(1px);
}
.game-placeholder:before { width: 70%; aspect-ratio: 1; right: -24%; top: -42%; background: rgba(255,255,255,.19); box-shadow: -80px 110px 0 rgba(255,255,255,.055); }
.game-placeholder:after { width: 58%; aspect-ratio: 1; left: -22%; bottom: -54%; background: rgba(0,0,0,.24); }
.placeholder-shine { position: absolute; inset: -70% auto auto -30%; width: 40%; height: 220%; transform: rotate(28deg); background: rgba(255,255,255,.08); }
.placeholder-icon { font-size: clamp(34px, 6vw, 78px); filter: drop-shadow(0 12px 15px rgba(0,0,0,.34)); transform: rotate(-4deg); }
.game-placeholder > strong { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-tile .game-placeholder > strong, .spotlight-card .game-placeholder > strong, .external-game-poster .game-placeholder > strong { display: none; }
.game-placeholder-1 { background: linear-gradient(135deg,#c33a74,#552474); }
.game-placeholder-2 { background: linear-gradient(135deg,#047e92,#173b72); }
.game-placeholder-3 { background: linear-gradient(135deg,#e06a2d,#812c51); }
.game-placeholder-4 { background: linear-gradient(135deg,#23875d,#173d78); }
.game-placeholder-5 { background: linear-gradient(135deg,#7543df,#24378e); }
.game-placeholder-6 { background: linear-gradient(135deg,#b48220,#8b335e); }
.game-placeholder-7 { background: linear-gradient(135deg,#2677ae,#4f2a91); }
.game-placeholder-8 { background: linear-gradient(135deg,#d64646,#6f2ba5); }
.game-placeholder-9 { background: linear-gradient(135deg,#138e81,#3f397a); }
.game-placeholder-10 { background: linear-gradient(135deg,#3c65cf,#1f8c9e); }
.game-placeholder-11 { background: linear-gradient(135deg,#9d3bca,#c65d35); }

/* Mixed recommended mosaic */
.spotlight-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 92%;
  gap: 4px; padding: 12px 0 14px;
}
.spotlight-group { min-width: 0; aspect-ratio: 16 / 9; scroll-snap-align: start; }
.spotlight-single { display: block; }
.spotlight-quad { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; }
.spotlight-card { min-width: 0; height: 100%; position: relative; display: block; overflow: hidden; border-radius: var(--tile-radius); background: var(--black-70); isolation: isolate; }
.spotlight-card > img, .spotlight-card > .game-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .32s ease, filter .32s ease; }
.spotlight-card:hover > img, .spotlight-card:hover > .game-placeholder { transform: scale(1.035); filter: saturate(1.08); }
.spotlight-overlay {
  position: absolute; z-index: 3; inset: auto 0 0; padding: 54px 18px 16px;
  display: flex; flex-direction: column; align-items: flex-start;
  background: linear-gradient(0deg,rgba(8,9,15,.94),rgba(8,9,15,.52) 48%,transparent);
}
.spotlight-overlay strong { font-size: 22px; line-height: 1.2; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.spotlight-overlay small { max-width: 70%; margin-top: 4px; color: var(--white-80); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotlight-small .spotlight-overlay { padding: 30px 10px 8px; }
.spotlight-small .spotlight-overlay strong { max-width: 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotlight-small .spotlight-overlay small { display: none; }
.spotlight-small .tile-badge { top: 5px; left: 5px; padding: 2px 5px; font-size: 8px; }

/* Vibes/categories */
.vibe-list { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.vibe-list::-webkit-scrollbar { display: none; }
.vibe-card {
  flex: 0 0 184px; height: 106px; border-radius: 16px; padding: 14px;
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 1fr 1fr; align-items: center;
  overflow: hidden; position: relative; scroll-snap-align: start;
  background: linear-gradient(135deg,#3e2d83,#24204d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .18s, filter .18s;
}
.vibe-card:hover { transform: translateY(-2px); filter: brightness(1.1); }
.vibe-card > span { grid-row: 1/3; font-size: 32px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.vibe-card strong { align-self: end; font-size: 15px; }
.vibe-card small { align-self: start; color: rgba(255,255,255,.7); font-size: 10px; }
.vibe-1 { background: linear-gradient(135deg,#7f294f,#3c224a); }
.vibe-2 { background: linear-gradient(135deg,#16697a,#1c315b); }
.vibe-3 { background: linear-gradient(135deg,#9a4c24,#5b2847); }
.vibe-4 { background: linear-gradient(135deg,#1d7451,#23335c); }
.vibe-5 { background: linear-gradient(135deg,#5f34b9,#29316f); }

/* Recent local history */
.recent-section[hidden] { display: none; }
.recent-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 14px; scrollbar-width: none; }
.recent-list::-webkit-scrollbar { display: none; }
.recent-chip { flex: 0 0 auto; max-width: 240px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 14px 0 8px; border-radius: 12px; background: var(--black-80); color: var(--white-80); font-weight: 800; }
.recent-chip span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-100); }
.recent-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Catalog pages */
.catalog-page { max-width: 1900px; margin: 0 auto; }
.catalog-header { min-height: 86px; padding: 8px 8px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.catalog-header h1 { margin: 2px 0 4px; font-size: 32px; line-height: 1.1; letter-spacing: -.6px; }
.catalog-header p, .catalog-description, .catalog-description p { margin: 0; color: var(--white-50); }
.catalog-eyebrow { color: var(--brand-60); font-size: 11px; font-weight: 900; letter-spacing: .8px; }
.catalog-count { color: var(--white-50); white-space: nowrap; }
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 8px 18px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--black-80); color: var(--white-50); font-weight: 800; }
.filter-tabs a:hover { color: #fff; background: var(--black-50); }
.filter-tabs a.is-active { color: #fff; background: var(--brand-100); }
.catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 4px; }
.catalog-grid .game-tile { min-width: 0; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 34px; }
.pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; color: var(--white-50); background: var(--black-80); font-weight: 800; }
.pagination .page-numbers:hover { color: #fff; background: var(--black-50); }
.pagination .current { color: #fff; background: var(--brand-100); }
.empty-state { grid-column: 1/-1; min-height: 260px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed var(--black-50); border-radius: 18px; color: var(--white-50); background: rgba(26,27,40,.45); }
.empty-state h2 { margin: 10px 0 6px; color: #fff; }
.empty-state p { max-width: 520px; margin-bottom: 0; }
.empty-icon { font-size: 46px; }
.home-empty { margin: 18px 0 28px; }

/* Game player page */
body.single-game .site-sidebar:hover, body.single-game .site-sidebar:focus-within { width: var(--sidebar-width); box-shadow: none; }
body.single-game .site-sidebar .side-label, body.single-game .site-sidebar .side-section-label { opacity: 0; }
body.single-game .site-main { margin-left: var(--sidebar-width); }
.game-detail { max-width: 1720px; margin: 0 auto 24px; }
.breadcrumbs { min-height: 28px; display: flex; align-items: center; gap: 7px; padding: 0 4px 8px; color: var(--white-30); font-size: 11px; overflow: hidden; white-space: nowrap; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }
.gameplay-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.gameplay-primary { min-width: 0; }
.player-shell { overflow: hidden; border-radius: 10px; background: #03040a; box-shadow: var(--shadow-lg); }
.game-frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 145px); min-height: 420px; background: #000; }
.game-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.game-frame-wrap.orientation-portrait { width: min(100%, 520px); max-height: none; margin: 0 auto; aspect-ratio: 9 / 16; }
.game-frame-wrap.game-frame-block-snake { aspect-ratio: 820 / 900; max-height: none; }
.game-frame-wrap.game-frame-fengyao { aspect-ratio: 16 / 10; min-height: min(720px,calc(100svh - 116px)); max-height: none; }
.player-shell:fullscreen,.player-shell:-webkit-full-screen { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; background: #000; }
.player-shell:fullscreen .game-frame-wrap,.player-shell:-webkit-full-screen .game-frame-wrap { width: 100%; height: calc(100% - 62px); min-height: 0; max-height: none; aspect-ratio: auto; }
body.is-game-expanded { overflow: hidden; }
body.is-game-expanded .player-shell { position: fixed; z-index: 10000; inset: 0; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; background: #000; }
body.is-game-expanded .player-shell .game-frame-wrap { width: 100%; height: calc(100% - 62px); min-height: 0; max-height: none; aspect-ratio: auto; }
.player-bottom-bar { min-height: 62px; padding: 8px 10px 8px 12px; display: flex; align-items: center; gap: 12px; background: var(--black-80); border-top: 1px solid var(--black-60); }
.now-playing { min-width: 0; display: flex; align-items: center; gap: 10px; }
.now-playing > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.now-playing strong { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing small { color: var(--white-50); font-size: 10px; }
.playing-thumb { width: 42px; height: 42px; flex: 0 0 auto; overflow: hidden; border-radius: 10px; background: var(--black-60); }
.playing-thumb img, .playing-thumb .game-placeholder { width: 100%; height: 100%; object-fit: cover; }
.playing-thumb .placeholder-icon { font-size: 20px; }
.playing-thumb .game-placeholder > strong { display: none; }
.player-actions { margin-left: auto; display: flex; gap: 6px; }
.player-action { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer; color: var(--white-80); background: var(--black-50); transition: background .14s, color .14s, transform .14s; }
.player-action:hover { color: #fff; background: var(--brand-100); transform: translateY(-1px); }
.favorite-button.is-active { color: #fff; background: #e34668; }
.external-game-poster { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; text-align: center; }
.external-game-poster > img, .external-game-poster > .game-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.36) blur(1px); transform: scale(1.03); }
.external-game-poster > div { position: relative; z-index: 2; padding: 24px; }
.external-game-poster h2 { font-size: 28px; margin-bottom: 5px; }
.external-game-poster p { color: var(--white-80); }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--white-50); text-align: center; }
.player-empty span { font-size: 48px; }
.player-empty h2 { color: #fff; margin: 10px 0 5px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; font-weight: 900; cursor: pointer; }
.primary-button { min-height: 42px; padding: 0 17px; color: #fff; background: var(--brand-100); }
.primary-button:hover { background: var(--brand-80); }
.primary-button .icon { width: 18px; height: 18px; }
.secondary-button { min-height: 38px; padding: 0 15px; color: var(--white-80); background: var(--black-50); }
.secondary-button:hover { color: #fff; background: var(--brand-100); }
.play-next-panel { position: sticky; top: calc(var(--header-height) + 8px); width: 300px; max-height: calc(100vh - var(--header-height) - 16px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--black-50) transparent; padding: 10px; border-radius: 14px; background: var(--black-80); }
.leaderboard-widget { padding: 1px 2px 8px; }
.leaderboard-heading { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 1px 8px; }
.leaderboard-heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #231804; background: linear-gradient(135deg,#ffd86b,#ffad3d); }
.leaderboard-heading .icon { width: 18px; height: 18px; }
.leaderboard-heading > div { display: flex; flex-direction: column; }
.leaderboard-heading small { color: var(--white-50); font-size: 10px; }
.leaderboard-list { display: flex; flex-direction: column; gap: 3px; counter-reset: gp-rank; }
.leaderboard-list li { min-height: 33px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 8px; background: var(--black-70); }
.leaderboard-list li > span { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; color: var(--white-50); background: var(--black-50); font-size: 10px; font-weight: 900; }
.leaderboard-list li:nth-child(1) > span { color: #2a1b00; background: #ffd86b; }
.leaderboard-list li:nth-child(2) > span { color: #20232a; background: #d9e0e8; }
.leaderboard-list li:nth-child(3) > span { color: #291409; background: #dc9668; }
.leaderboard-list li strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.leaderboard-list li b { color: var(--brand-60); font-size: 11px; }
.leaderboard-list .leaderboard-loading { display: block; padding: 13px 8px; color: var(--white-50); text-align: center; font-size: 11px; }
.leaderboard-note { margin: 6px 0 0; color: var(--white-30); text-align: center; font-size: 10px; }
.play-next-divider { height: 1px; margin: 5px 0 9px; background: var(--black-60); }
.play-next-heading { height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 3px 8px; }
.play-next-heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--brand-100); }
.play-next-heading .icon { width: 17px; height: 17px; }
.play-next-heading > div { display: flex; flex-direction: column; }
.play-next-heading strong { font-size: 14px; }
.play-next-heading small { color: var(--white-50); font-size: 10px; }
.play-next-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.tile-square .game-tile-media { aspect-ratio: 1 / 1; border-radius: 11px; }
.tile-square .tile-overlay { padding: 28px 7px 6px; }
.tile-square .tile-overlay strong { font-size: 11px; }
.tile-square .tile-overlay small { display: none; }
.tile-square .tile-badge { top: 5px; left: 5px; padding: 2px 5px; font-size: 8px; }
.view-all-games { height: 40px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 2px; border-radius: 10px; color: var(--white-80); background: var(--black-60); font-weight: 800; }
.view-all-games:hover { color: #fff; background: var(--black-50); }
.view-all-games .icon { width: 17px; height: 17px; }
.mini-empty { padding: 30px 10px; text-align: center; color: var(--white-50); }
.gp-ad-banner { width: min(100%,728px); min-height: 90px; margin: 16px auto 0; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--black-90); color: var(--white-30); }
.favorite-button:disabled { opacity: .55; cursor: wait; }
.game-content-card { margin-top: 16px; padding: 24px; border-radius: 16px; background: var(--black-80); }
.game-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.game-title-row h1 { margin: 0 0 5px; font-size: 29px; line-height: 1.15; letter-spacing: -.5px; }
.game-title-row p { margin: 0; color: var(--white-50); }
.game-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 20px 0; }
.game-stats > div { min-width: 0; min-height: 66px; padding: 11px 13px; display: flex; flex-direction: column; justify-content: center; border-radius: 11px; background: var(--black-70); }
.game-stats small { color: var(--white-50); font-size: 10px; }
.game-stats strong { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-stats a:hover { color: var(--brand-60); }
.game-share-box { margin: 0 0 20px; padding: 14px 16px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--black-60); border-radius: 13px; background: var(--black-70); }
.game-share-heading { min-width: 122px; display: flex; flex-direction: column; }
.game-share-heading small,.game-share-tip { color: var(--white-50); font-size: 10px; }
.game-share-plugin { flex: 1; min-width: 0; }
.game-share-fallback { display: flex; flex-wrap: wrap; gap: 7px; }
.game-share-fallback a,.game-share-fallback button { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid var(--black-50); border-radius: 9px; background: var(--black-80); color: #fff; font-size: 11px; cursor: pointer; }
.game-share-fallback a:hover,.game-share-fallback button:hover { border-color: var(--brand-60); background: var(--brand-100); }
.game-share-tip { flex-basis: 100%; margin: -7px 0 0 140px; }
.game-copy { color: var(--white-80); line-height: 1.75; }
.game-copy h2 { margin: 22px 0 8px; color: #fff; font-size: 19px; }
.game-copy p:last-child { margin-bottom: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.tag-list a { padding: 7px 11px; border-radius: 9px; color: var(--white-50); background: var(--black-70); font-size: 12px; }
.tag-list a:hover { color: #fff; background: var(--black-50); }

/* 404 */
.not-found-page { min-height: calc(100vh - 210px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-orbit { display: flex; align-items: center; gap: 10px; color: var(--brand-60); font-size: 70px; line-height: 1; font-weight: 900; }
.error-orbit i { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 24px; background: var(--brand-100); font-size: 42px; font-style: normal; transform: rotate(-8deg); box-shadow: 0 18px 45px rgba(104,66,255,.33); }
.not-found-page h1 { margin: 24px 0 7px; }
.not-found-page p { color: var(--white-50); }
.mobile-nav { display: none; }

/* WordPress admin bar offsets */
.admin-bar .site-header { top: 32px; }
.admin-bar .site-sidebar { top: calc(var(--header-height) + 32px); }
.admin-bar .play-next-panel { top: calc(var(--header-height) + 40px); }

@media (min-width: 600px) {
  .carousel-track { grid-auto-columns: calc((100% - 8px) / 3); }
  .spotlight-track { grid-auto-columns: 65%; }
  .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 800px) {
  .carousel-track { grid-auto-columns: calc((100% - 12px) / 4); }
  .spotlight-track { grid-auto-columns: 49%; }
  .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (min-width: 1000px) {
  .carousel-track { grid-auto-columns: calc((100% - 16px) / 5); }
  .spotlight-track { grid-auto-columns: 39%; }
  .catalog-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (min-width: 1082px) {
  .search-form { position: absolute; left: 50%; transform: translateX(-50%); width: 460px; }
  .header-actions { margin-left: auto; }
}
@media (min-width: 1200px) {
  .carousel-track { grid-auto-columns: calc((100% - 20px) / 6); }
  .spotlight-track { grid-auto-columns: 32.5%; }
  .catalog-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media (min-width: 1510px) {
  .gameplay-layout { grid-template-columns: minmax(0,1fr) 300px; }
}
@media (min-width: 1700px) {
  .carousel-track { grid-auto-columns: calc((100% - 24px) / 7); }
  .spotlight-track { grid-auto-columns: 27.5%; }
  .catalog-grid { grid-template-columns: repeat(7,minmax(0,1fr)); }
}
@media (min-width: 1910px) {
  .site-header { background: var(--black-70); box-shadow: none; }
  body:not(.single-game) .site-sidebar { width: var(--sidebar-expanded); }
  body:not(.single-game) .site-sidebar .side-label, body:not(.single-game) .site-sidebar .side-section-label { opacity: 1; transform: none; }
  body:not(.single-game) .site-main, body:not(.single-game) .site-footer { margin-left: var(--sidebar-expanded); }
}
@media (min-width: 2100px) {
  .carousel-track { grid-auto-columns: calc((100% - 28px) / 8); }
  .spotlight-track { grid-auto-columns: 24%; }
  .catalog-grid { grid-template-columns: repeat(8,minmax(0,1fr)); }
}

@media (max-width: 1509px) {
  .gameplay-layout { grid-template-columns: minmax(0,1fr); }
  .play-next-panel { position: static; width: 100%; max-height: none; overflow: visible; margin-top: 0; }
  .play-next-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .view-all-games { max-width: 240px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1081px) {
  .site-brand { width: 158px; min-width: 158px; }
  .header-actions { min-width: auto; }
  .search-form { width: auto; flex: 1; }
  .game-frame-wrap { max-height: none; }
  .game-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .site-sidebar { top: calc(var(--header-height) + 46px); }
}
@media (max-width: 767px) {
  :root { --header-height: 56px; --page-gap: 10px; }
  .site-header { gap: 9px; padding: 0 10px; }
  .site-brand { width: 38px; min-width: 38px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name { display: none; }
  .custom-brand-logo { display: block; width: 38px; height: 38px; max-width: 38px; max-height: 38px; object-fit: contain; }
  .search-form { min-width: 0; }
  .search-form input[type="search"] { height: 38px; padding-left: 40px; font-size: 14px; }
  .search-form > .icon { left: 13px; top: 9px; }
  .header-actions { gap: 5px; }
  .header-action { display: none; width: 38px; height: 38px; }
  .pwa-install-button.is-available { display: grid; }
  .header-action-primary { display: grid; }
  .site-sidebar { display: none; }
  .site-main, body.single-game .site-main { margin-left: 0; padding: calc(var(--header-height) + 12px) var(--page-gap) calc(var(--bottom-nav-height) + 32px); }
  .site-footer { margin-left: 0; padding-bottom: calc(var(--bottom-nav-height) + 24px); }
  .mobile-nav { position: fixed; z-index: 110; inset: auto 0 0; height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-around; background: rgba(26,27,40,.97); border-top: 1px solid var(--black-60); backdrop-filter: blur(16px); }
  .mobile-nav a { width: 25%; height: var(--bottom-nav-height); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--white-50); font-size: 9px; }
  .mobile-nav a.is-active, .mobile-nav a:hover { color: #fff; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  .pwa-install-sheet { align-items: end; padding: 10px 10px max(10px,env(safe-area-inset-bottom)); }
  .pwa-install-dialog { width: 100%; padding: 25px 18px 18px; border-radius: 25px; }
  .pwa-install-dialog h2 { font-size: 22px; }
  .carousel-heading { padding: 0 4px; }
  .carousel-title h2 { font-size: 20px; }
  .carousel-controls { display: none; }
  .carousel-track { padding-top: 8px; }
  .spotlight-track { padding-top: 8px; }
  .spotlight-overlay { padding: 40px 13px 11px; }
  .spotlight-overlay strong { font-size: 18px; }
  .spotlight-overlay small { max-width: 95%; font-size: 10px; }
  .spotlight-small .spotlight-overlay { padding: 22px 7px 6px; }
  .spotlight-small .spotlight-overlay strong { font-size: 10px; }
  .game-tile-media { border-radius: 12px; }
  .tile-overlay { padding: 24px 7px 6px; opacity: 1; transform: none; }
  .tile-overlay strong { font-size: 11px; }
  .tile-overlay small { display: none; }
  .tile-badge { top: 5px; left: 5px; padding: 2px 5px; font-size: 8px; }
  .catalog-header { min-height: 72px; padding-left: 4px; padding-right: 4px; }
  .catalog-header h1 { font-size: 26px; }
  .catalog-count { display: none; }
  .filter-tabs { padding-left: 4px; }
  .game-detail { margin-left: -2px; margin-right: -2px; }
  .breadcrumbs { padding-left: 2px; }
  .player-shell { border-radius: 8px; }
  .game-frame-wrap { min-height: 230px; }
  .game-frame-wrap.game-frame-block-snake { aspect-ratio: 375 / 650; min-height: min(650px,calc(100svh - 88px)); }
  .game-frame-wrap.game-frame-fengyao { aspect-ratio: 375 / 720; min-height: min(720px,calc(100svh - 82px)); }
  .player-shell:fullscreen .game-frame-wrap,.player-shell:-webkit-full-screen .game-frame-wrap,body.is-game-expanded .player-shell .game-frame-wrap { height: calc(100% - 56px); min-height: 0; }
  .player-bottom-bar { min-height: 56px; padding: 7px; }
  .playing-thumb { width: 38px; height: 38px; }
  .now-playing strong { max-width: 40vw; font-size: 12px; }
  .player-action { width: 36px; height: 36px; }
  .play-next-panel { padding: 8px; }
  .play-next-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .game-content-card { padding: 18px 15px; }
  .game-title-row h1 { font-size: 24px; }
  .game-title-row { gap: 10px; }
  .game-stats { margin: 15px 0; }
  .game-stats > div { min-height: 58px; padding: 9px 10px; }
  .game-share-box { padding: 12px; align-items: flex-start; flex-direction: column; gap: 9px; }
  .game-share-heading { min-width: 0; }
  .game-share-tip { margin: 0; }
  .vibe-card { flex-basis: 166px; height: 96px; }
  .not-found-page { min-height: 62vh; }
  .error-orbit { font-size: 48px; }
  .error-orbit i { width: 62px; height: 62px; font-size: 30px; border-radius: 18px; }
}
@media (max-width: 430px) {
  .carousel-track { grid-auto-columns: calc((100% - 4px) / 2); }
  .spotlight-track { grid-auto-columns: 94%; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .game-title-row .secondary-button { padding: 0 11px; }
  .game-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (hover: none) {
  .tile-overlay { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Focused shell shared by learning-growth games. */
body.pixelplay-learning-app{overflow:hidden;background:#141722}
body.pixelplay-learning-app .site-header,body.pixelplay-learning-app .site-sidebar,body.pixelplay-learning-app .site-footer,body.pixelplay-learning-app .mobile-nav{display:none!important}
body.pixelplay-learning-app .site-main{height:100dvh;min-height:0;margin:0!important;padding:0!important;overflow:hidden}
body.pixelplay-learning-app .game-detail{width:100%;max-width:none;height:100dvh;margin:0}
body.pixelplay-learning-app .gameplay-layout{display:block;width:100%;height:calc(100% - 54px)}body.pixelplay-learning-app .gameplay-primary{display:block;width:100%;height:100%}
body.pixelplay-learning-app .player-shell{width:100%;height:100%;border-radius:0;box-shadow:none;background:radial-gradient(circle at 50% 15%,#2b3142,#0b0d14 72%)}
body.pixelplay-learning-app .game-frame-wrap{width:100%;height:100%;min-height:0;max-height:none;margin:0 auto;aspect-ratio:auto;background:#e9e1d7;box-shadow:0 0 45px #0008}
body.pixelplay-learning-app .game-frame-wrap.orientation-portrait{width:min(100%,520px)}
body.pixelplay-learning-app .game-frame-wrap iframe{height:100%}
body.pixelplay-learning-app .player-shell:fullscreen .game-frame-wrap,body.pixelplay-learning-app .player-shell:-webkit-full-screen .game-frame-wrap,body.pixelplay-learning-app.is-game-expanded .player-shell .game-frame-wrap{width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto}
body.pixelplay-learning-app .player-shell:fullscreen .game-frame-wrap.orientation-portrait,body.pixelplay-learning-app .player-shell:-webkit-full-screen .game-frame-wrap.orientation-portrait,body.pixelplay-learning-app.is-game-expanded .player-shell .game-frame-wrap.orientation-portrait{width:min(100%,520px)}
.learning-app-bar{height:54px;padding:0 12px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;color:#f7f8ff;background:#1a1d2a;border-bottom:1px solid #303446}
.learning-app-back,.learning-account-pill,.learning-app-action{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:12px;color:#cdd1df;background:#272b3b;font-size:12px;font-weight:800}
.learning-app-back{justify-self:start;padding:0 12px}.learning-app-back:hover,.learning-app-action:hover{color:#fff;background:#3a4055}.learning-app-back .icon,.learning-app-action .icon,.learning-account-pill .icon{width:18px;height:18px}
.learning-app-title{text-align:center}.learning-app-title strong,.learning-app-title small{display:block}.learning-app-title strong{font-size:14px}.learning-app-title small{margin-top:1px;color:#858b9f;font-size:9px}
.learning-app-actions{justify-self:end;display:flex;align-items:center;gap:6px}.learning-account-pill{padding:0 11px}.learning-account-pill.is-connected{color:#b9f1d7;background:#1f4439}.learning-app-action{width:38px;padding:0;cursor:pointer}
body.admin-bar.pixelplay-learning-app .site-main,body.admin-bar.pixelplay-learning-app .game-detail{height:calc(100dvh - 32px)}
@media(max-width:600px){
  body.pixelplay-learning-app .gameplay-layout{height:calc(100% - 50px)}body.pixelplay-learning-app .gameplay-primary{height:100%}
  .learning-app-bar{height:50px;padding:0 7px;grid-template-columns:auto 1fr auto;gap:6px}.learning-app-back{width:38px;padding:0}.learning-app-back span,.learning-account-pill span,.learning-app-title small{display:none}.learning-app-title{text-align:left}.learning-app-title strong{font-size:13px}.learning-account-pill{width:38px;padding:0}.learning-app-action{width:36px;min-height:36px}
}
@media(max-width:782px){body.admin-bar.pixelplay-learning-app .site-main,body.admin-bar.pixelplay-learning-app .game-detail{height:calc(100dvh - 46px)}}

/* 3.6.0: mobile-first game detail inspired by proven game portal patterns */
.game-title-copy{min-width:0}.game-page-kicker{display:block;margin:0 0 5px;color:var(--brand-60);font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}

@media(max-width:767px){
  body.single-game:not(.pixelplay-learning-app){background:var(--black-100)}
  body.single-game:not(.pixelplay-learning-app) .mobile-nav{display:none}
  body.single-game:not(.pixelplay-learning-app) .site-main{padding:var(--header-height) 0 max(28px,env(safe-area-inset-bottom))}
  body.single-game:not(.pixelplay-learning-app) .site-footer{margin-left:0;padding:22px 14px max(24px,env(safe-area-inset-bottom))}
  body.single-game:not(.pixelplay-learning-app) .game-detail{width:100%;margin:0}
  body.single-game:not(.pixelplay-learning-app) .breadcrumbs{display:none}
  body.single-game:not(.pixelplay-learning-app) .gameplay-layout{width:100%;min-width:0;display:flex;flex-direction:column;gap:12px;overflow:hidden}
  body.single-game:not(.pixelplay-learning-app) .gameplay-primary{display:contents}
  body.single-game:not(.pixelplay-learning-app) .player-shell{order:1;width:100%;min-width:0;border-radius:0;box-shadow:none}
  body.single-game:not(.pixelplay-learning-app) .gp-ad-banner{order:2;width:calc(100% - 20px);min-height:72px;margin:0 10px;border-radius:14px}
  body.single-game:not(.pixelplay-learning-app) .play-next-panel{order:3;width:calc(100% - 20px);min-width:0;max-height:none;margin:0 10px;padding:12px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--black-60);border-radius:18px;background:var(--black-80)}
  body.single-game:not(.pixelplay-learning-app) .game-content-card{order:4;width:calc(100% - 20px);min-width:0;margin:0 10px;padding:18px 15px;overflow:hidden;border:1px solid var(--black-60);border-radius:18px;background:var(--black-80)}
  body.single-game:not(.pixelplay-learning-app) .player-bottom-bar{min-height:58px;padding:8px 9px;background:#171925}
  body.single-game:not(.pixelplay-learning-app) .playing-thumb{width:40px;height:40px;border-radius:11px}
  body.single-game:not(.pixelplay-learning-app) .now-playing{gap:9px}
  body.single-game:not(.pixelplay-learning-app) .now-playing strong{max-width:42vw;font-size:12px}
  body.single-game:not(.pixelplay-learning-app) .now-playing small{font-size:9px}
  body.single-game:not(.pixelplay-learning-app) .player-actions{gap:5px}
  body.single-game:not(.pixelplay-learning-app) .player-action{width:40px;height:40px;border-radius:12px;background:var(--black-50)}
  body.single-game:not(.pixelplay-learning-app) .player-action .icon{width:19px;height:19px}
  body.single-game:not(.pixelplay-learning-app) .play-next-heading{order:1;height:auto;min-height:44px;padding:0 2px 8px}
  body.single-game:not(.pixelplay-learning-app) .play-next-heading>span{width:32px;height:32px}
  body.single-game:not(.pixelplay-learning-app) .play-next-heading strong{font-size:14px}
  body.single-game:not(.pixelplay-learning-app) .play-next-grid{order:2;display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:96px;gap:8px;padding:1px 1px 9px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none}
  body.single-game:not(.pixelplay-learning-app) .play-next-grid::-webkit-scrollbar{display:none}
  body.single-game:not(.pixelplay-learning-app) .play-next-grid>li{scroll-snap-align:start}
  body.single-game:not(.pixelplay-learning-app) .view-all-games{order:3;width:100%;max-width:none;margin:0;min-height:42px}
  body.single-game:not(.pixelplay-learning-app) .play-next-divider{order:4;margin:13px 0 10px}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-widget{order:5;padding-bottom:0}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list li{min-width:0}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list .leaderboard-loading{grid-column:1/-1}
  body.single-game:not(.pixelplay-learning-app) .game-title-row{align-items:flex-start;gap:12px}
  body.single-game:not(.pixelplay-learning-app) .game-title-row h1{margin-bottom:6px;font-size:23px;line-height:1.15}
  body.single-game:not(.pixelplay-learning-app) .game-title-row p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:12px;line-height:1.55}
  body.single-game:not(.pixelplay-learning-app) .game-title-row .secondary-button{min-width:58px;min-height:40px;padding:0 12px;border-radius:12px}
  body.single-game:not(.pixelplay-learning-app) .game-stats{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(124px,42vw);gap:7px;margin:16px -4px;padding:0 4px 7px;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:none}
  body.single-game:not(.pixelplay-learning-app) .game-stats::-webkit-scrollbar{display:none}
  body.single-game:not(.pixelplay-learning-app) .game-stats>div{min-height:60px;padding:10px 12px;scroll-snap-align:start;border:1px solid var(--black-60);background:var(--black-70)}
  body.single-game:not(.pixelplay-learning-app) .game-share-box{display:none}
  body.single-game:not(.pixelplay-learning-app) .game-copy{font-size:13px;line-height:1.7}
  body.single-game:not(.pixelplay-learning-app) .game-copy h2{margin:20px 0 8px;font-size:18px}
  body.single-game:not(.pixelplay-learning-app) .tag-list{margin-top:17px}
  body.single-game:not(.pixelplay-learning-app) .site-main>.game-section{margin-left:10px;margin-right:10px}
}

@media(max-height:560px) and (min-width:568px){
  body.single-game:not(.pixelplay-learning-app){--header-height:48px}
  body.single-game:not(.pixelplay-learning-app) .site-header{height:48px;padding-left:10px;padding-right:10px}
  body.single-game:not(.pixelplay-learning-app) .site-sidebar,body.single-game:not(.pixelplay-learning-app) .mobile-nav{display:none}
  body.single-game:not(.pixelplay-learning-app) .site-main{margin-left:0;padding:48px 0 24px}
  body.single-game:not(.pixelplay-learning-app) .breadcrumbs{display:none}
  body.single-game:not(.pixelplay-learning-app) .game-detail{width:100%;max-width:none;margin:0}
  body.single-game:not(.pixelplay-learning-app) .gameplay-layout{width:100%;min-width:0;display:flex;flex-direction:column;gap:12px;overflow:hidden}
  body.single-game:not(.pixelplay-learning-app) .gameplay-primary{display:contents}
  body.single-game:not(.pixelplay-learning-app) .player-shell{order:1;width:100%;min-width:0;border-radius:0;box-shadow:none}
  body.single-game:not(.pixelplay-learning-app) .game-frame-wrap:not(.orientation-portrait){height:calc(100dvh - 102px);min-height:0;max-height:none;aspect-ratio:auto}
  body.single-game:not(.pixelplay-learning-app) .player-bottom-bar{height:54px;min-height:54px;padding:6px 8px}
  body.single-game:not(.pixelplay-learning-app) .playing-thumb,body.single-game:not(.pixelplay-learning-app) .player-action{width:36px;height:36px}
  body.single-game:not(.pixelplay-learning-app) .gp-ad-banner{order:2;width:calc(100% - 24px);margin-left:12px;margin-right:12px}
  body.single-game:not(.pixelplay-learning-app) .play-next-panel{order:3;position:static;width:calc(100% - 24px);min-width:0;max-height:none;margin:0 12px;overflow:hidden}
  body.single-game:not(.pixelplay-learning-app) .game-content-card{order:4;width:calc(100% - 24px);min-width:0;margin-left:12px;margin-right:12px;overflow:hidden}
}

/* 3.9.0: lighter, player-first mobile game page. */
.player-mobile-only,.game-copy-toggle{display:none}

@media(max-width:767px){
  html.pixelplay-game-mobile{scroll-behavior:auto;scroll-padding-top:0}
  body.single-game:not(.pixelplay-learning-app){font-size:14px;overscroll-behavior-y:contain}
  body.single-game:not(.pixelplay-learning-app) .site-header,
  body.single-game:not(.pixelplay-learning-app) .site-sidebar{display:none!important}
  body.single-game:not(.pixelplay-learning-app) .site-main{margin-left:0;padding:0 0 max(24px,env(safe-area-inset-bottom))}
  body.single-game:not(.pixelplay-learning-app) .game-detail{margin:0}
  body.single-game:not(.pixelplay-learning-app) .gameplay-layout{gap:10px}
  body.single-game:not(.pixelplay-learning-app) .player-shell{contain:paint;background:#000}
  body.single-game:not(.pixelplay-learning-app) .game-frame-wrap iframe{display:block}
  body.single-game:not(.pixelplay-learning-app) .player-bottom-bar{height:54px;min-height:54px;padding:5px 8px;gap:7px;background:#12141d;border-color:#252838}
  body.single-game:not(.pixelplay-learning-app) .player-mobile-only{display:grid;flex:0 0 auto}
  body.single-game:not(.pixelplay-learning-app) .playing-thumb{display:none}
  body.single-game:not(.pixelplay-learning-app) .now-playing{flex:1;min-width:0;gap:0}
  body.single-game:not(.pixelplay-learning-app) .now-playing strong{max-width:none;font-size:14px;line-height:1.2}
  body.single-game:not(.pixelplay-learning-app) .now-playing small{margin-top:2px;font-size:13px;line-height:1.15}
  body.single-game:not(.pixelplay-learning-app) .player-actions{flex:0 0 auto;gap:4px}
  body.single-game:not(.pixelplay-learning-app) .player-action{width:44px;height:44px;border-radius:12px;touch-action:manipulation;background:#292c3d;transition:background-color .12s,color .12s}
  body.single-game:not(.pixelplay-learning-app) .player-action:hover{transform:none}
  body.single-game:not(.pixelplay-learning-app) .player-action:active{background:var(--brand-100)}
  body.single-game:not(.pixelplay-learning-app) .player-action .icon{width:22px;height:22px}
  body.single-game:not(.pixelplay-learning-app) .player-back{color:#fff;background:#1f2230}
  body.single-game:not(.pixelplay-learning-app) .gp-ad-banner{width:calc(100% - 20px);margin:0 10px;border-radius:10px;content-visibility:auto;contain-intrinsic-size:auto 90px}
  body.single-game:not(.pixelplay-learning-app) .play-next-panel{position:static;width:100%;margin:0;padding:12px 10px 14px;border:0;border-radius:0;background:#11131c;content-visibility:auto;contain-intrinsic-size:auto 390px}
  body.single-game:not(.pixelplay-learning-app) .play-next-heading{padding-left:2px;padding-right:2px}
  body.single-game:not(.pixelplay-learning-app) .play-next-heading small,
  body.single-game:not(.pixelplay-learning-app) .leaderboard-heading small,
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list li strong,
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list li b,
  body.single-game:not(.pixelplay-learning-app) .leaderboard-note{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .play-next-grid{grid-auto-columns:104px;gap:9px;padding-bottom:11px;-webkit-overflow-scrolling:touch}
  body.single-game:not(.pixelplay-learning-app) .tile-square .tile-overlay strong{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .view-all-games{min-height:44px;font-size:14px;touch-action:manipulation}
  body.single-game:not(.pixelplay-learning-app) .play-next-divider{margin:15px 0 12px}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list{gap:6px}
  body.single-game:not(.pixelplay-learning-app) .leaderboard-list li{min-height:40px;padding:6px 8px}
  body.single-game:not(.pixelplay-learning-app) .game-content-card{width:100%;margin:0;padding:18px 14px 20px;border:0;border-radius:0;background:#171925;content-visibility:auto;contain-intrinsic-size:auto 720px}
  body.single-game:not(.pixelplay-learning-app) .game-page-kicker{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .game-title-row p{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .game-title-row .secondary-button{min-width:64px;min-height:44px;font-size:14px;touch-action:manipulation}
  body.single-game:not(.pixelplay-learning-app) .game-stats{grid-auto-columns:minmax(132px,42vw);-webkit-overflow-scrolling:touch}
  body.single-game:not(.pixelplay-learning-app) .game-stats small,
  body.single-game:not(.pixelplay-learning-app) .game-stats strong,
  body.single-game:not(.pixelplay-learning-app) .tag-list a{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .game-copy{max-height:205px;overflow:hidden;font-size:14px;line-height:1.7}
  body.single-game:not(.pixelplay-learning-app) .game-copy.is-expanded{max-height:none;overflow:visible}
  body.single-game:not(.pixelplay-learning-app) .game-copy-toggle{width:100%;min-height:44px;margin-top:12px;display:flex;align-items:center;justify-content:center;border-radius:11px;color:#fff;background:var(--black-50);font-size:14px;font-weight:900;cursor:pointer;touch-action:manipulation}
  body.single-game:not(.pixelplay-learning-app) .game-copy-toggle:active{background:var(--brand-100)}
  body.single-game:not(.pixelplay-learning-app) .site-main>#related-games{display:none!important}
  body.single-game:not(.pixelplay-learning-app) .site-footer{content-visibility:auto;contain-intrinsic-size:auto 220px}
}

@media(max-width:359px){
  body.single-game:not(.pixelplay-learning-app) .reload-action{display:none}
  body.single-game:not(.pixelplay-learning-app) .now-playing small{display:none}
}

@media(max-height:560px) and (min-width:568px){
  body.single-game:not(.pixelplay-learning-app) .site-header{display:none!important}
  body.single-game:not(.pixelplay-learning-app) .site-main{margin-left:0;padding:0 0 20px}
  body.single-game:not(.pixelplay-learning-app) .game-frame-wrap:not(.orientation-portrait){height:calc(100dvh - 54px);min-height:0;max-height:none;aspect-ratio:auto}
  body.single-game:not(.pixelplay-learning-app) .player-bottom-bar{height:54px;min-height:54px;padding:5px 8px;gap:8px}
  body.single-game:not(.pixelplay-learning-app) .player-mobile-only{display:grid;flex:0 0 auto}
  body.single-game:not(.pixelplay-learning-app) .playing-thumb{display:none}
  body.single-game:not(.pixelplay-learning-app) .now-playing{flex:1;min-width:0}
  body.single-game:not(.pixelplay-learning-app) .now-playing strong{max-width:none;font-size:14px}
  body.single-game:not(.pixelplay-learning-app) .now-playing small{font-size:13px}
  body.single-game:not(.pixelplay-learning-app) .player-actions{flex:0 0 auto;gap:4px}
  body.single-game:not(.pixelplay-learning-app) .player-action{width:44px;height:44px;touch-action:manipulation;transition:background-color .12s,color .12s}
  body.single-game:not(.pixelplay-learning-app) .player-action:hover{transform:none}
  body.single-game:not(.pixelplay-learning-app) .player-action .icon{width:22px;height:22px}
}

/* 3.10.1: a planned, non-repeating homepage hierarchy with category shelves. */
body.home .learning-home-section{
  padding:14px 10px 4px;
  border:1px solid rgba(57,217,138,.2);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(31,93,72,.25),rgba(26,27,40,.72) 68%);
}
body.home #popular-games,
body.home #fresh-games,
body.home .category-home-section,
body.home .vibe-section,
body.home .recent-section{content-visibility:auto;contain-intrinsic-size:auto 250px}
body.home .vibe-card small{font-size:13px}
.home-browse-row{margin:2px 0 18px;display:flex;justify-content:center}
.home-browse-row a{min-width:min(100%,280px);min-height:52px;padding:0 20px;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid var(--black-50);border-radius:15px;color:var(--white-80);background:var(--black-80);font-size:14px;font-weight:900;touch-action:manipulation}
.home-browse-row a:hover,.home-browse-row a:focus-visible{color:#fff;border-color:var(--brand-60);background:var(--brand-100)}
.home-browse-row .icon{width:21px;height:21px}.home-browse-row .icon:last-child{width:18px;height:18px}

@media(max-width:767px){
  body.home .learning-home-section{margin-left:-2px;margin-right:-2px;padding:12px 8px 3px;border-radius:16px}
  body.home .spotlight-overlay small,
  body.home .spotlight-small .spotlight-overlay strong,
  body.home .tile-overlay strong,
  body.home .tile-badge{font-size:13px}
  body.home .vibe-card{min-height:100px}
  body.home .recent-chip{height:46px;font-size:14px}
  body.home .carousel-more{min-height:44px;padding-left:12px;font-size:14px}
  .home-browse-row{margin-top:6px}
  .home-browse-row a{width:100%;min-width:0;min-height:52px}
}
