/* Active matches expose gameplay and small player cards only. */
#pool-game-app:has(.pg-playing){grid-template-rows:minmax(0,1fr)!important}
#pool-game-app:has(.pg-playing)>.pg-header,#pool-game-app:has(.pg-playing)>.pg-nav{display:none!important}
#pool-game-app.pg-in-match .pool-notice-icon{display:none!important}
#pool-game-app .pg-playing .pg-match-tools{position:absolute!important;top:7px;right:9px;z-index:8;min-height:0!important}
#pool-game-app .pg-body.pg-playing{position:relative;grid-template-rows:minmax(0,1fr)!important}
#pool-game-app .pg-playing .pg-match-tools strong{display:none!important}
#pool-game-app .pg-playing .pg-match-tools button{font-size:0!important;width:32px;height:32px;min-height:32px!important;padding:0!important;border-radius:50%!important}
#pool-game-app .pg-playing .pg-match-tools button::after{content:'×';font:24px/1 system-ui}
#pool-game-app .pg-playing .pool-hud{padding-right:42px}
#pool-leave-confirm.pg-match-dialog,#pool-player-peek.pg-player-peek,#pool-purchase-effect.pg-purchase-effect{position:fixed!important;inset:0!important;margin:auto!important;width:min(420px,92vw)!important;max-height:90dvh!important;overflow:auto!important;padding:26px!important;border:1px solid #c9a565!important;border-radius:18px!important;background:radial-gradient(ellipse at top,#233f4c,#081526)!important;color:#ecdfc2!important;text-align:center;box-shadow:0 20px 80px #000a}
#pool-leave-confirm.pg-match-dialog::backdrop,#pool-player-peek.pg-player-peek::backdrop,#pool-purchase-effect.pg-purchase-effect::backdrop{background:#020713a3;backdrop-filter:blur(4px)}
#pool-leave-confirm.pg-match-dialog .modal-close,#pool-player-peek.pg-player-peek .modal-close,#pool-purchase-effect.pg-purchase-effect .modal-close{position:absolute!important;right:9px;top:9px;width:34px;min-height:34px!important;padding:0!important;font:24px system-ui;z-index:5}
#pool-leave-confirm.pg-match-dialog h2{margin-top:25px}#pool-leave-confirm.pg-match-dialog .pg-button{margin:12px 5px 0}.pg-danger{border-color:#d87079!important;color:#ffd5dc!important;background:#792c3c!important}
#pool-player-peek.pg-player-peek{width:min(350px,90vw)!important;padding:24px!important}#pool-player-peek.pg-player-peek>.eyebrow,#pool-player-peek.pg-player-peek>h2,#pool-player-peek.pg-player-peek>.dialog-description{display:none}.pg-peek-content{display:flex;flex-direction:column;align-items:center;gap:9px;padding-top:10px}.pg-peek-content>.avatar{width:62px;height:62px;margin:13px 0!important;display:grid;place-items:center}.pg-peek-content h3{margin:8px 0 0;font:700 21px Georgia}.pg-peek-content>small{color:#9eb5ca}.pg-peek-content .pg-equipped{font-size:12px;padding:7px 16px}.pg-peek-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%;padding:12px 0;border-top:1px solid #657c8c55}.pg-peek-stats span{display:grid;gap:7px}.pg-peek-stats small{font-size:10px;color:#99b3c8}.pg-peek-stats b{font:700 17px Georgia;color:#f1cf8a}
#pool-purchase-effect.pg-purchase-effect{width:min(470px,92vw)!important;border:2px solid #e3bc67!important;background:radial-gradient(ellipse at 50% 35%,#532067,#15132c 55%,#081321)!important;overflow:hidden!important}#pool-purchase-effect.pg-purchase-effect>h2{font:700 30px Georgia;color:#f4d490;margin:15px 0 0}#pool-purchase-effect.pg-purchase-effect>.eyebrow,#pool-purchase-effect.pg-purchase-effect>.dialog-description{display:none}#pool-purchase-effect.pg-purchase-effect h3{position:relative;font:700 25px Georgia;color:#f5dca8;margin:0 0 10px}#pool-purchase-effect.pg-purchase-effect p{position:relative;font:13px/1.7 system-ui;color:#cfbfdf}#pool-purchase-effect.pg-purchase-effect .pg-button{position:relative}.pg-purchase-burst{height:150px;position:relative;display:grid;place-items:center;isolation:isolate;margin:12px 0}.pg-purchase-art{width:96%;max-height:140px;object-fit:contain;transform:rotate(-15deg);filter:drop-shadow(0 0 15px #bb55ff);animation:pg-reward-appear .5s ease-out}.pg-purchase-symbol{font-size:72px;color:#f7cf6a;filter:drop-shadow(0 0 20px #ffb74d)}.pg-purchase-burst i{position:absolute;left:50%;top:50%;width:6px;height:12px;background:#f2ca70;border-radius:3px;transform:rotate(var(--spark-angle)) translateY(-60px);opacity:0;animation:pg-purchase-spark 1.1s var(--spark-delay) ease-out 2}.pg-purchase-burst i:nth-child(2n){background:#c178ff}
@keyframes pg-purchase-spark{0%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-20px) scale(.4)}25%{opacity:1}100%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-120px) scale(.2)}}@keyframes pg-reward-appear{from{opacity:0;transform:rotate(-15deg) scale(.45)}to{opacity:1;transform:rotate(-15deg) scale(1)}}
.pg-grandmaster-pack{background:radial-gradient(ellipse at 30% 30%,#821c1744,transparent 48%),linear-gradient(115deg,#10090b,#250e15 50%,#0b0911)!important;border-color:#d9aa58!important}.pg-grandmaster-pack::before,.pg-grandmaster-pack::after,.pg-grandmaster-pack .pg-starter-reward::before{color:#d52c45!important}.pg-grandmaster-pack .pg-starter-art::before{background:#ffc19b;box-shadow:0 0 12px 5px #d24b2677,0 0 42px 20px #b31d2244}.pg-grandmaster-pack .pg-midnight-hero-cue{filter:drop-shadow(0 0 9px #dc493b88)}.pg-grandmaster-pack .pg-starter-rewards{grid-template-columns:repeat(2,minmax(0,1fr))}.pg-grandmaster-pack .pg-starter-reward{height:175px}.pg-grandmaster-pack .pg-starter-reward img{height:100px}.pg-sovereign-title{align-self:center;display:block;padding:12px 16px;max-width:100%;border:2px solid #d7a94f;border-radius:10px;font:700 24px Georgia;color:#f5d384;background:linear-gradient(#5b130d,#25090f);box-shadow:inset 0 0 0 2px #683419,0 0 14px #ca312733}.pg-frame-crimson::before{background-image:url('/assets/pool/crimson-frame-v1.webp')!important;filter:drop-shadow(0 0 3px #cf452455)}.pg-cue-crimson{height:55px!important;width:100%!important;background:transparent url('/assets/pool/crimson-cue-v1.webp') center/100% auto no-repeat!important;box-shadow:none!important;border:0!important;transform:none!important;margin:8px 0!important}.pg-title-collection .pg-button{margin:5px}
@media(max-width:600px){.pg-grandmaster-pack .pg-starter-reward{height:140px}.pg-grandmaster-pack .pg-starter-reward img{height:80px}.pg-sovereign-title{font-size:16px;padding:8px}#pool-leave-confirm.pg-match-dialog,#pool-player-peek.pg-player-peek,#pool-purchase-effect.pg-purchase-effect{padding:20px!important}#pool-purchase-effect.pg-purchase-effect>h2{font-size:25px}#pool-purchase-effect.pg-purchase-effect h3{font-size:21px}}
@media(orientation:landscape) and (max-height:500px){#pool-player-peek.pg-player-peek{max-height:94dvh!important;padding:12px 24px!important}.pg-peek-content{gap:5px}.pg-peek-content>.avatar{width:40px;height:40px;margin:9px 0!important}.pg-peek-content>.pg-sprite{display:none}.pg-peek-content h3{font-size:18px;margin:3px 0}.pg-peek-stats{padding:9px 0}.pg-purchase-burst{height:75px;margin:3px}.pg-purchase-art{max-height:75px}#pool-purchase-effect.pg-purchase-effect h3{font-size:20px}#pool-purchase-effect.pg-purchase-effect p{margin:6px 0}}
@media(prefers-reduced-motion:reduce){.pg-purchase-burst i{display:none}.pg-purchase-art{animation:none}}

#pool-game-app.pg-in-match .pool-fx-icon{display:none!important}
/* A new authoritative shot frame is not a page transition. */
#pool-game-app .pg-body.pg-playing>*{animation:none!important;transition:none!important;opacity:1;transform:none}
/* A full-height ball-return trough and compact live player levels. */
#pool-game-app .pg-playing .pool-arena{grid-template-columns:48px minmax(0,1fr) 48px!important;gap:8px!important}
#pool-game-app .pg-playing .pool-pocket-tray{position:relative;padding:12px 5px;border:2px solid #7c6a48;border-radius:16px;background:linear-gradient(90deg,#02080c,#172b35 25%,#253f47 50%,#102129 80%,#02080c);box-shadow:inset 0 0 12px #000;gap:4px}
#pool-game-app .pg-playing .pool-pocket-tray .pool-mini-ball{width:26px;height:26px;font-size:11px;border:1px solid #ffffff35;box-shadow:inset -4px -5px 7px #0007,inset 3px 2px 4px #fff7,1px 3px 4px #000a;z-index:1}
#pool-game-app .pg-playing .pool-tray-arrival{animation:pool-return-trough 1.1s cubic-bezier(.2,.35,.4,1) both}
@keyframes pool-return-trough{0%{transform:translateY(calc(-1 * var(--return-height,450px))) rotate(-900deg);opacity:0}8%{opacity:1}80%{transform:translateY(4px) rotate(-20deg);opacity:1}100%{transform:translateY(0) rotate(0);opacity:1}}
#pool-game-app .pg-playing .pool-hud .pool-level-badge{min-width:18px!important;width:auto!important;height:17px!important;padding:0 3px!important;font:800 8px/1 system-ui!important;right:-3px!important;bottom:-3px!important;border-width:1px!important;border-radius:5px!important}
#pool-game-app .pg-playing .pool-xp-copy{font-size:9px!important}
#pool-game-app .pg-playing .pool-power-rail{min-width:0;border-color:#786748}
#pool-game-app .pg-playing .pool-power-meter{width:23px!important}
@media(max-height:480px){#pool-game-app .pg-playing .pool-arena{grid-template-columns:38px minmax(0,1fr) 38px!important;gap:5px!important}#pool-game-app .pg-playing .pool-pocket-tray{padding:6px 3px;gap:2px}#pool-game-app .pg-playing .pool-pocket-tray .pool-mini-ball{width:19px;height:19px;font-size:8px}}
@media(prefers-reduced-motion:reduce){#pool-game-app .pg-playing .pool-tray-arrival{animation:none}}
