#pbFirebaseAccount{position:fixed;right:14px;bottom:14px;z-index:99999;display:flex;gap:8px;align-items:center;background:#111a20;border:1px solid #52616b;border-radius:10px;padding:9px 10px;color:#fff;box-shadow:0 8px 30px #0008;font:600 13px Arial,sans-serif}#pbCloudStatus[data-tone="ok"]{color:#79e59d}#pbCloudStatus[data-tone="error"]{color:#ff8585}#pbFirebaseAccount button{font:700 13px Arial,sans-serif;padding:8px 11px;border-radius:7px;border:1px solid #667680;background:#2c3942;color:#fff;cursor:pointer}#pbAuthDialog{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:18px}#pbAuthDialog.pb-auth-hidden{display:none}#pbAuthDialog form{width:min(440px,100%);background:#111a20;border:1px solid #667680;border-radius:12px;padding:22px;box-shadow:0 12px 40px #000;color:#fff}#pbAuthDialog h2{margin-top:0}#pbAuthDialog label{display:block;margin:12px 0}#pbAuthDialog input{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:11px;border-radius:6px;border:1px solid #6a7881;background:#0a1014;color:#fff}.pb-auth-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}#pbAuthMessage{color:#ffb4b4;min-height:20px}@media(max-width:700px){#pbFirebaseAccount{left:8px;right:8px;bottom:8px;justify-content:space-between}#pbCloudStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.pb-cloud-summary{display:grid;gap:3px}.pb-cloud-summary #pbRoleStatus{color:#b9c7cf;font-size:11px}.pb-role-controls{display:flex;gap:6px;flex-wrap:wrap}.pb-role-controls[hidden]{display:none!important}.pb-role-controls button.pb-active-view{background:#9f2830!important;border-color:#e4545c!important}#pbPublishShared{background:#244d38!important;border-color:#438864!important}#pbStage2Dialog{position:fixed;inset:0;background:#000b;display:grid;place-items:center;padding:18px;z-index:100001}#pbStage2Dialog.pb-auth-hidden{display:none}.pb-stage2-card{width:min(520px,100%);background:#111a20;border:1px solid #667680;border-radius:12px;padding:22px;box-shadow:0 12px 40px #000;color:#fff}.pb-stage2-card h2{margin-top:0}#pbStage2Message{min-height:20px}#pbStage2Message[data-tone="ok"]{color:#79e59d}#pbStage2Message[data-tone="error"]{color:#ff8585}

@media(max-width:900px){#pbFirebaseAccount{max-width:calc(100vw - 28px);flex-wrap:wrap}.pb-role-controls{order:3;width:100%}}
#pbStage3Dialog{position:fixed;inset:0;background:#000c;display:grid;place-items:center;padding:18px;z-index:100002}#pbStage3Dialog.pb-auth-hidden{display:none}.pb-stage3-card{width:min(720px,100%);max-height:85vh;overflow:auto;background:#111a20;border:1px solid #667680;border-radius:12px;padding:22px;box-shadow:0 12px 40px #000;color:#fff}.pb-stage3-card h2{margin-top:0}.pb-stage3-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:9px;margin:18px 0}.pb-stage3-summary span{display:grid;text-align:center;background:#1b2830;border:1px solid #52616b;border-radius:8px;padding:10px;text-transform:capitalize}.pb-stage3-summary strong{font-size:24px;color:#79e59d}.pb-stage3-warning{border-left:4px solid #e5b35e;background:#30291c;padding:12px;margin:14px 0}#pbStage3Message[data-tone="ok"]{color:#79e59d}#pbStage3Message[data-tone="error"]{color:#ff8585}#pbStage3Open{background:#244d38!important;border-color:#438864!important}

/* v78 tournament-day mobile auth hotfix */
@media(max-width:700px){
  #pbAuthDialog{align-items:start;overflow-y:auto;padding:8px;overscroll-behavior:contain}
  #pbAuthDialog form{width:100%;max-width:100%;max-height:calc(100dvh - 16px);overflow-y:auto;box-sizing:border-box;padding:14px;margin:0 auto}
  #pbAuthDialog h2{font-size:21px;margin:0 0 8px}
  #pbAuthDialog label{margin:8px 0}
  #pbAuthDialog input{padding:10px}
  #pbAuthDialog .pb-auth-actions{position:sticky;bottom:-14px;background:#111a20;padding:10px 0 14px;margin-top:10px;z-index:2}
  #pbAuthDialog .pb-auth-actions button{min-height:44px}
}

/* v79 iPhone emergency auth sheet: full viewport, no clipped controls */
@media(max-width:700px){
  #pbAuthDialog{
    position:fixed!important; inset:0!important; z-index:2147483647!important;
    display:block!important; overflow-y:auto!important; overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important; padding:0!important; margin:0!important;
    background:#081014!important; box-sizing:border-box!important;
  }
  #pbAuthDialog.pb-auth-hidden{display:none!important}
  #pbAuthDialog form{
    position:relative!important; width:100%!important; max-width:none!important;
    min-height:100vh!important; min-height:100svh!important; max-height:none!important; overflow:visible!important;
    margin:0!important; padding:18px 16px 110px!important; border:0!important;
    border-radius:0!important; box-sizing:border-box!important; box-shadow:none!important;
  }
  #pbAuthDialog .pb-auth-actions{
    position:static!important; display:grid!important; grid-template-columns:1fr!important;
    gap:10px!important; margin:14px 0!important; padding:0!important; background:transparent!important;
  }
  #pbAuthDialog .pb-auth-actions button{display:block;width:100%!important;min-height:50px!important;font-size:16px!important}
  #pbAuthDialog input{font-size:16px!important;min-height:48px!important}
  #pbAuthMessage{padding-bottom:24px!important}
}

