/* Online install affordances only. No player, cache, media or scrolling rules. */
/* Reserve the existing slot until the optional installed-app check settles. */
@media(scripting:enabled){
 .header .header-inner.pf-public-header>.pf-pwa-nav:not([data-pwa-ready]){visibility:hidden}
}
[data-pwa-install-link][hidden],[data-pwa-offer][hidden]{display:none!important}
@media(display-mode:standalone){[data-pwa-install-link],[data-pwa-offer]{display:none!important}}
.pf-pwa-running [data-pwa-install-link],.pf-pwa-running [data-pwa-offer]{display:none!important}
.header .header-inner.pf-public-header>.pf-pwa-nav{display:flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;box-sizing:border-box;border:1px solid #ad6a22;border-radius:14px;background:#17130f;color:#ffb65b;box-shadow:0 0 12px #ff910016;touch-action:manipulation;transition:border-color 180ms ease,box-shadow 180ms ease}
.header .pf-pwa-nav svg{width:22px;height:22px}
.header .header-inner.pf-public-header>.pf-pwa-nav:hover{border-color:#ffad39;box-shadow:0 0 16px #ff99002a}
.header .pf-pwa-nav:focus-visible,.pf-pwa-dialog :is(a,button,summary):focus-visible{outline:2px solid #ffb44f;outline-offset:3px}
@media(min-width:1151px){.header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.search{max-width:309px}}
@media(max-width:680px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot){grid-template-columns:minmax(0,1fr) 44px 44px 96px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot[data-account-authenticated="1"]){grid-template-columns:minmax(0,1fr) 44px 148px}
 .header .header-inner.pf-public-header>.pf-pwa-nav{grid-row:1;grid-column:2}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.saved-nav{grid-column:3}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.account-menu-slot{grid-column:-2/-1}
}
@media(max-width:420px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav){column-gap:6px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.brand{font-size:18px;gap:5px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.brand .brand-symbol{width:28px;height:28px;flex-basis:28px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot){grid-template-columns:minmax(0,1fr) 40px 40px 88px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot[data-account-authenticated="1"]){grid-template-columns:minmax(0,1fr) 40px 132px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>:is(.pf-pwa-nav,.saved-nav){width:40px;height:40px;min-height:40px;flex-basis:40px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.account-menu-slot{width:88px;flex-basis:88px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.account-menu-slot[data-account-authenticated="1"]{width:132px;flex-basis:132px;gap:6px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav) .account-menu-slot :is(.account-upload-link,.account-guest-link,.account-upload-menu,.account-upload-menu>summary,.account-user-menu,.account-user-menu>summary,.account-notifications,.account-notifications>summary){width:40px;height:40px;flex-basis:40px}
}
@media(max-width:360px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.brand{font-size:16px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.brand .brand-symbol{width:24px;height:24px;flex-basis:24px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot){grid-template-columns:minmax(0,1fr) 36px 36px 80px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav):has(>.account-menu-slot[data-account-authenticated="1"]){grid-template-columns:minmax(0,1fr) 36px 120px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>:is(.pf-pwa-nav,.saved-nav){width:36px;height:36px;min-height:36px;flex-basis:36px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.account-menu-slot{width:80px;flex-basis:80px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav)>.account-menu-slot[data-account-authenticated="1"]{width:120px;flex-basis:120px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav) .account-menu-slot :is(.account-upload-link,.account-guest-link,.account-upload-menu,.account-upload-menu>summary,.account-user-menu,.account-user-menu>summary,.account-notifications,.account-notifications>summary){width:36px;height:36px;flex-basis:36px}
}
.pf-pwa-dialog{position:fixed;inset:0;box-sizing:border-box;width:min(470px,calc(100% - 24px));max-width:470px;max-height:calc(100dvh - 32px);margin:auto;padding:28px;border:1px solid #8a5920;border-radius:25px;background:radial-gradient(ellipse at 100% 0,#35220c80,transparent 65%),#11100e;color:#f5f0e9;box-shadow:0 20px 70px #0008;overscroll-behavior:contain}
.pf-pwa-dialog::backdrop{background:#0009}
.pf-pwa-dialog:not([open]){display:none}
.pf-pwa-dialog-icon{display:block;margin-bottom:18px;border-radius:14px;width:56px;height:56px}
.pf-pwa-dialog h2{font-weight:800;font-size:27px;line-height:1.15;letter-spacing:-.7px;margin:0 30px 12px 0}
.pf-pwa-dialog p{font-size:14px;line-height:1.65;color:#c9c3bb}
.pf-pwa-dialog>.button{width:100%;margin:8px 0 12px;min-height:44px;justify-content:center}
.pf-pwa-close{position:absolute;top:15px;right:15px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #5d4425;border-radius:12px;background:#231b12;color:#ffc578;font-size:26px;cursor:pointer}
.pf-pwa-help details{border:1px solid #4a351d;border-radius:13px;margin:9px 0;background:#15120f}
.pf-pwa-help summary{padding:12px 14px;font-size:14px;font-weight:700;color:#ffd497;cursor:pointer;-webkit-tap-highlight-color:transparent}
.pf-pwa-help ol{margin:0;padding:0 18px 14px 34px;color:#d0cbc4;font-size:13px;line-height:1.65}
.pf-pwa-help li{padding:3px 0 3px 3px}
.pf-pwa-help li::marker{color:#ffb347;font-weight:700}
.pf-pwa-dialog .pf-pwa-note{font-size:12px;color:#ada69c;margin:14px 0}
.pf-pwa-dialog .pf-pwa-guide-link{display:flex;white-space:normal;text-align:center;font-size:14px;font-weight:600;line-height:1.4;background:#ff9900;color:#171008;border-color:#ff9900}
.pf-pwa-status{padding:12px 14px;border:1px solid #83612e;border-radius:12px;background:#ff99000b;color:#ffca7b!important;font-size:14px;line-height:1.5}
.cm-panel.pf-pwa-profile{border-color:#715020;background:linear-gradient(145deg,#241b0f80,#131214)}
.pf-pwa-profile-icon{display:grid;place-items:center;width:45px;height:45px;border:1px solid #ad6a22;border-radius:14px;background:#241b10;color:#ffb65b;margin-bottom:16px}
.pf-pwa-profile-icon svg{width:24px;height:24px}
.pf-pwa-profile h2{font-size:21px;margin:0 0 12px}
.pf-pwa-profile p{line-height:1.7;color:#c9c3bb;font-size:14px}
.pf-pwa-profile .button{margin-top:8px;max-width:100%;white-space:normal;text-align:center}
@media(max-width:420px){.pf-pwa-dialog{padding:23px 19px;border-radius:21px}.pf-pwa-dialog h2{font-size:24px}}
@media(prefers-reduced-motion:reduce){.header .header-inner.pf-public-header>.pf-pwa-nav{transition:none}}

/* Installed app: reclaim the installation column while retaining every other control. */
@media(max-width:680px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav[hidden]):has(>.account-menu-slot){grid-template-columns:minmax(0,1fr) 44px 96px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav[hidden]):has(>.account-menu-slot[data-account-authenticated="1"]){grid-template-columns:minmax(0,1fr) 148px}
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav[hidden])>.saved-nav{grid-column:2}
}

/* Match the actual guest button widths after the installation column disappears. */
@media(max-width:420px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav[hidden]):has(>.account-menu-slot[data-account-authenticated="0"]){grid-template-columns:minmax(0,1fr) 40px 88px;column-gap:8px}
}
@media(max-width:360px){
 .header .header-inner.pf-public-header:has(>.pf-pwa-nav[hidden]):has(>.account-menu-slot[data-account-authenticated="0"]){grid-template-columns:minmax(0,1fr) 36px 80px}
}
