/* Panda Arcade 1.25 — verified correction of 1.24 mobile regressions.
   Scope: Panda screens only; keep the user's wardrobe, phone themes and saved economy intact. */
:root{--p125-text:#192d28;--p125-muted:#526c62;--p125-bottom:78px}
html,body{overflow-x:hidden!important}
body:not(.arcade-game-live):not(.panda-run-lock):not(.defence-fullscreen):not(.sudoku-fullscreen):not(.tetris-fullscreen):not(.maze-fullscreen){padding-bottom:calc(var(--p125-bottom) + env(safe-area-inset-bottom))!important}
/* Correct visual contrast on ALL cards, including sleep mode + secondary tabs. */
#screenShop .item-card,#screenShop .wardrobe-panel,#screenFood .item-card,#screenStats .achievement,#screenChina .fact-card,#screenChina .word-card{color:var(--p125-text)!important;text-shadow:none!important;background:linear-gradient(150deg,#fffefa,#f6faf6)!important;border:1px solid #dce7dd!important}
#screenShop .item-card h3,#screenShop .wardrobe-panel strong,#screenShop .item-card strong,#screenFood .item-card h3,#screenShop .item-card .inventory-pill{color:#193a30!important;opacity:1!important}
#screenShop .item-card p,#screenShop .item-card small,#screenShop .item-card .item-desc,#screenShop .item-card .item-meta,#screenShop .wardrobe-status,#screenShop .item-card .item-type,#screenFood .item-card p{color:#4b685b!important;opacity:1!important;text-shadow:none!important}
#screenShop .item-card .small-pill,#screenShop .item-card .inventory-pill,#screenShop .wardrobe-panel .secondary-btn{color:#214a3b!important;background:#eff7ef!important;border-color:#cee1d2!important}
#screenShop .buy-btn,#screenShop .use-btn{font-weight:900!important;min-height:45px!important}
#screenShop .wardrobe-panel .fact-actions{margin-top:12px!important}
#screenShop .item-card{padding:15px!important;border-radius:24px!important;box-shadow:0 9px 25px #1c3f2c14!important}
#screenShop .item-card .item-preview{width:88px;height:88px;background:#f8faf8!important}
#screenChina .fact-card h2,#screenChina .fact-card p,#screenChina .word-card .translation,#screenStats .achievement p{opacity:1!important;text-shadow:none!important}
/* Re-enable the original swipe carousel. 1.24 mistakenly converted it into a 1-col vertical grid. */
#screenGame .game-tabs.arcade-game-grid{
 display:flex!important;flex-flow:row nowrap!important;grid-template-columns:none!important;
 overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;
 overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch!important;
 width:calc(100% + 15px)!important;max-width:none!important;gap:13px!important;
 padding:5px 16px 20px 2px!important;margin:0 -15px 15px 0!important;
 scroll-padding-left:4px;align-items:stretch!important;touch-action:pan-x pan-y!important;
}
#screenGame .game-tabs.arcade-game-grid .arcade-game-card{
 display:flex;flex-direction:column!important;flex:0 0 clamp(264px,78vw,332px)!important;
 width:clamp(264px,78vw,332px)!important;max-width:calc(100vw - 42px)!important;
 min-width:0!important;min-height:305px!important;border-radius:25px!important;
 scroll-snap-align:start!important;box-shadow:0 14px 34px #123b2b22!important;
 border:1px solid #dbe4db!important;overflow:hidden!important;
 color:#152c23!important;background:#fffefa!important;isolation:isolate;
}
#screenGame .arcade-game-card .arcade-cover{height:174px!important;flex:0 0 174px!important;background:var(--cover)!important;position:relative!important;overflow:hidden!important}
#screenGame .arcade-game-card .arcade-cover:before{content:""!important;position:absolute!important;inset:0!important;width:auto!important;height:auto!important;border:0!important;box-shadow:none!important;border-radius:0!important;background-image:linear-gradient(90deg,rgba(12,29,24,.32),rgba(3,25,24,.08)),var(--p125-scene,linear-gradient(135deg,transparent,transparent))!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;opacity:.93!important}
#screenGame .arcade-game-card .arcade-cover:after{content:""!important;inset:auto 0 0!important;height:55%!important;background:linear-gradient(180deg,transparent,#071e2688)!important}
#screenGame .arcade-game-card .arcade-cover-panda{width:160px!important;height:165px!important;right:0!important;bottom:-12px!important;object-fit:contain!important;z-index:2!important;filter:drop-shadow(0 10px 14px #04181455)!important}
#screenGame .arcade-game-card .arcade-cover-symbol,#screenGame .arcade-game-card .a120-cover-name{position:absolute!important;left:17px!important;top:16px!important;z-index:3!important;max-height:58px!important;max-width:58px!important;font-size:25px!important}
#screenGame .arcade-game-card .arcade-cover-symbol img{height:46px!important;width:46px!important;object-fit:contain!important;filter:drop-shadow(0 4px 8px #011c196e)!important}
#screenGame .arcade-game-card .arcade-cover-new,#screenGame .arcade-game-card .arcade-cover-badge{z-index:4!important}
#screenGame .arcade-game-card .arcade-card-copy{flex:1 1 auto!important;display:flex!important;flex-direction:column!important;min-width:0!important;padding:15px 17px 16px!important;background:#fffefa!important;color:#152d27!important}
#screenGame .arcade-game-card .arcade-card-title{display:flex!important;gap:7px!important;align-items:start!important;flex-wrap:wrap!important}
#screenGame .arcade-game-card .arcade-card-title strong{color:#112920!important;font-size:18px!important;line-height:1.2!important;letter-spacing:-.4px!important}
#screenGame .arcade-game-card .arcade-card-copy p{color:#4f6359!important;max-width:100%!important;margin:7px 0 12px!important;line-height:1.45!important;font-size:12px!important;opacity:1!important;min-height:37px!important}
#screenGame .arcade-game-card .arcade-record{font-size:10px!important;color:#6c746d!important}
#screenGame .arcade-game-card .arcade-card-meta{margin-top:auto!important;display:flex!important;flex-wrap:wrap!important;gap:5px!important}
#screenGame .arcade-game-card .arcade-meta-pill{background:#eef5ef!important;border:1px solid #d7e6d9!important;color:#2d5140!important;font-size:10px!important}
#screenGame .arcade-game-card:focus-visible{outline:3px solid #e9b65f!important;outline-offset:4px!important}
#screenGame .arcade-section-head h3{font-size:23px!important}
#screenGame .arcade-section-head span{color:#51685c!important;font-size:11px!important}
#screenGame .arcade-filter-row{padding-bottom:11px!important;scrollbar-width:none!important}
#screenGame .arcade-filter{white-space:nowrap!important;min-height:36px!important}
/* The little carousel tracker is information, never an interactive obstruction. */
.p125-carousel-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px;color:#567063;font-size:11px;font-weight:800}
.p125-carousel-dots{display:flex;gap:5px;align-items:center}
.p125-carousel-dots i{display:block;width:6px;height:6px;background:#cbd7cf;border-radius:999px}
.p125-carousel-dots i.active{width:19px;background:#b81c2b}
/* No night-skin text leakage into the shop, carousel or progression. */
body.sleep-mode #screenGame .arcade-game-card,#screenShop .item-card,#screenShop .wardrobe-panel{color:#1a3229!important}
@media(max-width:350px){#screenGame .game-tabs.arcade-game-grid .arcade-game-card{flex-basis:calc(100vw - 50px)!important;width:calc(100vw - 50px)!important}}
@media(prefers-reduced-motion:reduce){#screenGame .arcade-game-card{transition:none!important}}

/* Arcade-first layout: recommendation carousel immediately under the page heading. */
#screenGame .arcade-section-head{margin-top:4px!important;margin-bottom:12px!important}
#screenGame .arcade-premium-hero{min-height:210px!important;margin-top:14px!important;padding:17px 119px 17px 17px!important;border-radius:27px!important}
#screenGame .arcade-premium-hero h3{font-size:clamp(23px,7vw,28px)!important;line-height:1.04!important;margin:5px 0 7px!important}
#screenGame .arcade-premium-hero p{font-size:11px!important;line-height:1.4!important;display:-webkit-box!important;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden!important}
#screenGame .arcade-hero-panda{width:135px!important;height:180px!important;right:-10px!important;bottom:0!important}
#screenGame .arcade-hero-actions{margin-top:12px!important;gap:7px!important}
#screenGame .arcade-hero-play{padding:10px 14px!important;font-size:12px!important}
#screenGame .arcade-hero-audio,#screenGame .arcade-hero-metrics{display:none!important}
#screenGame .arcade-mini-awards{margin-top:12px!important}

#screenGame .arcade-filter{background:#fffdfa!important;color:#1c342a!important;border:1px solid #dce5de!important;opacity:1!important;box-shadow:0 2px 9px #10291c0e!important}
#screenGame .arcade-filter.active{background:linear-gradient(135deg,#17503d,#123c30)!important;color:#fff!important;border-color:#17503d!important}
#screenGame .arcade-live-strip{margin-top:12px!important;margin-bottom:13px!important}
#screenGame .arcade-game-card .a120-cover-name{font-size:18px!important;letter-spacing:.13em!important}
/* The older challenge module can reinsert its panel at the top after every render.
   CSS order keeps Arcade's game carousel first regardless of that re-render. */
body:not(.arcade-game-live) #screenGame.active{display:flex!important;flex-direction:column!important;min-width:0!important}
#screenGame.active>.section-title{order:0}
#screenGame.active>.arcade-section-head{order:1}
#screenGame.active>.arcade-filter-row{order:2}
#screenGame.active>.game-tabs.arcade-game-grid{order:3;align-self:stretch}
#screenGame.active>.p125-carousel-status{order:4}
#screenGame.active>.arcade-live-strip{order:5}
#screenGame.active>.arcade-premium-hero{order:6}
#screenGame.active>.arcade-daily{order:7}
#screenGame.active>.arcade-mini-awards{order:8}
#screenGame.active>.arcade-now{order:9}