#pbFirstPasswordChange form{box-sizing:border-box;max-height:calc(100vh - 36px);overflow:auto;padding:22px}
#pbFirstPasswordChange label{display:block;margin:14px 0;font-weight:700}
#pbFirstPasswordChange input{display:block;box-sizing:border-box;width:100%;min-width:0;margin-top:7px;padding:12px;border:1px solid #8799a5;border-radius:7px;background:#101a21;color:#fff;font-size:16px}
#pbFirstPasswordChange button{min-height:44px;margin:4px 6px 4px 0}

/* Player View watermark. Keep forms and tournament cards above the artwork. */
body.guest main{position:relative;isolation:isolate}
body.guest main::before{content:"";position:fixed;top:175px;right:4%;bottom:0;left:max(225px,4%);background:url('/penalty-box-logo-blue-cropped.png') center 58% / min(48vw,560px) auto no-repeat;opacity:.12;pointer-events:none;z-index:0}
body.guest main>*{position:relative;z-index:1}
@media(max-width:900px){body.guest main::before{top:190px;left:0;right:0;background-size:min(68vw,440px);opacity:.10}}
@media(max-width:560px){body.guest main::before{top:150px;background-position:center 62%;background-size:78vw;opacity:.09}}
@media print{body.guest main::before{display:none}}

