/* Four Color Comic v40.31.62 — auth/logout reliability + memory/performance hotfix */
html,body{min-height:100%;}
#authGate.auth-gate{
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  width:100vw!important;height:100dvh!important;min-height:100vh!important;
  margin:0!important;padding:0!important;overflow:auto!important;
  background-color:#000!important;
  background-image:url('/assets/fourcolor/fcc-login-background-v403162.png?v=40.31.62')!important;
  background-repeat:no-repeat!important;background-position:center center!important;background-size:cover!important;
}
#authGate.auth-gate.hidden{display:none!important}
#cloudApp.cloud-locked,body.fcc-signed-out #cloudApp{display:none!important;visibility:hidden!important}
body.fcc-signed-out{background:#000!important;overflow:hidden!important}
body.fcc-signed-out::before,body.fcc-signed-out::after{display:none!important;content:none!important}
#authGate .fcc-login-official-brand-v403136,#authGate .auth-showcase,#authGate .auth-showcase-v4011{display:none!important}
#authGate .auth-shell,#authGate .auth-shell-v4011{
  position:absolute!important;left:50%!important;top:67%!important;transform:translate(-50%,-50%)!important;
  width:min(92vw,500px)!important;max-width:500px!important;min-width:0!important;height:auto!important;min-height:0!important;
  display:block!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;
}
#authGate .auth-card,#authGate .auth-card-v4011{
  width:100%!important;max-width:none!important;min-width:0!important;min-height:0!important;height:auto!important;
  padding:24px 28px!important;border-radius:18px!important;
  background:rgba(3,8,14,.94)!important;border:1px solid rgba(75,206,255,.55)!important;
  box-shadow:0 22px 65px rgba(0,0,0,.72),inset 0 0 0 1px rgba(231,39,117,.12)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
#authGate .auth-card-v4011>div,#authGate .auth-card-v4011>#authStatus{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
#authGate #authSignInView h1{font-size:2.55rem!important;line-height:1!important;margin:.28rem 0 .42rem!important;text-align:center!important}
#authGate #authSignInView .hero-kicker,#authGate #authSignInView>p{text-align:center!important;display:block!important}
#authGate #authSignInView>p{margin-bottom:18px!important}
#authGate .auth-card-v4011 .input{min-height:46px!important;font-size:1rem!important}
#authGate .auth-card-v4011 .btn{min-height:46px!important}
@media(max-width:700px){#authGate.auth-gate{background-size:cover!important;background-position:center top!important}#authGate .auth-shell,#authGate .auth-shell-v4011{top:64%!important;width:min(92vw,460px)!important}#authGate .auth-card,#authGate .auth-card-v4011{padding:20px 18px!important}}
@media(min-aspect-ratio:2/1){#authGate.auth-gate{background-size:contain!important;background-color:#000!important}}

/* Make required Marketplace failures unmistakable. 18+ remains optional. */
#fcc59PrepBack .fcc-invalid,#fcc59PrepBack .fcc-field-invalid .input,#fcc59PrepBack .fcc-field-invalid select{border-color:#ff5368!important;box-shadow:0 0 0 2px rgba(255,83,104,.2)!important;background:#190c12!important}
#fcc59PrepBack .fcc59-prep-row.error{border-color:#ff5368!important;box-shadow:inset 4px 0 0 #ff5368!important}
#fcc59PrepBack .fcc59-row-status{min-height:22px;font-size:.9rem!important;color:#aeb9c9!important}
#fcc59PrepBack .fcc59-prep-row.error .fcc59-row-status{color:#ff9ead!important;font-weight:750!important}
#fcc59PrepBack .fcc61-offers,#fcc59PrepBack .fcc59-18{background:#0a111b!important;border-color:#334151!important;color:#d9e1ea!important}
#fcc59PrepBack .fcc59-18:has(input:checked){border-color:#d9a700!important;background:#211a05!important;color:#ffe36b!important}
.fcc62-collection-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 2px;color:#b8c3d0;font-size:.9rem}
.fcc62-collection-pager>div{display:flex;align-items:center;gap:10px}

/* Reduce paint/memory pressure in long hidden sections. */
#marketplace .fcc54-view.hidden,#marketplace section.hidden{content-visibility:hidden!important}
#marketplace .fcc58-book-card,#marketplace .fcc54-card,#collection .bookcard{contain:layout paint style}

#fcc59PrepBack .fcc59-prep-terms.fcc-field-invalid{border-color:#ff5368!important;background:#1b0b10!important;box-shadow:0 0 0 2px rgba(255,83,104,.18)!important}