/* Tournament setup appears after a format is selected. */
#eventForm [hidden]{display:none!important}
#eventForm .pb-create-heading{grid-column:1/-1;font-size:1.08rem;font-weight:700}
#eventForm .pb-create-heading input,#eventForm .pb-create-heading select{font-size:1.05rem;min-height:48px}
#pbTournamentTypeFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;margin:0}
@media(max-width:650px){#pbTournamentTypeFields{grid-template-columns:1fr}}
#eventForm .pb-time-ok{align-self:flex-start;min-width:72px;min-height:40px;margin-top:7px}
#eventForm input[type="number"]{appearance:textfield;-moz-appearance:textfield}
#eventForm input[type="number"]::-webkit-inner-spin-button,#eventForm input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* 3.2.23.166 CHIP projector + tournament delete */
#chipProjector204{display:none;position:fixed;inset:0;z-index:100000;background:#071014;color:#fff;padding:24px;overflow:auto;font-size:clamp(16px,1.6vw,28px)}#chipProjector204.open{display:block}#chipProjector204 .chip-proj-head{display:flex;align-items:center;gap:24px;border-bottom:4px solid #ef3f45;margin-bottom:20px;padding-bottom:14px}#chipProjector204 .chip-proj-head img{width:120px;max-height:90px;object-fit:contain}#chipProjector204 .chip-proj-head h1{margin:0;font-size:1.8em}#chipProjector204 .chip-proj-head p{margin:4px 0;font-weight:800}#chipProjector204 .chip-proj-head button{margin-left:auto}#chipProjector204 table{width:100%;border-collapse:collapse;margin-bottom:28px}#chipProjector204 th,#chipProjector204 td{padding:10px 14px;border-bottom:1px solid #42515a;text-align:left}#chipProjector204 th{background:#24333d}#chipProjector204 tr.prize{font-weight:800}.pb-danger-zone{margin-top:28px;padding:18px;border:1px solid #a7353a;border-radius:10px;background:#241012}.pb-danger-zone h3{color:#ff9b9f;margin-top:0}

#chipProjector204 .chip-proj-head img{width:110px;height:80px;flex:0 0 110px;max-width:110px}#chipProjector204 .chip-proj-head button{margin-left:auto}#chipProjector204 .chip-proj-tables{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px}#chipProjector204 .pb434-pool{box-sizing:border-box;min-height:180px;background:#4399d7;padding:18px}#chipProjector204 .pb434-pool>strong{font-size:28px}#chipProjector204 .chip-proj-player{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff55;font-size:22px}#chipProjector204 .chip-proj-player b{font-size:40px}#chipProjector204 .chip-proj-player small{font-size:15px}#chipProjector204 .chip-proj-queue{border-top:4px solid #4399d7;margin-top:22px;padding-top:8px}#chipProjector204 .chip-proj-queue ol{display:flex;flex-wrap:wrap;gap:15px 50px}#chipProjector204 .chip-proj-queue li{padding-right:20px}#chipProjector204 .chip-proj-queue b{color:#9ad7ff}#chipProjector204 .chip-proj-champion{color:#ffdc70;text-align:center}

@media(max-width:760px){body:not(.guest) #chipProjectorOpen204{display:inline-block!important;min-height:44px;margin:8px 0}#chipProjector204{padding:12px;font-size:16px}#chipProjector204 .chip-proj-head{gap:10px;flex-wrap:wrap}#chipProjector204 .chip-proj-head img{width:70px;max-width:70px;height:50px;flex-basis:70px}#chipProjector204 .chip-proj-head h1{font-size:22px}#chipProjector204 .chip-proj-tables{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}}

/* v3.2.23.578 account dialog viewport containment */
#pbAuthDialog{z-index:2147483647!important;box-sizing:border-box!important;overflow:hidden!important}
#pbAuthDialog form{box-sizing:border-box!important;max-height:calc(100vh - 36px)!important;max-height:calc(100dvh - 36px)!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
#pbAuthDialog .pb-auth-actions{position:sticky!important;bottom:-22px!important;z-index:5!important;background:#111a20!important;padding:12px 0 22px!important;margin-top:12px!important;border-top:1px solid #52616b!important}
@media(min-width:701px){#pbAuthDialog form{width:min(680px,calc(100vw - 40px))!important}#pbCreateProfileFields:not([hidden]) #pbAuthPoolSkills:not([hidden]){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}#pbCreateProfileFields:not([hidden]) #pbAuthPoolSkills h3,#pbCreateProfileFields:not([hidden]) #pbAuthPoolSkills p{grid-column:1/-1}}
@media(max-width:700px){#pbAuthDialog{overflow-y:auto!important}#pbAuthDialog form{min-height:0!important;max-height:none!important;padding-bottom:18px!important}#pbAuthDialog .pb-auth-actions{position:sticky!important;bottom:0!important;padding:10px 0!important;background:#111a20!important}}

/* PB combined registration fix 2026-10-07 */
#pbAuthDialog:not(.pb-auth-hidden){display:block!important;overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;height:100vh!important;height:100dvh!important;box-sizing:border-box!important;padding:12px!important}
#pbAuthDialog #pbAuthForm{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;margin:0 auto!important;transform:none!important;touch-action:pan-y!important}
#pbAuthDialog .pb-auth-actions{position:static!important}
#pbAuthDialog #pbAuthMessage{scroll-margin:24px}
